GPRS and Cerberus

Hi all,

I would like to make a GPRS connection using a serial GSM modem and a Cerberus. I found several examples so it’s clear what to do. However I’m missing some items like PPP.Enable. I don’t have a clue which reference to use. Could someone give me a pointer. Or is a GPRS connection with the Cerberus or FEZ40 not possible? Or do I need to buy software. I think I need something from Codeplex (https://netmf.codeplex.com/releases/view/91594). But what?

Regards.

As far as I know the PPP stuff is part of the Premium devices, ie EMX based boards, Chipworks based boards.

If you want to use a GSM module with the Cerberus then you will need a GSM module with built in TCPIP stack.

Gus, please correct me if i’m wrong.

Most modems have built in TCP stack so you do not needed PPP

The modem I use is a serial Sony Ericson GR47 (connected to COM2 on the Cerberus) and it supports SMS service, voice calls and GRPS. The modem has an integrated IP/TCP/UDP stack but this is only for (modem) embedded applications. I can send SMS messages from my Cerberus without any problem. However I’m lost how to send data to a server (i.e. webserver). Do I understand GMod correctly that GPRS connections are not possible with the Cerberus?
And if the integrated IP/TCP/UDP stack can not be used how should I then proceed knowing that the modem supports GPRS.

From Cerberus side, this is just a serial port. Any other needed knowledge is from the modem’s manual.

@ Gus: I do not believe this. The modem needs to have a GPRS option and if the modem doesn’t have a TCP/IP stack you need to provide one in the software. I found some examples. See http://www.tinyclr.com/codeshare/entry/485 and http://www.tinyclr.com/forum/topic?id=1984&page=1#msg20210. However some of the references and functions shown in the examples I can’t find, like the GHIElectronics.System.Net reference.
This would be a real show stopper if I can’t make GPRS connection with the Cerberus…

As mentioned in last reply, the answer is in the modem manual. See section 7 http://www.embeddedarm.com/documentation/third-party/ts-gsm1_gr47-48-manual.pdf

@ Gus you are right. I’ve reached the data mode using the TCP stack of the modem. When connected to, lets say an internet site I see connect, and it’s waiting for commands. This is what I used so far:

AT+CPIN=“0000” Enter PIN code SIM card
AT+CMGF=0 Set PDU mode (sends data)
AT+CGDCONT=1,“IP”,“” Make connection to APN

ATE2IPA=1,1 Activated IP
AT
E2IPI=0 Read IP status of the module

ATE2IPRH=www.google.nl Resolve Google IP address
AT
E2IPO=1,“173.194.39.23”,80 Get result from Google
Response CONNECT, we are now in data mode.

I would like to send a file from the Cerberus to a server, i.e. ftp server. How should I proceed? I’ve searched endlessly on the internet but I couldn’t find a helpful pointer. This is uncharted territory for me.
I understand that I connected using port 80 (http) and that, if I want to send a file to a ftp server, I should use port 21 (ftp). But what’s next?

Some help would be very appreciated!

Regards.

This is where you must look at the FTP specification.

See File Transfer Protocol - Wikipedia as well as the links under “Further reading”.

You must look at the “STOR” command which allows for uploading a file to the server.

Note: It looks like you might have to also investigate “Passive FTP Mode”. Looks like in active mode the server will want to connect to your modem to transfer data which will mean that you will have to also set up a server socket on the modem.

You can or course also send a file to the server via a HTTP Post command. This might be easier modem side, but will require server side code…

Being a user of the internet for about 25 year I have seen some stuff. And the ftp protocol is present in my back pocket for many, many years. Using a HTTP POST, GET or whatever no problem. I go all the way back to FORTRAN77, flipping switches to boot a system and listening to the squeaky sounds of a 1200 baud modem to get connected to the world… Perhaps its a good thing to update my profile.
Concerning the initial question I have, I guess Im running around in a loop and someone needs to provide a ‘solution interrupt. Im simply stuck what to do next when the modem is in data mode. And looking at the post hits (+100) more people are interested. But perhaps I need to more explicit.
Could someone help me with a piece of C# code (no native code) that runs on a Cerberus or FEZ40 that enables me to send a file, stored on a SD-card connected to the Cerberus, to a server. The code should use the GR47 serial modem and its internal TCP/IP stack. I do not want to email the file stored on the SD-card. So the example code should not use POP, SMTP or whatever. But if you want to throw this in as a bonus be my guest. Perhaps someone else is interested and could make good use of your solution.

Thanks

Now you are expecting a bit too much. :slight_smile:

You are unlikely to find someone that just happen to have a GR47 and that is willing help. :slight_smile:

All I can say is that one you get “CONNECTED” you have an open TCPIP connection to the chosen host at the chosen port. Then you must start talking HTTP or FTP, depending on the server that is sitting on the other side.

Seeing as you are connected to HTTP lets try HTTP.

Send “GET / HTTP/1.1”. You will have to sort out the “/” and the request should be terminated with a . This will request the root document from the HTTP server.

I did same with Putty connect to www.google.com and got this, a redirect to my local google server, www.google.co.za

being one of the hundred people who have looked at your post ( :wink: ) I can tell you I am interested to see how you progress, but can’t help. How many GR47’s are there in use here, probably not that many. So that in itself is going to be your biggest challenge - you’re in the community but nobody will be able to use a solution, no matter who produces it.

Oh and GMod just noted the same thing…

Ok we are cooking!! Sorry to be explicit. I believe that the GR47 is one of the many modems available with a TCPIP stack and has a pretty standard AT command set. Perhaps there are some odd exceptions. Im stuck at a principle level. At first I thought I needed a TCPIP stack in the Cerberus code but, as Gus pointed out, this was not needed. So Im learning and that makes me very happy!
Of course Ill keep you all posted on the development. But please, please chip in with ideas, suggestions or whatever. Sometimes one word is enough…

Unfortunately the TCPIP commands differ from supplier to supplier and sometimes from modem to modem from the same supplier.

We are using the UBLOX on one of our boards and the command to open a TCPIP pier to pier connection is:

@ GMod, when you send an GET HTTP/1.1 it’s a good idea to also send a host header, or a lot of webservers will consider the request invalid. (learned the hard way :wink: )
e.g.


  GET / HTTP/1.1
  Host: some.www.adddress.com
  <CR><LF>

@ Materie621 As GMod mentioned, once you have received the “CONNECT” back form the modem you are in transparent data mode and you need to start communicating with the webserver, so you’ll need to find HTTP or FTP helper libraries, the modem is now just a communications pipe.

Yeah, I suppose one must do a “GET HTTP/1.0” to get past the “HOST” command.

Wikipedia says:

[quote]
In the HTTP/1.1 protocol, all headers except Host are optional.

A request line containing only the path name is accepted by servers to maintain compatibility with HTTP clients before the HTTP/1.0 specification in RFC 1945.[/quote]