can Gamma MCA PWA run on Android with OpenGamma Pi-Pico board? #224
-
The MCA PWA app works fine on Windows and Linux. It installs and runs ok on a Galaxy A32 (Android 13) phone, but when I connect my OpenGamma board's Pi-Pico USB to my phone's USB-OTG port, the app does not report finding any compatible devices to connect to. Is there some setting in Android to allow this connection? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
Followup: if I run the Serial USB Terminal 1.49 app for Android, and connect the phone to the Pico I see "Allow Serial USB Terminal to access Pico?" and if I click OK then I see "Connected to CDC device" and the console terminal shows data being sent from the OpenGamma board, one line per second as expected. So at least one app is able to connect to it on my phone. Maybe there is some limitation to browser apps in particular (?) |
Beta Was this translation helpful? Give feedback.
-
Yeah... unfortunately, the Web Serial API -- which is commonly used in the app to connect to the device -- is not supported on mobile yet. I don't know of any browser that supports it. For this case, there is a fallback API called WebUSB, which allows to connect to all kinds of USB devices (includes serial devices). However, to connect to the OGD via WebUSB, I'd have to implement some additional functionality into the firmware to expose some WebUSB features (more complicated than Web Serial). As of now, for this exact reason only FTDI USB-to-Serial chips are supported, because there are already drivers for them. I have no idea why it's possible to connect to any USB device in general, but accessing a serial port is impossible. The weird quirks of web dev, I guess. And don't get me started on Firefox's approach to not support any of these new APIs out of principle... Anyways, WebUSB has been on my todo list for the Arduino sketch for quite some time now. I'll reassess how hard (and practical) it would be to finally implement it. Until then, you could use a USB-to-UART chip, like the FT232, to access the hardware UART ports on the OGD and use that. |
Beta Was this translation helpful? Give feedback.
Yes it would be nice to have, I totally agree. It's just a bit of a pain with WebUSB. I'd have to more or less redo the entire serial communication section using the Adafruit TinyUSB library for the Pico if I wanted to do it the right way. I could hack something in to output from the device like I mentioned previously, but yeah...