bugAVR Downloader/UploaDEr - Bugs: bug #22206, avrdude: ser_setspeed():...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #22206: avrdude: ser_setspeed(): tcsetattr() failed

Submitted by:  Jonny Röker <jroeker>
Submitted on:  Fri 01 Feb 2008 04:03:33 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPrivacy: Public
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Name: Jonny Röker
Open/Closed: ClosedRelease: None
Programmer hardware: Device type: 

Fri 01 Feb 2008 04:03:33 PM UTC, original submission:

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

Jonny Röker <jroeker>

 

Attached Files
file #14919:  ser_posix.c added by jroeker (10KiB - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by joerg_wunsch (Updated the item)
  • -unavailable- added by jroeker (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 02 Jul 2009 10:31:23 AM UTCjoerg_wunschStatusNone=>Fixed
      Assigned toNone=>joerg_wunsch
      Open/ClosedOpen=>Closed
    Fri 01 Feb 2008 04:03:33 PM UTCjroekerAttached File-=>Added ser_posix.c, #14919

    Back to the top


    Powered by Savane 3.1-cleanup1