LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending ASCII commands by tcp to wireless device

OK as a first step you need to get the documentation for the device. If you are supposed to connect to it ia TCP and send a command, the server port needs to be known. No way around this. If you have another program (not LabVIEW) that can send command to the device, get a packet sniffer such as wireshark (free) and watch how the other program does it. If you are confused by the packet trace, attach it here. Use a filter to only look at communications with 10.15.23.5.

 

Let's look at your image:

 

OK, so you have the IP address.  Youi definitely need the port too (why do you wire a 9000 if you know it is incorrect? there are about 64k wrong ports and only one correct one. Guessing is out of the question!)

 

That's where wireshark comes in if you don't have any documentation. It is probably in the same chapter where you found the format of the command message. Are you really sure it says TCP? What else does it say?

 

Nmap might give you quite a collection of ports, depending on the features of the device (it might have a web interface, ftp, and some others)

 

Do you have the exact make and model of the device? Maybe there is documentation online.

 

Of course it makes no sense to send the same string over and over, as fast as the connection allows without even checking for errors and without even checking if TCP open actually succeeded. Leave the while loop out for now.

 

 

0 Kudos
Message 11 of 14
(497 Views)

Hi. Here is result of n-map scanning:

nNMap resalt.pngAll ports are closed. The device is working with ORAClE. This mean that I do not get?

0 Kudos
Message 12 of 14
(488 Views)

Hi ! On the image used a random port number, only for clarity. In documentation of the device is no description of the principle of sending commands. There is a list of commands only. On the one hand, the manufacter (Time Zone, device: AVL 08) confirm that sending commands to the device by TCP is possible, on other hand, the sending of commans avilable only from company server. I don't have another programm that are speaking with the device.

0 Kudos
Message 13 of 14
(484 Views)

Mikosim,

 

If all ports are closed then TCP connections are not possible.  So something is up.   This may be a firewall issue if commands can be sent from another computer.  If all ports are blocked then this may be part of the local workstation firewall rules.  Try temporarily disabling the workstation firewall, test the ports again and then re-enable the firewall.

 

I am not sure what you mean by the device is working with Oracle??  Oracle is a database program and not a communication progam.  If there is communication from Oracle then the script in Oracle must have a port number.

 

Can you use the company provided software to coummicate to the device from you workstation?  If so then a Wireshark trace will tell you what ports are being used as Christian suggested.

 

If the documentation does not tell you the port number, call the manufacturer support line and ask them which port is needed for communication.  That should not be a secret.

 

LabVIEW ChampionLabVIEW Channel Wires

0 Kudos
Message 14 of 14
(473 Views)