Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 387
  • Last Modified:

Unknown parameters for serial device

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
kempvet
Asked:
kempvet
3 Solutions
 
bpmurrayCommented:
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
 
SashaPCommented:
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
 
Jose ParrotGraphics ExpertCommented:
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!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now