Can't get access to /dev/ttyACM0

Discussions related to using VirtualBox on Windows hosts.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Can't get access to /dev/ttyACM0

Post by scottgus1 »

wolfrose wrote:On the white window I can get some data from the device, which mean the device is connected correctly and the mapping is right
Sounds like you have a working serial connection, and the Arduino folks can now figure out what's up.
wolfrose
Posts: 14
Joined: 15. Jul 2016, 18:44

Re: Can't get access to /dev/ttyACM0

Post by wolfrose »

It's working, I can get some data from the device, but I can't upload a code to the board.
wolfrose
Posts: 14
Joined: 15. Jul 2016, 18:44

Re: Can't get access to /dev/ttyACM0

Post by wolfrose »

I tried to run this command:
picocom.png
picocom.png (57.57 KiB) Viewed 526 times
What you think ? Is there a problem with the port ?
wolfrose
Posts: 14
Joined: 15. Jul 2016, 18:44

Re: Can't get access to /dev/ttyACM0

Post by wolfrose »

I checked also with the devices menu, and unplugged the device, then it gone, then re-plugged it and got it like this:
usb_busy.png
usb_busy.png (93.06 KiB) Viewed 522 times
wolfrose
Posts: 14
Joined: 15. Jul 2016, 18:44

Re: Can't get access to /dev/ttyACM0

Post by wolfrose »

Wait a minute !

I think I know the root problem for this. The only way I can program the board is through Dual boot Linux ubuntu, which I can get to the board through /dev/ttyACM0.

But originally, on my windows 10, I can't program the board. So in order to program the board in the VM OS, then I have to be able to program the board in the Host OS in the first place.

So I guess for now I must access the board through the Host OS then I should definitely program it in the VM OS.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: Can't get access to /dev/ttyACM0

Post by scottgus1 »

Glad you have a plan forward. Here's another idea to try:
wolfrose wrote:I checked also with the devices menu, and unplugged the device, then it gone, then re-plugged it and got it like this:
So it's a USB serial adapter! You can pump this device directly into the VM using the USB filters, see USB basics and troubleshooting. If you try this method, disable the separate Serial Port settings.
wolfrose
Posts: 14
Joined: 15. Jul 2016, 18:44

Re: Can't get access to /dev/ttyACM0

Post by wolfrose »

OK, my guess was right, the root problem is from the Host setting in the first place.

I went to Arduino board manager and updated the ESP32 boards index, and programmed the board and it worked.

Then I deleted the current ubuntu VM, and installed a new one.

Now here comes the story, I missed the current ubuntu setting and I can't login anymore, I had to delete it and install a new one. And don't run many terminal commands and focus on the necessary ones.

1. I installed Arduino IDE
2. Installed python pip3
3. Installed esptool

It turned out that I really shouldn't try to work with /dev/ttyS*, and actually my work shouldn't with the Serial ports and instead with USB. So I thought why not to try the USB method, so I did the following and it worked.

1. Enabling serial port isn't necessary and I disabled it
2. When the VM is running, go to devices, select USB, and select the USB device which is my ESP32 S3 board, and select it
3. Select USB settings, from the USB device filters, select add a new filter, and select the same USB device
4. Now I can find it in the Arduino port menu under the required name /dev/ttyACM0

I selected it and uploaded the code and it programmed !

I'm really happy I was able to solve this problem.

Thanks guys for the support.


Here are the pictures for my work:

https://i.ibb.co/MSzbyC0/1.png
https://i.ibb.co/CJmKgzF/2.png
https://i.ibb.co/Mf7xYxM/3.png
https://i.ibb.co/Mp50P7M/4.png
wolfrose
Posts: 14
Joined: 15. Jul 2016, 18:44

Re: Can't get access to /dev/ttyACM0

Post by wolfrose »

scottgus1 wrote:Glad you have a plan forward. Here's another idea to try:
So it's a USB serial adapter! You can pump this device directly into the VM using the USB filters, see USB basics and troubleshooting. If you try this method, disable the separate Serial Port settings.
Wow, what a smart analysis for the situation :)

Absolutely on point, this is exactly what happened.
Post Reply