Main Site Documentation

Cellular radio manager 4.3 upgrade


#1

Hi guys

I’m using cellular radio manager 4.2 but i need to upgrade it to 4.3. I created a clean sollution, added the cellular radio projects and changed them to 4.3 (project -> properties). Compiler underlined some wrong code on digitaloutput lines. I followed this thread https://www.ghielectronics.com/community/forum/topic?id=14337 and changed this code:

private Interfaces.DigitalOutput pwrkey;         
pwrkey = new Interfaces.DigitalOutput(socket, Socket.Pin.Three, false, this);

to this:

using Gadgeteer.SocketInterfaces;
private SocketInterfaces.DigitalOutput pwrkey;
pwrkey = GTI.DigitalOutputFactory.Create(socket, Socket.Pin.Three, false, this);

but the compiler doesn´t recognize GTI (the name GTI does not exist in the current context). So i removed GTI. from that line and the compiler shows no errors, but when building the solution i get some warnings and several errors:

Error 4 Cannot resolve type Gadgeteer.SocketInterfaces.DigitalOutput from assembly GTM.Mekalogic.CellularRadio
Error 5 CLR_E_FAIL

Can anyone tryed to do this? What am i missing?

Thanks


#2

I have a reference to Gadgeteer, i removed, re-add Gadgeteer reference but it still doesn´t recognizes GTI.
Meanwile the compiler highlighted another piece of code:

private Interfaces.Serial serialLine;
serialLine = new Interfaces.Serial(socket, 19200, Interfaces.Serial.SerialParity.None, Interfaces.Serial.SerialStopBits.One, 8, Interfaces.Serial.HardwareFlowControl.Required, this);

Using the same idea i changed to:

private SocketInterfaces.Serial serialLine;
serialLine = SocketInterfaces.Serial.create(socket, 19200, Interfaces.Serial.SerialParity.None, Interfaces.Serial.SerialStopBits.One, 8, Interfaces.Serial.HardwareFlowControl.Required, this);

but there is no Create method on SocketInterfaces.Serial

Any ideas?


#3

Thanks andre.m, you solved the GTI problem…

The second part of the problem still exists, the SocketInterfaces.Serial doesn’t have a create method…

Any ideas?


#4

@ geologic - I had to port this to 4.3 too. Follows the code you need to change.
It compiles after that.

add:
using Gadgeteer.SocketInterfaces;

line 115:
private Serial serialLine;

line 121:
private DigitalOutput pwrkey;

line 341 and 342:
pwrkey = DigitalOutputFactory.Create(socket, Socket.Pin.Three, false, this);
serialLine = SerialFactory.Create(socket, 19200, SerialParity.None, SerialStopBits.One, 8, HardwareFlowControl.Required, this);


#5

Hi JSimoes

I changed the code as you mentioned but still have errors, please see image below


#6

looks to me like you are still targeting 4.2. The error message for item 1 and 2 say that.


#7

After struggling with VS2012 and SDK versions i could’t get the code to compile. In my computer it refused to compile, but in other computer it compiled ok (many thanks to Justin), so i got the compiled version and it is working ok.

Thanks everyone for helping.