RS232 to TCP/IP via GPRS

Scabby

New Member
Joined
Aug 23, 2006
Messages
3
Hi everyone,

I hope I am not off topic!

I am trying to establish communication between a PLC (controller) and a PC using a cellular modem. I currently use a telephone modem which I plug into the PLC and then dailup from my PC. It works fine until our beloved fixed line supplier's lines acts up...

I have tried using GSM with a Falcom Tango modem. I get the PLC to communicate with the Tango (it sends an AT string to set auto answer after 3 rings). After sending the string, the Tango picks up after 3 rings when I dail into it, but then nothing, just silence and no data transfer.

The supplier send me this: "This is once again a AT+CBST=7,0,1 and AT+CICB=0 issue. This was easy to overcome in the past when you had a separate cell number for data, but now that the networks are using the same number for voice and data you need to define the fact that you are making a data call.

The most important command here is the AT+CBST=7,0,1 and this needs to be issued to the modem that is connected to the PC. In some cases though this command will only have two decimal places instead of one, so if the modem responds with an error they need to then try the AT+CBST=7,1 command. The AT+CICB=0 command on the other hand needs to be issued to the Tango itself."


I managed to send the AT string to the Tango, but my PCs internal modem is not compatible with that commands (I also tried on a different PC, but it also did not understand it). It is important that I can access the PLC from anywhere in the world using any type of fixed line or cellular modem.

In the mean time I heard about the possibility of using GPRS and accessing the PLC via my internet connection. For this I apparently need a GPRS modem that can convert RS232 input to TCP/IP. The modem should apparently have a static IP. At PC side I assume I would then need a piece of software that can create a virtual COM port, translating TCP/IP back to RS232 so that my application think it is talking straight to a RS232 port.

Can anyone give me some pointers or information and recommend which equipment/supplier to use? I am in Cape Town and would obviously want to test-before-I-buy!

Thank you!
 

vodacom3g

Vodacom Representative
Joined
Jan 14, 2005
Messages
12,065
A few options, you should try and switch everything to IP, failing that you can tunnel 232 over IP.

Best to PM me all your contact details and I'll give you a call to discuss.
 

grubsner

Well-Known Member
Joined
Feb 21, 2005
Messages
375
I use a modem called the GM862-QUAD. It's an OEM module manufactured by Telit in Italy. These modems are well suited for RS232 comms via GPRS. The module has a built-in SIM reader.

These units have an onboard TCP/IP stack which makes life much easier than to try and use a uP and simulate the TCP/IP stack in software.

The modem has a set of proprietry AT commands to initiate a GPRS session via the serial port on the Module. Once the session is running the serial TX and RX on the modem, used to send the AT commands, becomes the TCP/IP connection. Everything that you write to the serial port get transmitted to the remote server via TCP/IP and data transmitted from the server appears on the serial pin of the module. GPRS session is terminated with the "+++" command.

I use a PIC 18F252 to do all the dirty work and once the GPRS session is initiated the serial transfers are seamless.

SA Telit modules distributer: www.rfdesign.co.za
Telit Datasheets: www.telit.com
Breakout boards for prototyping: www.sparkfun.com

I'm currently running 3 modules for vehicle tracking and they are very stable with industrial temp ranges etc.

Drop me a PM if you need more info.

HTH
 

WireFree

Well-Known Member
Joined
Oct 23, 2005
Messages
448
Hi,

I managed to send the AT string to the Tango, but my PCs internal modem is not compatible with that commands (I also tried on a different PC, but it also did not understand it). It is important that I can access the PLC from anywhere in the world using any type of fixed line or cellular modem.

Instead of using the internal modem on your PC have you tried using a cellphone connected to your PC or a GSM modem like the SAMBA 55 to connect to the Tango modem?

I think this method might work.

In the mean time I heard about the possibility of using GPRS and accessing the PLC via my internet connection. For this I apparently need a GPRS modem that can convert RS232 input to TCP/IP. The modem should apparently have a static IP. At PC side I assume I would then need a piece of software that can create a virtual COM port, translating TCP/IP back to RS232 so that my application think it is talking straight to a RS232 port.

There is a slight problem here as the mobile operators provide you with a private IP address for the GPRS connection and then perform NAT before the Internet. You therefore cannot connect from the public Internet to the GPRS device.

WireFree
 

Scabby

New Member
Joined
Aug 23, 2006
Messages
3
Hi,

Instead of using the internal modem on your PC have you tried using a cellphone connected to your PC or a GSM modem like the SAMBA 55 to connect to the Tango modem?

I think this method might work.

Its the only thing I did not manage to do - had a problem getting data enabled on my second SIM card and had to return the borrowed Tango before I had it fixed. Lame excuse, I know...

My problem with having to use another cellular modem is that it restricts access. I might have to provide access at times to someone that do not have a cellular modem available.

I do know about someone accessing their dataloggers using a Tango at device side and a normal internal PC modem at PC side. It might be however that their datalogger and software send AT strings which is not known to him.
 
Top