From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communicate a PC with GPRS module through TCP/IP

Solved!
Go to solution
 I want to exchange data between a PC and a GPRS module.

One problem i have is that my PC is on a local network and the IP my computer has, is the local IP. The server has a different IP through we connect to the internet. Which IP I must use and how?

I know almost nothing about TCP/IP (i have use the Labview TCP/IP functions successfully at our local network) and i would like to ask for informations. I know it is a little irrelevant with Labview, but as there are many users who uses GPRS modules, i would like informations about how to connect a GPRS module through TCP/IP. Simple examples will be the best.

Any informations, links, recommended books, will be highly appreciated.

Thanks
0 Kudos
Message 1 of 14
(6,514 Views)
Someone ?!
0 Kudos
Message 2 of 14
(6,480 Views)


@Pnt wrote:
 I want to exchange data between a PC and a GPRS module.

One problem i have is that my PC is on a local network and the IP my computer has, is the local IP. The server has a different IP through we connect to the internet. Which IP I must use and how?

I know almost nothing about TCP/IP (i have use the Labview TCP/IP functions successfully at our local network) and i would like to ask for informations. I know it is a little irrelevant with Labview, but as there are many users who uses GPRS modules, i would like informations about how to connect a GPRS module through TCP/IP. Simple examples will be the best.

Any informations, links, recommended books, will be highly appreciated.

Thanks


It's not fully clear to me what you want to do but I assume that you want to use a GPRS modem to connect your computer to internet. This is entirely independant of LabVIEW. First you need to install a modem in your system and configure it to communicate with the GPRS modem. It's mostly like installing any other modem in your system and if you use Windows using the Modem Wizard that can be accessed from the Phone and Modem Options Control Panel or similar depending on your Windows version is probably a good start. You will want to install a Standard 19200 or 38400 modem in most cases.

Then you need to configure that modem and here you usually need to add an Extra Initialisation command which will depend on your modem type and most likely on your GPRS provider too.

Next step is to configure a dialup connection using that modem. In Windows XP you do that from the Properties window for the My Network Places window. Other Windows  versions might have that as a Control Panel application or somewhere else. Create a new connection is the part you want there and selet the previously installed modem. The dialup number is highly Network Provider specific and you will have to get that from them somehow, though it can proof a real challange to get a support person that even understands what you want to do and then is able to locate the according knowledgebase article in their database.

One you have a network connection setup like that and can connect to the network provider from Windows directly you can also use LabVIEW TCP/IP functions to connect to any TCP/IP endpoint that would be reachable over that connection.

Rolf Kalbermatter

Rolf Kalbermatter
My Blog
0 Kudos
Message 3 of 14
(6,471 Views)

Thanks for answering Rolf.

