Solved

Unknown parameters for serial device

Posted on 2006-07-12
5
365 Views
Last Modified: 2010-04-17
Is there any program that will detect what the baud rate etc is for a device that is connected to a serial port or do you always have to be told by the maker of the device what to set. What do people do when the parameters of the device such as baud rate are not known and a serial port program data collected is asking for the parameters to be able to view the data.
0
Comment
Question by:kempvet
5 Comments
 
LVL 15

Accepted Solution

by:
bpmurray earned 84 total points
ID: 17089610
I'd probably do the following:
If I know who the manufacturerer is, I'll see if I can find information about the device froem the manufacturer's web site.
If I can't, I'll search the web to see if I can dig up the information.
Next I'll try to phone the manufacturer.
Finally, I'll experiment: see if you can get anything through. If you get rubbish coming in, it's probably the correct speed - then start experimenting with parity and start/stop bits.
0
 
LVL 1

Assisted Solution

by:SashaP
SashaP earned 83 total points
ID: 17089758
Only if you have a hardware debugger, you can scan all of the baud rates, and find an appropriate one. Otherwise, you should guess it (or ask device manufacturer).

0
 
LVL 18

Assisted Solution

by:JoseParrot
JoseParrot earned 83 total points
ID: 17095052
Hi,

n81p are the default in almost 100% of the cases, that is, not only the baud rate is important to setup correctly. n=no parity(can be y), 8=8 bits each character (can be 7, not good...), 1 stop bit. Also if it is synchronous or asynchronous.

Assuming that the settings are correct regard the source, you can develop a function to walk around the rates, waiting for the successful rate.

An impressive complete code for Borland Builder C++ is available at
http://www.control.com/1026170362/index_html
If you use other compiler, I think it is not very difficult to port the code.

If in Unix, an interesting approach:
http://www.accu.org/acornsig/public/caugers/volume2/issue2/serialport.html

If in C#, a great tutorial on this subject is the famous Noah's:
http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=320

Jose
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Hide vba in gp 7 113
ejb stateless example 2 40
print bytes of an integer 6 21
Automate and generate Azure reports for the following items 3 34
A short article about a problem I had getting the GPS LocationListener working.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question