Skip to content

Patch to set baudrate in Bridge.h (Arduino Yún, Yún shield) #2904

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
mschlenker opened this issue Apr 4, 2015 · 1 comment
Closed

Patch to set baudrate in Bridge.h (Arduino Yún, Yún shield) #2904

mschlenker opened this issue Apr 4, 2015 · 1 comment
Labels
feature request A request to make an enhancement (not a bug fix) Library: Bridge The Bridge Arduino library

Comments

@mschlenker
Copy link
Contributor

The Arduino Yún currently uses an optimistic baud rate setting of 250000 that is hardcoded to busybox' inittab and the bridge library. While this works on the combination of 32u4 and AR9331 under medium loads, it fails on interrupt storms and will probably fail in the future when using the upcoming Yún shield on some 328P variants. On Uno knock offs with slightly out of range oscillators 57600 seems good, on 328P with the internal 8MHz oscillator, 19200 is reliable.

Thus I suggest starting with a small patch to allow the user to set the baud rate:

https://gist.github.com/mschlenker/03b242de9627c5e38ddc

In the mid term, the Yún shield (or anything compatible) should announce the suitable baudrate via Avahi (along with the detected MCU).

Update: Alternatively you might want to import Paul Stoffregens slightly modified version of the bridge that also allows using software serial:

https://github.com/PaulStoffregen/Bridge

@facchinm facchinm added feature request A request to make an enhancement (not a bug fix) Library: Bridge The Bridge Arduino library labels Apr 14, 2015
@ffissore
Copy link
Contributor

Patch applied. Bridge library 1.0.4 will be available through library manager in the next hour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request A request to make an enhancement (not a bug fix) Library: Bridge The Bridge Arduino library
Projects
None yet
Development

No branches or pull requests

3 participants