Can MATLAB Mobile on Android Access USB Serial Devices (Raspberry Pi Pico)?
15 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で MATLAB Support Package for Raspberry Pi Hardware についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!