Skip to content
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

[bug #37697] avrdude cannot manage non-standard speeds on Mac #266

Closed
avrs-admin opened this issue Dec 10, 2021 · 4 comments
Closed

[bug #37697] avrdude cannot manage non-standard speeds on Mac #266

avrs-admin opened this issue Dec 10, 2021 · 4 comments
Labels
question Further information is requested

Comments

@avrs-admin
Copy link

Bairesport marquevichi@gmail.com
Fri 09 Nov 2012 05:37:04 AM UTC

Hi guys!

Working with an Arduino board (ATmel1284P) whose bootloader communicates at 250000bps (yeah, 250 tousand) I have found the avrdude running in OSX cannot handle non-standard speeds.

After a little research I modified the ser_posix.c, recompile it, and now it works great with any rare speed (all the credits for the libosmocore team).

If you have some time take a look to the attached ser_posix.c

Thanks for your amazing work!

file #26891: ser_posix.c
file #26898: ser_posix.diff

This issue was migrated from https://savannah.nongnu.org/bugs/?37697

@avrs-admin avrs-admin added the question Further information is requested label Dec 10, 2021
@avrs-admin
Copy link
Author

Joerg Wunsch <joerg_wunsch>
Fri 09 Nov 2012 05:50:05 AM UTC

Could you resend it as the output of a diff -u command between
the original and your modified version?

@avrs-admin
Copy link
Author

Javier Marquevichi
Fri 09 Nov 2012 01:45:23 PM UTC

Modification NOT checked under Linux. Please test it.
Thanks.

(file #26898)

@avrs-admin
Copy link
Author

Joerg Wunsch <joerg_wunsch>
Tue 10 Sep 2013 09:27:26 PM UTC

I just had a look under Darwin 11.4.2.  The manual page
TCSETATTR(3) says:

The unsigned integer
speed_t is typedef'd in the include file <termios.h>.  The value of the integer corresponds
directly to the baud rate being represented; however, the following symbolic values are
defined:

(The various Bxxx constants then directly map to the value
xxx, respectively.)

To me, this looks as if the current codebase should work as
expected.  Is it possible that recent OSX releases changed
their behaviour here?

The problem with the patch is that it only accepts OSX and
Linux (no *BSD, no Solaris), and that redefining an ioctl
within application code is basically a no-go.  Nobody would
guarantee the ioctl is still encoded the same way in the next
OS release.

@MCUdude
Copy link
Collaborator

MCUdude commented Mar 19, 2022

This issue will be resolved in #898

@dl8dtl dl8dtl closed this as completed in 99f191a Mar 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants