OpenWRT 18.06.0 on Arduino Yun ( AR9331 ) : ar71xx generic
it seems like the UART console ( or UART driver) in this release does not support the default 250000 baudrate that the Yun configuration uses, or it does so at the very start and then fails after a certain point ( usually around 2 seconds every time)
one can see the kernel printk up to around 2 seconds :
[ 2.140025] NET: Registered protocol family 10
[ 2.146028] NET: Registered protocol family 17
[ 2.147633] 8021q: 802.1Q VLAN Support v1.8
and then all printouts stop.
even when the bootargs for the console in u-boot are set to 115200 the kernel still reports this : [ 0.000000] Kernel command line: board=Yun mtdparts=spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro console=ttyATH0,250000 rootfstype=squashfs noinitrd
I had to edit the Yun's device configuration in /target/linux/ar71xx/image/generic.mk to : CONSOLE := ttyATH0,115200
then I get kernel messages ( and console login) on the UART ( ttyATH0 ).
is this an issue with the UART configuration or driver in the 18.xx release for the ar71xx devices ?
- it seems that only Yun uses the higher baudrate, all the others are at 115200
I've always understood the OpenWrt buadrate to be 115,000.
Baudrates should always match.
Did you submit that patch?
I'm still trying to figure out why it stopped working ( all previous versions have it at 250000 and they work ok)
18.06.0 has it at 250000 but it only seems to work for the first few seconds of the kernel boot
another issue is that even if i set the baudrate in uboot, the kernel doesnt use the u-boot supplied one
- don't know why Doghunter/ arduino used this baudrate... ( edit :to have fast comms with the attached atmega 32u4 )
This means that 115,000 didn't work before. Your software should have set the speed before when it booted.
Hopefully someone can tell you about the old version...hope the best with your patch being submitted!
it seems ( according to stty ) that 250000 is an unsupported baudrate ( after boot ie, during runtime )
and the console is set to 9600 baud at some point during the boot process ( due to 250000 being unsupported ? )
- i did an oscilloscope capture to determine the "new" / fallback baudrate of 9600 by sending 'A' to /dev/console and timing the high bit.
There is an application that's included in the build called "reset-serial" that succesfully sets the baudrate to 250000, might be that it isnt called during init..
are there different drivers / settings involved at different stages of the boot process that explains why the 250000 rate works at the start, but fails afterwards ( maybe when the kernel bootargs are applied ?)
we might have to patch the Yun config ( and its u-boot) to be inline with the other ar71xx platforms ( who all seem to be 115200 )
got this from the Yun repo :
"there's a ugly patch that needs to be backported every time that enables that baudrate (https://github.com/arduino/lede-yun/blob/master/target/linux/ar71xx/patches-4.9/821-serial-core-add-support-for-boot-console-with-arbitr.patch) .
The reconfiguration to 9600 happens because bootargs request 250000 but fails (without that patch) and falls back to the minimum supported speed (9600). "
Git repo is here :
I made the patch and the console works at 250000 baud again
Does anybody how to disable the YUN rev-2 bridge?
I want to use my own serial communication program written in C running on the OpenWRT side, with the Arduino over the UART serial port, but seems the bridge in there messing it up.
I need to remove the bridge software if i can, or disable it.