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: 

Sending ASCII commands by tcp to wireless device

Hi to all. I have some AVL (automatic vehicle location) devices. I work with them through GPRS by USB modem (Compass 885). I read data from them through UDP port and everything works fine. But I have to send a commands to the devices by TCP and I don't know how. All of examples are not helped. Ping test to IP of device is OK.  Hope to your help.

0 Kudos
Message 1 of 14
(4,093 Views)

Did you try to use TCP functions at Data Communication > Protocols > TCP pallete?

You should have no problems to write if you set everything properly.

Try to do something and post your results.

 

Regards.

 

Mondoni
0 Kudos
Message 2 of 14
(4,065 Views)

Hi Paulo. Thank you for wanting to help. Are you talking about a similar scheme?

I have not a port number of device. What do you think can I  do?

 

TCP.png

0 Kudos
Message 3 of 14
(4,047 Views)

Mikosim, I'm a bit confused. I mean, is that possible to send information to a device without a port?

If you are working with data, I suppose this device handles ports to receive and transmit information - just like in TCP/IP for websites, PCs, etc.

I suggest that you look up at the manual of your product to see if it has some default port for communication.

 

Could you give more details about what you are trying to do? Just to check if we're with the same line of sight. So far, my ideas about your application are obscure. 🙂

 

Best regards

Mondoni
0 Kudos
Message 4 of 14
(4,039 Views)

Mikosim,

Yes that should work.  BUT, you do need a port.  All TCP connections have a port for the source and a port for the destination.  You need to find out what port the AVL is listening on.  This should be documented in the communication protocol.

 

THere are also tools (nmap) which will probe all ports on an address and report any that the device will acknowledge.  This is useful for reverse engineering a protocol without documentation.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 5 of 14
(4,031 Views)

Hi sth. You speak about NMAP tools:

"THere are also tools (nmap) which will probe all ports on an address and report any that the device will acknowledge.  This is useful for reverse engineering a protocol without documentation."

Were are they? End how to use they? Were there is an example of their use?

0 Kudos
Message 6 of 14
(4,003 Views)

You can find a lot about nmap on their official website. The more you dig, the more you know. This is a powerful tool.

http://nmap.org/

 

 

Mondoni
0 Kudos
Message 7 of 14
(3,994 Views)

You have the pointer to nmap.  But you could just try any search engine for more info.  That is now in your task to deal with the protocol for communication.  We can point you to how to use LV, how to find out certain information but you need to do the specific work for your task.  What port your AVL is on, is information specific to your problem.  It was a design choice by whoever wrote the software/firmware for the AVL device.

 

nmap is a powerful tool and with great power comes great responsibility.  It is used by hackers and network administrators.  The full use of nmap is beyond this discussion group but you can use the link for more information.  This is not as good a solution as asking the designers for their communication protocol.  It is designed for communication and so it would be absurd not to publish it in a manual or keep it secret.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 8 of 14
(3,991 Views)

HI. When the VI runing i have an error num 63:

 

LabVIEW:  Serial port receive buffer overflow.
=========================
LabVIEW:  The network connection was refused by the server.

 

Why?

0 Kudos
Message 9 of 14
(3,970 Views)

I assume this is during your network connection.  Unless you connect to an active address on a port that is "open" it wil be rejected.  This could be because you are trying the wrong port, the wrong address, or there is a firewall between the devices that is blocking the connection.  The error is sort of exactly what it says.  The connection attempt failed due to network problems.

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 10 of 14
(3,958 Views)