Upcoming maintenance
Dear Customers and Partners.
This website will be undergoing scheduled maintenance on June 14, 2023. Please be aware there may be disruption to the developer portal website and associated services during the scheduled maintenance period.
This upgrade is essential to ensure the continued performance, reliability, and security of Developer World.
We apologize for any inconvenience.
SPresense SDK on WSL2 ?
-
@KamilTomaszewski , Thank you very much for your reply.
Using the setup from the Microsoft link on how to access USB devices from WSL2, I encounter a problem. The 'lsusb' command on the Ubuntu distribution that runs on WSL2, the Spresence board indeed appears as :
Bus 001 Device 003: ID 10c4:ea60 Silicon Labs CP210x UART Bridge
While the PowerShell "usbipd wsl list" command shows that it binds to COM5 as :
1-1 10c4:ea60 Silicon Labs CP210x USB to UART Bridge (COM5) Attached - Ubuntu
But unfortunately, I find no corresponding entry on /dev/ttyS5 on the WSL2 Ubuntu side for me to flash the firmware on the board.
Or is the board seen through another /dev/tty... ?
Do you have any suggestion about what I should do ?
Best regards
-
It turns out that the USB device is attached to ttyUSB0, but I still can't flash the firmware as the port can't be opened, complaining that the file is not found...
/spresense/sdk$ lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=vhci_hcd/8p, 480M
|__ Port 1: Dev 4, If 0, Class=Vendor Specific Class, Driver=cp210x, 12M*/spresense/sdk$ dmesg | grep "cp21.attached"
[ 1322.831808] usb 1-1: cp210x converter now attached to ttyUSB0
[ 1371.440873] usb 1-1: cp210x converter now attached to ttyUSB0
[10484.027067] usb 1-1: cp210x converter now attached to ttyUSB0/spresense/sdk$ tools/flash.sh -c /dev/ttyUSB0 nuttx.spk
Cannot open port : /dev/ttyUSB0
could not open port '/dev/ttyUSB0': FileNotFoundError(2, '...', None, 3)/spresense/sdk$ ls -l /dev/ttyUSB0
crw------- 1 root root 188, 0 Jun 24 11:40 /dev/ttyUSB0Additional comment : the 'flash' command does not work as sudo either, and I added my user name to the 'dialout' group.
-
@jln-0 If you're using Windows WSL2, the port will usually be something like COM7. I use Arduino IDE on Windows to check for my spresense's port.
-
@rauna Thank you very much for your kind reply.
The board appears as /dev/ttyUSB0 -
@jln-0 I'm sure you have already solved this problem, but in wsl2, you can access /dev/tty by using the sudo command.
$ sudo ./tools/flash.sh -c /dev/ttyUSB0 nuttx.spk $ sudo screen /dev/ttyUSB0
-
-
Hi @CamilaSouza Unfortunately, I still get the following error message when trying to flash the firmware using command "sudo ./tools/flash.sh -c /dev/ttyUSB0 nuttx.spk" :
Cannot open port : /dev/ttyUSB0
could not open port '/dev/ttyUSB0': FileNotFoundError(2,... -
@jln-0 Have you tried the solutions described here?https://forum.developer.sony.com/topic/773/developing-with-spresense-sdk-on-wsl2
-
Nice catch, @gyps !
-
@gyps Thank you very much, it works !