0

I am trying to burn a .hex file on LPC2129 by connecting it through USB wire with my PC by using Flash Magic software on Ubuntu 20.04. The moment I press start on Flash Magic it shows the error below:

Unable to communicate.(in use)Ensure no other applications are using the COM Port. Try raising or lowering the baud rate.

I have tried many options like:

ln -s /dev/ttyUSB0 ~/.wine/dosdevices/com3 (or any other com port), earlier it was not creating a symbolic link and was throwing an error: ln: failed to create symbolic link '/home/lakshya/.wine/dosdevices/com3': File exists.

But when I used ln -sf /dev/ttyUSB0 ~/.wine/dosdevices/com3, it did not throw any error and executed it.

But again when I pressed the start button on Flash Magic it gave same error: Unable to communicate.(in use)Ensure no other applications are using the COM Port. Try raising or lowering the baud rate.

I have performed steps mentioned in the link below but it did not resolve: Flash Magic on Ubuntu

Please find the images below too for understanding the query: Terminal errors

Flash MAgic errors

Question: Is your userid in the same group as /dev/ttyUSB0? id;stat --format="%G" /dev/ttyUSB0?

Answer: By using the commands below:

command1-> id

Output - id=1000(lakshya) gid=1000(lakshya) groups=1000(lakshya),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare)

command2-> stat --format="%G" /dev/ttyUSB0

Output - dialout

4
  • Is your userid in the same group as /dev/ttyUSB0? id;stat --format="%G" /dev/ttyUSB0
    – waltinator
    Oct 1, 2020 at 22:29
  • @waltinator by using this command 'id' i am getting: id=1000(lakshya) gid=1000(lakshya) groups=1000(lakshya),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),120(lpadmin),131(lxd),132(sambashare) and after using 'stat --format="%G" /dev/ttyUSB0' command i have got an output as 'dialout'. Oct 2, 2020 at 12:11
  • 1
    Please edit your post to add new information, properly formatted. Information added via comments is hard for you to format, hard for us to read, ignored by AskUbuntu's indexing system, and ignored by future readers. Please click edit and add that vital information to your question so all the facts we need are in the question. Please don't use Add Comment, since that's our uplink to you. All facts about your system should go in the Question with edit. Once you do that, I'll offer a suggestion.
    – waltinator
    Oct 2, 2020 at 13:08
  • @waltinator Kindly suggest if its fine now? Oct 3, 2020 at 14:47

1 Answer 1

0

You need to add your userid to the dialout group. An ls -l /dev/ttyUSB0 will show that group members have rw- access.

Read man adduser, and do

sudo adduser $USER dialout

Once that is done, either use newgrp dialout (Read man newgrp) to create a process with the new group, or logout and login again to endow all your processes with the new group.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .