View Single Post
  #1  
Old 04-06-2005, 22:43
AgentSmith
 
Posts: n/a
Writing 4 bytes to COM Port

Hello all,

I have a device that has 8 switches (relay). This device has controller which is linked to COM Port. In order to manipulate switches first the device needs to be intialized with 4 bytes: 1 1 0 and the fourth is XOR of these first three, (0). So I need to send 1 1 0 0 in order to intialize this device.

I've tried to open com port and write this as characthers:

"00000001 00000001 00000000 00000000" - (no space between)

There is also some kind of driver, a monitor tool that monitors traffic between PC and the device. This monitor after sending above string says that only 2 bytes are sent. The device will not respond until 4 bytes are sent.

Does anybody have any clues that can be useful? I've searched everywhere but nothing to solve it, so I am trying my luck here

Thanks in advance, asmith

[added]: tried with c and yes it is char type

Last edited by AgentSmith; 04-06-2005 at 23:33.
Reply With Quote