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!