Unable to upload to arduino Uno - ioctl("TIOCMSET"): / avrdude: not in sync

Hi,

I have been trying to use a pulse sensor from Sparkfun to connect to my arduino Uno. Unfortulantely, I am not able to upload my code. Somtimes if I am lucky and I reset/unplug/kill the avrdude process or any of these combinations (non stipulated one, its almost random), I am able to upload the code.

The string of error that I get: ioctl("TIOCMSET"): Protocol error ioctl("TIOCMSET"): Protocol error avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00 avrdude:_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00 ioctl("TIOCMSET"): Protocol error

Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

I would really appreciate it if some one could help me out with this.

Thanks

I am having this same trouble. Were you ever able to figure it out?

 [color=#502000]TIOCMSET const int *[/color][color=#006000]argp[/color]
              Set the status of modem bits.

Looks to me like your serial driver doesn't support pulsing the DTR line and that is what causes the Arduino to auto-reset when uploading. Try holding down the reset button, starting an upload, and releasing the reset button when the RX LED blinks.

Sorry for ressurrecting the post, but I'm having the same problem. When I try to upload the exemple basic>blink from arduino IDE to my arduino uno board I get:

" ioctl("TIOCMSET"): Protocol error ioctl("TIOCMSET"): Protocol error avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x00 avrdude:_recv(): programmer is not responding avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x00 avrdude: stk500_recv(): programmer is not responding avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x00 ioctl("TIOCMSET"): Protocol error Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions. "

Some info: Arduino IDE version: 1.8.3 My specs: 2.26GHz Intel Core i3 M350 processor, 4 GB RAM My OS: 4.4.0-91-generic #114-Ubuntu SMP Tue Aug 8 11:56:56 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

What I've tried so far: - add the tty and dialout to the user - chmod 777 /dev/ttyACM1 (my board is connected here) - disabled the modemanager as suggested here - Use the 1.6.2 version of Arduino IDE - use a different cable - run IDE as root - holding down the reset button, starting an upload, and releasing the reset button when the RX LED blinks: the RX led on my board don't blinks - uploading the same sketch to an arduino duemilanove board: It uploads normally and works perfectly, but the port it uses it's a different one (/dev/ttyUSB0) probably because duemilanove is an older board

It's looks like a problem with the /dev/ttyACM1 port. I've already used this same board two years back in a different laptop and it worked normally (uploaded this and other sketches normally).

Do anyone have an idea on how to fix this problem?

Thanks, Mateus

Okay, the problem is solved and I might have figured out what happed (I'll write it down here for documentation purposes).

When I added the tty and dialout to the user, I logged out and logged in as suggested here and the sketch still wouldn't upload. Now, I have rebooted the system and tried to upload again and it worked. Now I can upload sketches to the arduino uno normally. My theory is that adding a user to the dialout group only works after rebooting.