Skip to content

Baud rate forced to 115200 #52

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
Prior99 opened this issue Oct 2, 2018 · 2 comments
Closed

Baud rate forced to 115200 #52

Prior99 opened this issue Oct 2, 2018 · 2 comments
Labels
conclusion: invalid Issue/PR not valid

Comments

@Prior99
Copy link

Prior99 commented Oct 2, 2018

When trying to flash my Arduino Nano using this CLI, the CLI forces the Baud rate to 115200.

I invoked the CLI like this:

arduino-cli --debug upload -b arduino:avr:nano:cpu=atmega328 -p /dev/ttyUSB0 -t -v .

With this high Baud rate, the board can't get in sync with the CLI.

Using ps auxw, I was able to determine how arduino-cli calls avrdude:

/home/prior/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/bin/avrdude -C/home/prior/.arduino15/packages/arduino/tools/avrdude/6.3.0-arduino9/etc/avrdude.conf -v -patmega328p -carduino -P/dev/ttyUSB0 -b115200 -D -Uflash:w:./..arduino.avr.nano.cpu=atmega328.hex:i

Even when overriding the Baud rate in ~/.avrduderc, this has no effect.

I can successfully flash my Arduino Nano like this:

avrdude -v -patmega328p -carduino -P/dev/ttyUSB0 -b57600 -D -Uflash:w:..arduino.avr.nano.cpu=atmega328.hex:i

Could you remove the -b115200 from the commandline when invoking avrdude?
The Arduino IDE also doesn't pass that flag:

screenshot_2018-10-02_13-42-25

I suggest to spare the flag (as the default configuration file for avrdude already specifies the correct Baud rate).

@per1234
Copy link
Contributor

per1234 commented Oct 2, 2018

The avrdude configuration file is not going to have the communication speed of the bootloader on your board.

You simply need to use the correct FQBN for your old or clone Nano:

arduino:avr:nano:cpu=atmega328old

The FQBN you're using is for the new official Nanos, which have a bootloader that communicates at 115200.

@Prior99
Copy link
Author

Prior99 commented Oct 3, 2018

Thank you for your quick response.
I will try this later and close the issue.

@per1234 per1234 closed this as completed Oct 9, 2018
@per1234 per1234 added the conclusion: invalid Issue/PR not valid label Oct 9, 2018
per1234 added a commit that referenced this issue Aug 9, 2021
Add schema provided checks for library.properties ldflags field
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conclusion: invalid Issue/PR not valid
Projects
None yet
Development

No branches or pull requests

2 participants