Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Unknown parameters for serial device

Posted on 2006-07-12
5
Medium Priority
?
379 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 15

Accepted Solution

by:
bpmurray earned 336 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 332 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:Jose Parrot
Jose Parrot earned 332 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

The top UI technologies you need to be aware of

An important part of the job as a front-end developer is to stay up to date and in contact with new tools, trends and workflows. That’s why you cannot miss this upcoming webinar to explore the latest trends in UI technologies!

Question has a verified solution.

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

Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Simple Linear Regression

721 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