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 #22206] avrdude: ser_setspeed(): tcsetattr() failed #123

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

[bug #22206] avrdude: ser_setspeed(): tcsetattr() failed #123

avrs-admin opened this issue Dec 10, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@avrs-admin
Copy link

avrs-admin commented Dec 10, 2021

Jonny Röker
Fri 01 Feb 2008 04:03:33 PM UTC

Hello,

after my installation on Solaris10/11 i have the follow error message:
avrdude -P /dev/cua/0 -c stk500v2 -p m32
avrdude: ser_setspeed(): tcsetattr() failedavrdude: ser_open(): can't set attributes for device "/dev/cua/0": Invalid argument

I have fixed the problem by editing ser_posix.c file as follow:

termios.c_iflag = IGNBRK;
termios.c_oflag = 0;
termios.c_lflag = 0;
termios.c_cflag = (CS8 | CREAD | CLOCAL);
termios.c_cc[VMIN]  = 1;
termios.c_cc[VTIME] = 0;

cfsetospeed(&termios, speed);
cfsetispeed(&termios, speed);
#if defined(**_sun_**)
rc = tcsetattr(fd->ifd, TCSANOW, &termios);
#else
rc = tcsetattr(fd->ifd, TCSANOW | TCSAFLUSH, &termios);
#endif
if (rc < 0) {
fprintf(stderr, "%s: 2. ser_setspeed(): tcsetattr() failed (reason=%d)\n", progname, rc);
return -errno;
}

Now it works ;))

Jonny

file #14919: ser_posix.c

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant