Tagged: python uc20
17 December 2019 at 1:23 PM #73878
I’m trying to use the Sixfab Python library to send AT commands to a Quectel UC20 attached to the Sixfab 3G/4G<E Base HAT.
The modem is working and powered on, and I can send AT commands using minicom via /dev/ttyUSB2:123456789101112atiQuectelUC20Revision: UC20GQCR03A16E1GOKat+csq+CSQ: 6,99OKat+cops?+COPS: 0,0,"T-Mobile Hologram",2
When I try to use the Python library, every AT command I send is failing with the following stacktrace:1234567891011121314Sixfab Raspberry Pi Cellular IoT Application Shield Class initialized!Traceback (most recent call last):File "ati.py", line 5, in <module>node.sendATComm("ATI","OK\r\n")File "/usr/local/lib/python3.7/dist-packages/cellulariot/cellulariot.py", line 215, in sendATCommself.sendATCommOnce(command)File "/usr/local/lib/python3.7/dist-packages/cellulariot/cellulariot.py", line 181, in sendATCommOnceser.open()File "/usr/local/lib/python3.7/dist-packages/serial/serialposix.py", line 286, in openself._update_dtr_state()File "/usr/local/lib/python3.7/dist-packages/serial/serialposix.py", line 634, in _update_dtr_statefcntl.ioctl(self.fd, TIOCMBIS, TIOCM_DTR_str)BrokenPipeError: [Errno 32] Broken pipe/usr/local/lib/python3.7/dist-packages/cellulariot/cellulariot.py:127: RuntimeWarning: No channels have been set up yet - nothing to clean up! Try cleaning up at the end of your program instead!
My test script consists of the following:12345#!/usr/bin/python3from cellulariot import cellulariotnode = cellulariot.CellularIoTApp(serial_port="/dev/ttyUSB2")node.sendATComm("ATI","OK\r\n")
Any ideas?17 December 2019 at 3:09 PM #73894
I’ve also tried using pyserial directly, like this example: https://sixfab.com/gps-tracker-with-3g-4glte-shield/ and I’m seeing the same Broken Pipe error.17 December 2019 at 3:58 PM #73897
The UC20 seems to require hardware flow control. I’ve created a PR to the Sixfab library to allow users to enable it if needed. https://github.com/sixfab/Sixfab_RPi_CellularIoT_App_Shield/pull/132 January 2020 at 10:23 AM #77368ensarModerator
Thank you for your interest and feedback.
We will consider your pull request.
Have a nice day.
- You must be logged in to reply to this topic.