GUI-O does not work with RPI Pico over USB serial
-
-
@kl3m3n Hi thanks for doing this, the pico now connects ok however gui-o raises a "device write error" ?
Again this code works perfectly on nano's, esp32, etc.
-
@devmonkey Hi.
If you exit the GUI-O app and then plug in the Pico, what happens? There should be a pop-up window where you can select an app that can use the Pico device - is GUI-O shown on the list?
Can you try sending the data from Pico to GUI-O without GUI-O sending the @init string first? What happens then?
I also have an original RPi Pico and the Serial USB Terminal reports it as:
Serial device - CDC
Vendor ID:2E8A Name: Raspberry Pi
Product ID:000A Name: PicoCan you tell me, where you got the Pico? Do you have a link of the store where you've ordered it from?
But I think the quickest way to get some additional information via adb (android debug bridge). I don't know how familiar you are with this, but I will describe the procedure (I will write for Linux, but the procedure for Windows is the same once you install adb):
- Connect the device to your PC using USB cable
- Navigate to Settings -> About phone -> and tab Build number / About phone 7 times
- Go back to Settings and search for Developer options
- Scroll down to debugging and enable USB debugging and then Wireless debugging
- You should confirm authorization / pairing
- Note the <ip_address> and <port>
- On your PC, run the commands in the terminal (you need to be connected on the same WiFi network on your Android and your PC):
adb disconnect adb tcpip <port> adb connect <ip_address>:<port>
After connecting, remove the USB cable and use:
adb devices
You should see the Android device is connected.
Now run:
adb logcat > log_1.txt
This will start logging system messages to a file (named log_1.txt).
Now connect Pico to the Android device and start GUI-O. Try reproducing the issue with Pico and GUI-O. After you've finished this, press Ctrl+C in the terminal to stop the logging. Please send the file to: info.guio.app@gmail.com
Thank you.
Best regards,
Kl3m3n -
I've done some further investigation, the vid/pid is set in the core you build against (i'm was testing using arduino).
The official arduino-mbed core hardcodes pid 0x00C0. The unofficial (old) arduino-pico core defaults the pid to 0x000A.
What core did you test with or did you just compile some code with the pico sdk (i.e. not arduino) ?
Anyway I patched arduino-mbed to use 0x000A and I get the same problem, so maybe the problem is the way arduino-mbed configures the tinysub stack is somehow incompatible with your gui-o code?
I'm fairly sure you could replicate this by building a hello world app on platformio using the default arduino platform which is mbed.
FYI the board came from the RPI official shop.
-
@devmonkey Ok I will try this and get back to you.
-
@kl3m3n The other thing to check is you assert the virtual DTR line when using the CDC driver.
-
So I rebuilt the test with the arduino-pico library under arduino ide, this defaults to pid 0x000A. This now generates the same write error so the problem is GUI-O usage of the CDC driver.
I then disabled flow control in the test:
Serial.ignoreFlowControl(true)And GUI-O now works. So I think the problem is you are not asserting the DTR line when using the CDC driver.
[edit]
Since I can see no way to ignore flow control with the mbed core I will await you to change GUI-O to assert DTR. Incase it isn't obvious without DTR (DataTerminalReady) asserted no arduino will send data down a serial connection with flow control enabled, which it is when using the CDC driver. -
@devmonkey Thank you for pointing this out. I already created a fix. Testing now and will be releasing the version with the fix in the next couple of days (it usually takes Google a couple of days to review the app).
I will let you know.
Best regards,
Kl3m3n -
@devmonkey I used Arduino framework on top of mbed OS and i get pid 00C0, like you.
I have tested the GUI-O fix with Pico and it works.
Waiting for your feedback when new version of GUI-O is released (already in release process).
BR,
Kl3m3n -
@devmonkey Version 1.0.93 is out.
Regards,
Kl3m3n