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


@Pnt wrote:
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...

 


Believe me for IP communication over a GPRS modem you do NOT want to program the modems on the AT command level yourself. Unless you have a very deep TCP/IP protocol understanding together with many many man months of professional development time of the level of system programmer. I do know as I studied the TCP/IP protocol to some extend.

Windows (and every other modern OS) already can do that so don't try to invent the wheel especially when it is such a complicated wheel as this one.

Or maybe you want to do a point to point connection between two computers. If you insist on using TCP/IP, a direct GPRS modem connection is not feasable. A GPRS modem is not meant to operate as a server interface, for that you need quite different network termination hardware, that is typically present in the GPRS switch stations of mobile network providers. Those interfaces cost a lot more than a single modem and require a whole set of extra infrastructure to operate the way they do. Your two GPRS modem will have to connect to a network service provider somehow. They can't talk directly to each other. For that to work you would need WiFi or other similar wireless network gateways that can operate in client to client communication directly.

Rolf Kalbermatter


Message Edited by rolfk on 01-10-2008 07:21 PM
Rolf Kalbermatter
My Blog
0 Kudos
Message 11 of 14
(2,402 Views)

Dear Rolfk,

I have central location with GPRS modem and PC. At remote locations there are GPRS routers transparent to Modbus and Modbus device. For GPRS I have coorporate APN.

I make dial-up connection from PC to GPRS modem and I can ping remote locations. I want to make LabVIEW application to read data from remote locations. So, I have to encapsulate Modbus into TCP/IP. How to do that? I can't open TCP Connection. What's the port number for LabVIEW function TCP Open Connection?

0 Kudos
Message 12 of 14
(2,230 Views)

I think I know exactly what you need. You want to create a TCP server with LabView where you open a port on a PC that is connected to an internet network. You have to configure a port redirection that points to the local computer that has the TCP server. on the other hand, use the modem to connect it to the public IP of the modem where the server is to make a direct bridge to the GPRS modem to later control some device such as a PLC or some machine that uses the communication protocol as Modbus or equivalent when connected to the serial port of the modem. either by RS485 or RS232

0 Kudos
Message 13 of 14
(412 Views)
Solution
Accepted by rolfk

You resurrected a 12 year old thread! And didn’t add significant information. From his last message it appears that he had the TCP/IP connectivity through his WAN working (or maybe through GPRS, the explanation isn’t crystal clear which added to the difficulties). At least he could ping his remote system.

There seems to have been (past tense after 12 year is quite possible) a Modbus system on the remote side. It’s not.fully clear if this was Modbus TCP but if it would be, I couldn’t understand where the problem was.
If it was serial Modbus you need to have a serial port remote access solution. The easiest solution by far would be a serial to TCP converter from Moxa or similar. If there is a possibility to install software on the remote side you could also install NI-VISA on there and enable NI-VISA server and access that port from another computer over the network through NI-VISA.

GPRS as a solution is pretty much obsolete nowadays and in this specific situation I never fully understood why he thought he would need to program it directly through AT commands.

Rolf Kalbermatter
My Blog
0 Kudos
Message 14 of 14
(402 Views)