Sketch uploading Error in Arduino DUE Board

I am working on Arduino UDE board in Ubuntu 18.04. I've followed following link tutorial.

https://www.arduino.cc/en/Guide/ArduinoDue#:~:text=Use%20your%20Arduino%20Due%20on%20the%20Arduino%20Desktop%20IDE,the%20Arduino%20Boards%20Manager%20page.

In Ardiuno IDE I am getting as /dev/ttyS4. Also, I've gone with follwing procedure :

sudo usermod -a -G dialout username
sudo chmod a+rw /dev/ttyS4
ls -l /dev/ttyS4

This gave the following outpit

crw-rw-rw- 1 root dialout 4, 68 Jun 17 17:26 /dev/ttyS4

And I am getting following error while uploading sketch though Ardiuno IDE :

Sketch uses 11092 bytes (2%) of program storage space. Maximum is 524288 bytes.
Forcing reset using 1200bps open/close on port /dev/ttyS4
/home/user/.arduino15/packages/arduino/tools/bossac/1.6.1-arduino/bossac -i -d --port=ttyS4 -U false -e -w -v -b /tmp/arduino_build_718911/ardiuno_to_python.ino.bin -R 
Send auto-baud
No device found on ttyS4
An error occurred while uploading the sketch
Set binary mode

I've tried following solution of decreasing baudrate to 1200 by following command line mulitple times till I get output as 1200 :

stty -F /dev/ttyS4 speed 1200 cs8 -cstopb -parenb

Still I am facing the error while uploading sketch. I've tried pressing reset and erase buttons few seconds but still not getting anything. Can anyone please help

Which USB socket on the Due board did you use to connect it to your computer?

Please join with this topic here-

https://forum.arduino.cc/index.php?topic=560009.0

This person is also having the same problem, so please join this topic and there will be a relatively small number of topics in the forum.

..Arnav

Did you logout and logon again after adding yourself to the dialout group; changes will not take effect before that.

Under Linux, modem manager will also interfere. Disable it or uninstall. Can't advise exactly how as I have used Linux for a while; do a search.

One thing the Linux guide does not mention is the IDE includes arduino-linux-setup.sh which looks pretty good. I do not run install.sh because it mostly setups the GUI launcher. arduino-linux-setup.sh removes modemmanager, installs udev rules, and adds the user to various groups such as tty, dialout, uucp, and plugdev. Do not run this as root.

On Linux systems, genuine Arduino boards appear as /dev/ttyACMx where x starts at 0 and goes up by 1 for each port.

If using clone boards, the USB serial ports sometimes appear as /dev/ttyUSBx where x also starts at 0. I have never seen a USB serial device appear as /dev/ttySx.

If you do not see /dev/ttyACMx or /dev/ttyUSBx there is an excellent chance the USB cable does not have data wires. Try 3 or 4 different cables. Or try a different USB port. Many USB cables are for charge only so do not include the wires required to pass data. For examples, cables included with cellphone power banks or battery-powered Bluetooth speakers are usually charge-only cables. USB cables included with cellphones or tablets should have the data wires.

The problem is solved.
The cable that came with my Arduino was using charge only cable. I used data transfer cable and the problem was solved. this is the dumbest thing I have done. Sorry for wasting your time.

No worries. You're far from the first to have been bitten by those pesky charge-only cables. I've been a victim of them myself.

I'm glad to hear you found the problem. Thanks for taking the time to post an update with your solution. Enjoy!

pratikparwatwar:
The problem is solved.
The cable that came with my Arduino was using charge only cable. I used data transfer cable and the problem was solved. this is the dumbest thing I have done. Sorry for wasting your time.

Glad to hear, and never give up from any project you are making. Post any further problems on the forum page.
: D

.. Arnav