Uses the suggested command picotool reboot -fa to set any connected pico board in boot select into application mode for serial discovery, and it does require a second to reboot before appearing as an available device.
The data returned by Serialport.list does not include USB bus information, so running picotool against a particular USB address is not possible unless I am able to refactor to use node-usb instead. Node-usb might actually be the more appropriate library for the use case of xs-dev, so it is worth attempting the refactor in a separate branch.
The change is working nicely, thank you. I see now that SerialPort doesn't give all the USB info, so you are limited in scanning more than one connected Pico without switching APIs. Not a big problem!
Fixes #45
Uses the suggested command
picotool reboot -fa
to set any connected pico board in boot select into application mode for serial discovery, and it does require a second to reboot before appearing as an available device.The data returned by
Serialport.list
does not include USB bus information, so runningpicotool
against a particular USB address is not possible unless I am able to refactor to use node-usb instead. Node-usb might actually be the more appropriate library for the use case ofxs-dev
, so it is worth attempting the refactor in a separate branch.