I’m using SIM900 Gadgeeter module. There are some problems with TCP send and connect with seed driver, so I’m using driver from DLSys (http://www.tinyclr.com/codeshare/entry/590)
Everything works perfect, except, the returned state is “OK”, even if the server isn’t available :
public bool Connect(string serverAddress, int port)
{
if (!IsReady) return false;
var tcpState = _radio.ConnectTCP(serverAddress, port);
//Thread.Sleep(2000); // wait for connection TODO: make the connect block until "CONNECT" is received (AT)
_isTcpConnected = tcpState == CellularRadio.ReturnedState.OK;
return _isTcpConnected;
}
In my debug window, i see, that response from Cellular Radio is “CONNECT FAIL”, which is correct response:
CellularRadio : SENT: AT+CIPSTART=“TCP”,“xxx.xxx.xxx.xxx”,yyyy
check gadgeteer.codeplex.org and see if the source code for the Seeed module is there. You can then download the source code and include in your program. If you do that, you can make any changes you need.
I downloaded solution, and found cellular module project. I’m working in 4.2 framework, but the cellular module is built in 4.1. When I try to switch to 4.2, it says that class Serial does not exists in Gadgeteer.Interfaces namespace. Where can I found CellularModule, build in 4.2 framework?
PS - If I use CellularModule in 4.1 with my application in 4.2 there are missing CellularRadio dependencies, which are smaller version than currently mine:
you’re probably not missing anything; the code hasn’t been updated for 4.2. Seeed seem to have dropped updating their drivers, and GHI have taken that over, but aren’t necessarily keeping everything up to date in that location all the time - they do the updates and push them periodically when they can.
Why don’t you update it for 4.2 yourself - if you only need to resolve the serial port issues that should be relatively straight forward; track down where the new port definition is.
Does “CONNECT” needs to be replaced with “CONNECT FAIL”? I’m also confused, because first response from “AT+CIPSTART” was “OK”. Then after some time it came response “STATE:TCP CLOSED CONNECT FAIL”, so index of “AT+CIPSTART” >, might fail, because it’s not sended along with TCP CLOSED message