Cellular board + Cerberus board as TCP Server sample code needed

I finally got the cellular board powered with a external 5V 4amp capable power supply and the Cerberus is now working with it good. I cut the 5V and 3V(just to be sure) lines going to the cellular board and soldered +5V to C1+ and the nice GND pad near the antenna. I’m able to send and receive texts properly. I’m trying to figure out how to set the cellular board up as a TCP server now. I’ve used the ConfigureTCPServer(2100) command to setup on port 2100. Debug info says OK but after awhile says SERVER ERROR. I cannot make the socket connection either. Any ideas on how to get this board setup as a TCP server correctly? Web and raw data examples for this configuration would be nice also.

Have you looked here:
http://www.ghielectronics.com/community/forum/topic?id=9414

Byron has made a good driver for cell board. On codeplex there are small example that may help you. I use just SMS features of the board so I didn’t try gprs tcp connection.

I have tried this as well without any luck, I am watching this topic!

@ dobova

The examples shown at the link you provided are for requesting data(web pages) from a server. I need to set the cellular board up to accept a socket connection via port 2100. Trying to make a wireless data logger. At this point I either want it to serve a web page to show the data and allow configuration or simply receive packet commands to send data and receive configuration info.

Think I may have found some valuable info from the manufacturer of the SIM900 module. The TCP/IP application note link I believe has the info to setup the socket server correctly. Will try and report later today.

Here’s the link to the page: http://www.simcom.us/support_detail.php?pid=37

I assume that you are burried in AT commands from the document on the GSM chip. I have been through it myself, and realized several shortcomings of the current driver.

What about doing a community-based effort to upgrade the drivers for the card together?

Anyone?

Byron?

Good day.

The first question I have to ask is if your cellular provider gives you a static IP when you connect with GPRS?

Most cellular connections are made through a NAT so the actual IP address of your device once connected will not be visible on the internet. It will be an internal IP address within the cellular network. In much the same as your home network PC’s are invisible unless you have port forwarding.

Once you connect, have a look at the IP address that the PPP connection gets. I bet you it will be 10.x.x.x or 192.x.x.x type address. These are reserved for internal connections.

So, unless your network gives you a fixed IP or you have a special APN on their network it will not work.

If this is the case, your only option is to use SMS or have your field unit dial up a server and download the configuration changes. I have done this before by sending an SMS to the device with a URL of the data file. It then dials up, downloads the file and then parses the file for configuration.

Regards
Dave…

Yes, if you need to accept incoming connections, then this doesn’t work over mobile networks without a special deal with a provider.

However, it is possible to tunnel incoming connections through an outgoing connection. In other words: the software on the device is physically a TCP client, but logically a TCP server. This can be implemented using a suitable “reverse HTTP protocol”. The device connects to a relay service in the cloud, clients (e.g. a normal Web browser) connect to the relay service instead of the device. Only the Web server on the device needs to be modified to make this possible.

I’ve shown how this architecture can be used from NETMF in my book “Getting Started with the Internet of Things” (http://www.gsiot.info/). I use the relay service “Yaler” (which is “relay” spelled backwards): https://www.yaler.net/

(Disclosure: I had been involved in the creation of Yaler, which was driven by several of our customers having this particular problem and needing a highly scalable solution.)

Best regards

Cuno

My application for the Cerberus system will have a fixed IP activated sim card. I’m currently trying to rewrite the PowerOn function in the current driver to do the correct configuration of the modem for being a server. I rewrote the existing one and created an MSI and installed it. I was not able to see it as device to put in the diagram though. I tinkered with making a AC digital input status board with no problem though. I’m on break from that project for the weekend as I’m back to tinkering with a Fez Domino to make an Android controlled rocket launcher system, for my hobby.