- Connect to a computer: Connect your USB serial device to a desktop computer running a full version of MATLAB.
- Use TCP/IP or UDP: Create a network connection (via TCP/IP or UDP) on the desktop to stream the serial data to your Android device.
- Use MATLAB Mobile: Use MATLAB Mobile on your Android device to receive and process the data over the network connection.
Can MATLAB Mobile on Android Access USB Serial Devices (Raspberry Pi Pico)?
33 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Tucker
il 5 Nov 2025 alle 1:36
Commentato: Tucker
il 18 Nov 2025 alle 2:26
Here's the hardware I'm working with:
- Kindle Fire Tablet (10" 2023 edition) with USB OTG support
- Raspberry Pi Pico (USB serial device)
- USB debugging enabled on Android via developer settings
My goal is to establish serial communication between MATLAB Mobile on Android (on my Kindle Fire tablet) and a Raspberry Pi Pico via USB connection for a university engineering project. The same code works perfectly on desktop MATLAB.
Here's what I've figured out:
- Desktop MATLAB on Windows successfully connects to the Pico using serialport()
- The Pico is powered when connected to the Kindle Fire (USB connection is functional)
- MATLAB Mobile accesses built-in Android sensors (accelerometer, camera, etc.)
My problem is that when running serialportlist on MATLAB Mobile, I only see built-in serial ports:
X = serialportlist;
disp(X)
Output: "/dev/ttyS2" "/dev/ttys0" "/dev/ttyS3" "/dev/ttyS1"
These are hardware UARTs on the Android device itself, not USB devices. When the Pico is properly detected via USB, I should see /dev/ttyACM0 or similar.
These are some extra issues I noticed.
- No USB notification appears when Pico is plugged in (unlike when plugging into PC)
- Attempting to connect gives: Unable to connect to the serialport device at port '/dev/ttyS1'
- Android terminal apps (Termux) cannot access /dev/ without root (I would be willing to root my device but would rather not)
Here are my questions:
- Does MATLAB Mobile support USB serial communication at all? The documentation only mentions built-in sensors.
- If it does support USB, are there special Android permissions or settings required?
- Are there any workarounds or alternative approaches to connect external USB hardware to MATLAB Mobile?
- Would network-based communication (TCP/UDP) be supported if I switched to a Raspberry Pi Pico W?
Any guidance would be greatly appreciated. If USB serial isn't supported, I need to know definitively so I can find something different before my project deadline.
0 Commenti
Risposta accettata
Satyam
il 17 Nov 2025 alle 7:56
Hi Tucker,
No, MATLAB Mobile on Android cannot access USB Serial devices using a serial connection. MATLAB Mobile allows you to connect to a MATLAB session running in the MathWorks Cloud. The Serial Port interface is supported by the following platforms, https://www.mathworks.com/help/matlab/import_export/troubleshooting-serial-port-interface.html
Unfortunately, it is not supported in MathWorks Cloud. So, Serial Port interface cannot be used from the MATLAB mobile. If you need to get data from a USB serial device into MATLAB Mobile, you can try out the following steps:
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Android Devices in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!