LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DataSocket Packets Received but Read is blank

I'm running a datasocket server on a computer connected to the internet. On another computer connected to the internet I write to the computer running the server using its IP address. Although the server manager clearly shows a connection being made and packets received, when I do a datasocket read, on the server computer, I get nothing, no characters. I also do not get an error from the datasocket read. Apparently the data is coming in but the datasocket read function won't display it. I've tried turning off my firewall on the server computer but that also didn't work. Any ideas would be appreciated.
0 Kudos
Message 1 of 4
(2,847 Views)
I noticed this myself. The datasocket read and write functions do not yield an error in inthe following situation:
-it is running on the DS server machine
-the data-item specified does not exsist on the server
-the url lists the IP address of the machine instead of "localhost"

That is very odd! The DS functions act like the data items exsist!

Replace the IP address with "localhost" and all of a sudden they do yield errors. This strange behaviour only occurs whenthe server is running on the same machine.
It seems to me that you have one of the following issues:
-you specified the wrong data item names
-you write an empty string before you read a data item
-you specified the wrong permissions for the data item

Good luck

aartjan
0 Kudos
Message 2 of 4
(2,823 Views)
Hi, thanks for replying. Could you explain a little more about what you mean by specifying the wrong permissions? Do you mean permissions with respect to firewall issues or were you referring to something else?
0 Kudos
Message 3 of 4
(2,813 Views)
Before you can use the datasocket server, you have to properly configure it. For that you use the datasocket server manager. The interface of the manager is not that complicated: on the left you find two important headers: "permission groups" and "predefined data items." I never really touch the 3d header "server settings."
In "predefined data items," you specify your own data item, say "my_write_space." Do this by pressing the new item button. You wil notice on the right side that that you have to specify "read access" and "write access." It is these permissions I was talking about. You can create your own permission by pressing the "new group" button. Call it something like "project_name." On the right you have to specify who is getting permission to access the data item that this permission is specified for.
-everyhost is any incoming call
-localhost is just the computer the server is running on
-you may add the computer name or ip-address of a remote computer you want to use to communicate with the server.
To begin with I would define everyhost, so you can be sure that the permission is not the bug you are chasing anymore.

Then make sure you set this permission to the read/write access of your data item, save the settings (file>save / ctrl-s) and IMPORTANT: shutdown DS server and restart it.

then you are good to go. Good luck.
0 Kudos
Message 4 of 4
(2,799 Views)