Serial Communication [modified]
-
This is the article which i found on cp about serial communication. I know it is quite simple if i am communicating between 2 computers but what if i am communicating with a hardware instead of computer? I have been told that it is the same between communication with computer or hardware but i just dun quite understand the concept. Current i have part of the code in my server pc and the other part i do not know how to apply. I dun seem to be able to open the port and send command to my hardware. Have anyone done a similar project and please advise me what to do? http://www.codeproject.com/KB/system/Serialport_COM.aspx[^][^]
modified on Monday, January 19, 2009 8:24 PM
-
This is the article which i found on cp about serial communication. I know it is quite simple if i am communicating between 2 computers but what if i am communicating with a hardware instead of computer? I have been told that it is the same between communication with computer or hardware but i just dun quite understand the concept. Current i have part of the code in my server pc and the other part i do not know how to apply. I dun seem to be able to open the port and send command to my hardware. Have anyone done a similar project and please advise me what to do? http://www.codeproject.com/KB/system/Serialport_COM.aspx[^][^]
modified on Monday, January 19, 2009 8:24 PM
You've been told before. There is NO DIFFERENCE between talking to another computer and talking to a hardware device when communicating over a serial port. If you know how it works talking to another computer, the EXACT same concepts apply when talking to hardware.
Subjugate wrote:
I dun seem to be able to open the port and send command to my hardware.
Then it would appear that you don't have the communication paraters correct, like baud rate, stop bits, parity, handshaking, ...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
You've been told before. There is NO DIFFERENCE between talking to another computer and talking to a hardware device when communicating over a serial port. If you know how it works talking to another computer, the EXACT same concepts apply when talking to hardware.
Subjugate wrote:
I dun seem to be able to open the port and send command to my hardware.
Then it would appear that you don't have the communication paraters correct, like baud rate, stop bits, parity, handshaking, ...
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Yes.., There is no difference between taking to another computer and taking to a hardware device. Checkout the settings(buadrate,parity,flow control....) of your hardware device, is responding..., then only u can get correct response for your command...
Rajesh B --> A Poor Workman Blames His Tools <--
-
Yes.., There is no difference between taking to another computer and taking to a hardware device. Checkout the settings(buadrate,parity,flow control....) of your hardware device, is responding..., then only u can get correct response for your command...
Rajesh B --> A Poor Workman Blames His Tools <--
So...why are you telling me this and not the OP? :| I already know how it works.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
Yes.., There is no difference between taking to another computer and taking to a hardware device. Checkout the settings(buadrate,parity,flow control....) of your hardware device, is responding..., then only u can get correct response for your command...
Rajesh B --> A Poor Workman Blames His Tools <--
I did already done the confirmation of the setting but still no reaction from my hardware. As i saw in the article i found on cp, there is another set of code suppose to be at the other pc so i wonder where should tis set of code be at if it is for hardware. Cant possibly put the code in a hardware. :confused:
-
I did already done the confirmation of the setting but still no reaction from my hardware. As i saw in the article i found on cp, there is another set of code suppose to be at the other pc so i wonder where should tis set of code be at if it is for hardware. Cant possibly put the code in a hardware. :confused:
The other "set of code" on the other PC is there so there's something that listens to it's serial port and can respond to requests comming from it. This is already built into the device you're trying to talk to! Seriously, how long have you been using computers??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008 -
The other "set of code" on the other PC is there so there's something that listens to it's serial port and can respond to requests comming from it. This is already built into the device you're trying to talk to! Seriously, how long have you been using computers??
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008Sorry for being so noob. Thanks anyway i got my command line to my hardware already. But the question now is i was unable to see the reply. How can i get the reply to be posted at a list box? Which means i need to display the reply from the port to list box.