Welcome to OptoForums
Login
|
Sign Up
Protocols and Drivers
Started by ccarranco@ute.edu.ec at 01-30-2008 1:54 PM. Topic has 1 replies.
OptoForums
»
Product Forum
»
Protocols and D...
»
Can I communicate a PAC device whit a C# program throught sockets?
Search
Sort Posts:
Oldest to newest
Newest to oldest
01-30-2008, 1:54 PM
ccarranco@ute.edu.ec
Joined on 01-31-2008
Posts 1
Can I communicate a PAC device whit a C# program throught sockets?
I have a c# program that is listening a specifc port (192.168.1.2:11000) and I need to send a string from de PAC device. I have a communication handle configurated (tcp:192.168.1.2:11000) and I am using the next code.
conexion = OpenOutgoingCommunication(socket);
transmision = TransmitString("hello word",socket);
desconexion = CloseCommunication(socket);
But the C# aplication doesn't recive de data correctly. It is like the aplication doesn`t know about the end of the message.
Please help me.
Report
01-31-2008, 1:32 PM
rhernandez
Joined on 11-26-2003
Madrid - SPAIN
Posts 42
Re: Can I communicate a PAC device whit a C# program throught sockets?
Asuming the C# half is OK:
1. check the return codes (conexion, transmision), they may be giving you some diagnostic.
2. Wait a while before closing the socket, maybe you are not giving the PAC a chance to send the string. In fact do not close it at all, create a loop to keep sending packets for ever.
3. Sniff the tcp packets. Check this URL:
http://www.wireshark.org/
Salu2.
Report
OptoForums
»
Product Forum
»
Protocols and D...
»
Can I communicate a PAC device whit a C# program throught sockets?
(please select)
Forums Home
|- Search Forums
|- Active Topics
|- Unanswered Posts
User Options
|- Sign In
|- Join this community
|- Forgot Password
Product Forum
|- SNAP PAC Systems
|- Other Hardware Systems
|- Other Software
|- Protocols and Drivers
|- SNAP PAC Learning
|- Shoot This, Opto!
Application Forum
|- Automation, Control, Data Acquisition, and Remote Applications
|- Systems Integrator, VAR, and OptoPartner Section
|- Where's Your Opto 22?
International
|- Opto 22 in Latin America
|- Opto 22 Forum for French (Français) Speaking Customers