Reputation: 3025
Ok let me give you the details of the software and applications i am using:
My device is a simple data transmitter device which gets data inputted by the user like, name, age, gender and then it is transmitted to the PC software.
I already have the source code of the PC software which is in C#
and i am a VB guy. I have gone through many tutorials on internet to learn serial port communication but i think maybe i am unable to get the logic or maybe that was not the right thing for my project. SO i need help from you people.
i have searched a lot on internet and found few resources which explains, how exactly i can communicate with serial ports, but none of these are working for me:
The previous software use to scan all available IO
PORTS
and Evaluates the incoming data from the serial ports. Finally, it detects the device on the basis of this data.
The Software is set for BaudRate = 19200
DataBits = 8
StopBits = StopBits.One
Encoding = Encoding.GetEncoding(1252)
DataReceived += new SerialDataReceivedEventHandler(portDataReceived)
However with the tutorials i understood the terminologies specified here, but how to exactly communicate with the device and to check which port is the correct one is still a question.
So what i understood is required for me is to:
What i need is an insight of you people on exactly what resource is required as i have been searching and reading for a long time and could not able to get exactly what i am looking for. Maybe i am unaware with the logic and the topic, so if the right resource is visible still i am ignoring it. Its just that i am a newbie in Serial Port communications.
Also, maybe there are many other question that you may require from my side to help me with this question and i have not produced you. So please let me know what all information you need from me, i will be try to get you if i can.
EDIT-1
I have used an Port Monitoring Software
which gave me this raw data and it thrilled me...
Upvotes: 0
Views: 6563
Reputation: 163282
What you propose (opening each port and attempting communication) is exactly what you need to do.
There is no standard way of doing this. It depends on the device. Nobody can tell you how to do this without knowing the protocol used to communicate with your device. There is nothing special about a serial port... it just sends and receives data. The protocol implementation is up to you.
Upvotes: 3