-
Notifications
You must be signed in to change notification settings - Fork 13
Talking with a "modem" #4
Comments
So, it is already a long time since I had time to experiment. :-) and I currently do not have anything easy to test at hand. What you have to keep in mind is that on Termux/Android, USB access only works as callbacks. That means the Termux cli call requires a program that is called with the USB file descriptor. The sh files are mostly some setup/multiplexing stuff, not absolutely required. A plain python script should work, I think. But again, a long time ago. And I used a virtual env, so the wrapper scripts were required. See the You should really try to get the examples working, see the links in the repo readme. If they work, then there might still be something with the device and drivers. For example I never got the |
I’m interested in writing a similar bridge for some ham radio software modems so that I can connect a ham radio via USB to Termux running software modems (Winelink script: Modems-Termux-Py-OTG-Radio). Did you make any progress with your modem-otg-py-termux script? |
I have a device connected to my android tablet... when I run the termux-usb -l command, I do get /dev/bus/usb/002/002 back.
So I'm connected... all seems well.
This device uses 9600 baud, and communicates via AT commands.. like a modem. So I'm trying to write a simply python script in termux using termux_usb_python to send AT commands to the device, and read what it says back out from the device.
In the usbtest_rw1.py example, I do see where CP210xSerial is used with the baudRate option....
But for the life of me I'm having a hard time getting a simple linear python script to send "AT\r\n" to the modem, and have it say "OK" back to me.
While this may seem super trivial to someone who has done it here... is there any way I can get some ideas (without using a .sh file) that I can just send and receive that text over the USB port with this library?
Thank you so much for any time you spend... I know everyone is busy. I've just spent hours trying to do this both interactively and piecing scripts together.. and I'm just not able to see where to go. I basically need to send text lines and get text line back. It's that simple.
Thank you!
Ken
The text was updated successfully, but these errors were encountered: