Additionally Marius, There are other serial tools similar to stty there are at least fgetty, and getty, that can set buad rate too. Possibly more cmdline tools as well. That I've forgotten about . . .
On Fri, Jul 8, 2016 at 8:56 AM, William Hermans <[email protected]> wrote: > > https://groups.google.com/forum/#!searchin/beagleboard/peter$20hurley$20bother/beagleboard/GC0rKe6rM0g/lrHWS_e2_poJ > > I have not tested this code my self, but Marlon said it worked fine for > him, and the code is so very simple I do not see why It would not work . . > . code is at the gist link below. > > Hi Marlon, >> >> On 07/09/2015 07:30 PM, Peter Hurley wrote:> Using the BOTHER method of >> setting a custom baud rate is roughly >> > outlined in the stackoverflow link noted by William. >> > >> > I hacked up a quick test to set this baud rate in an i/o validation >> > test jig and confirmed with a scope the signal period of ~173.6 us >> >> I understand that was probably too much information :) >> So I forked the github gist from the stackoverflow answer and cleaned it >> up. >> >> Here's what you need to do to get this working. At the console prompt on >> your beaglebone: >> >> $ # install compiler, include files, basic libraries, etc. >> $ sudo apt-get install build-essential >> >> $ # get source file from github for program that allows you to set any >> baud in linux >> $ wget >> https://gist.githubusercontent.com/peterhurley/fbace59b55d87306a5b8/raw/220cfc2cb1f2bf03ce662fe387362c3cc21b65d7/anybaud.c >> >> $ # compile program >> $ gcc -o anybaud anybaud.c >> >> $ # run program, but substitute your tty device name >> $ ./anybaud /dev/ttyS4 5760 >> >> >> Regards, >> Peter Hurley > > > On Tue, Jul 5, 2016 at 1:27 AM, <[email protected]> wrote: > >> Hi, >> >> I have a BeagleBone Black (rev. C) that runs Debian distro (3.8.13-bone70 >> Linux Kernel version), and I want to communicate via *UART *with some >> device that's using *1.5Mbaud* (*1500000 *baud). >> >> Since the serial communication Linux API (*termios.h*) don't provide >> such higher values, I'm using the *stty *utility. >> This tool allows me to set some higher baud values like: *1000000*, >> *1500000*, *2000000*, *2500000*, etc. >> >> The problem is that when I set the baud rate on some UART-associated port >> at *1500000 *baud (via *stty*), it will actually get ~*1754385 *baud (*568 >> *nanoseconds per bit, measured using an scope). >> Q1: Why is this happening? >> Q2: How can I set the exact *1500000 *baud? (+- *~5%* variation would be >> fine). >> Thanks. >> >> -- >> For more options, visit http://beagleboard.org/discuss >> --- >> You received this message because you are subscribed to the Google Groups >> "BeagleBoard" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/beagleboard/6f1caa9d-e1b6-4de1-818b-ea327f784452%40googlegroups.com >> <https://groups.google.com/d/msgid/beagleboard/6f1caa9d-e1b6-4de1-818b-ea327f784452%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > > -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/CALHSORp68YBo1iXtK0zQhLv7ZDZRTpt0DpF3OMqumyXNWvODcQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