To be more clear : i have a GSM/GPRS module (like the well known Wavecom's modules (or Falcom, Telit...)). They accept AT commands and they have a D-sub-9 serial connector. They connect to serial port of the PC. I want to connect to the internet with TCP/IP (by sending AT commands). But i can not find any manual..! The module have some commands for TCP/IP but no explanation or examples. Those modems have no drivers, they accept only AT commands.

For example i have to set APN and IP Address which i don't understant what i should write to. It is independant of Labview but i do not know where to look for information.

If someone knows anything similar please reply.

 

0 Kudos
Message 4 of 14
(6,465 Views)
Hi Pnt,

I don't know if I can answer all your questions, but perhaps a few...

To use TCP/IP in LabVIEW, you can use the standard TCP functions (in
communications>protocols, or something). LabVIEW uses the default network
connection, and I have no idea how to choose if you have more then one.

To establish the connecion, we used a combination of the serial port (which
is the interface to the GPRS module), and a program called rasdial.

We configure a new network connection in windows, just like you would with
any other connection. The supplier of the GPRS module send us instructions
about phone numbers etc. needed to do this configuration. If you've done
this correctly, you can test your new connection simply by opening a web
page (like www.carya.nl, shaless plug). Do remove all other connections!

We use rasdial to start and stop the connection with the command line from
LabVIEW. You should also be able to have the connection start when Windows
starts up, but we needed more control.

Before we start the connection with rasdial, we enter a pin code through the
serial port. This can be done with AT commands. I think you can configure
the windows network setup to automatically do this as well, but your pin
code will be readably by anyone that can open the configuration utility...

Hope it helps,

Wiebe.


Message 5 of 14
(6,463 Views)


@Pnt wrote:

Thanks for answering Rolf.

To be more clear : i have a GSM/GPRS module (like the well known Wavecom's modules (or Falcom, Telit...)). They accept AT commands and they have a D-sub-9 serial connector. They connect to serial port of the PC. I want to connect to the internet with TCP/IP (by sending AT commands). But i can not find any manual..! The module have some commands for TCP/IP but no explanation or examples. Those modems have no drivers, they accept only AT commands.

For example i have to set APN and IP Address which i don't understant what i should write to. It is independant of Labview but i do not know where to look for information.

If someone knows anything similar please reply.



In that case what I wrote applies fully to you. You do not want to communicate with the modem from LabVIEW itself. You want to use TCP/IP and that means using the Windows socket library that the LabVIEW TCP/IP functions access. The modem then needs to be installed in the Windows system as a dialup adapter. There is really no other way to use a modem, GPRS or not, as TCP/IP communication path. Trying to implement TCP/IP,SLIP/PPP and all that in LabVIEW would be a many man year project with lots of problems and the likely chance that it will never fully work.

So get your modem to work under Windows so that you can use your browser to view some internet pages and once that works you can also use the LabVIEW TCP/IP functions to communicate with whatever is there.

Direct communication to the modem through AT commands would only make sense if you wanted to access the SMS facilities in that modem instead. Even that is not exactly trivial as I can attest to, especially if you want to make it work with more than one GSM modem type.

Your modem manufacturer should be able to give you the necessary modem initialisation string to put your modem into the right GPRS mode and your mobile phone network provider should be able to tell you the dialing number to fill in the dialup configuration. No need to do anything else!

As Wiebe explained rasdial.exe would then make it possible to connect to the internet under LabVIEW control.

All in all it's doable but I have spent many hours to get it working last time I did. A few of those were spent waiting on the line for the support persons of the mobile network provider to answer my calls and then playing the ping pong game to get a person that actually knows what a computer is and that it's actually possible to connect a modem to it to use their services.

Rolf Kalbermatter


Message Edited by rolfk on 01-09-2008 06:06 PM
Rolf Kalbermatter
My Blog
Message 6 of 14
(6,455 Views)
Thank you Rolf & Wiebe.
 
If someone knows something more... please post...
0 Kudos
Message 7 of 14
(6,430 Views)


@Pnt wrote:
Thank you Rolf & Wiebe.
 
If someone knows something more... please post...


I don't want to sound bold, but there is not much more to it. The challange will be to setup the modem right in your version of Windows, which is a typical Windows problem although one that less and less people get to deal with nowadays and to get your network provider to give you the correct information to be able to connect to their network. All in all things that we here can help even less with than more dedicated forums such as Windows support or your network providers support line. Here in the Netherlands the dialup string to be configured is different for each mobile network provider. Also there are variations depending on the modem type.

Rolf Kalbermatter
Rolf Kalbermatter
My Blog
0 Kudos
Message 8 of 14
(6,422 Views)
Rolf, i haven't find the time to look into details to those you wrote, but i think their is more..
 
My problem as i said, is that i must use AT commands (for many reasons) to have two modems to communicate. Windows and Labview stuff are only secondary.
As i wrote:
"One problem i have is that my PC is on a local network and the IP my computer has, is the local IP. The server has a different IP through we connect to the internet. Which IP I must use and how?"
"For example i have to set APN and IP Address which i don't understand what i should write to"
Also
which IP i must use to establishe a communication between two modems without any PC?
 
Irrelevant with Labview...thats why i asked , if someone knows a more propriety forum...
I have spend many-many hours searching...................
 
Rolf said
"and you will have to get that from them somehow, though it can proof a real challange to get a support person that even understands what you want to do and then is able to locate the according knowledgebase article in their database."
How true... providers have not help at all...

 
0 Kudos
Message 9 of 14
(6,419 Views)

Hi

Just Geussing, but it sounds like you need to know which IP's are available from the server or if it runs DHCP.  Then program a suitable IP address into the device in a simalar fashion to setting a static IP on a pc.  Then the module may be able to start TCPIP command from the server and eventually your pc.  There may be a way to communicate directly to the pc without going through the server, however i am unsure about that.  Think its called a bridge or something???

Trying to be helpfull but im clutching at straws here 🙂

Craig

LabVIEW 2012
0 Kudos
Message 10 of 14
(6,413 Views)