emxsys / callattendant

A python-based automated call attendant, call blocker, and voice messaging system running on a Raspberry Pi. Screens callers and block robocalls and scams with a low-cost Raspberry Pi and modem.
https://emxsys.github.io/callattendant/
MIT License
115 stars 37 forks source link

Modem _read_response method occasionally fails #128

Closed emxsys closed 3 years ago

emxsys commented 3 years ago

The following excerpt from the log appears to show how that the _read_response failed on the second ATI0 command during initialization. Yet, the failure is reported by _send_and_read on the first AT command.

Initializing Modem
Opening serial port
Looking for modem on /dev/ttyACM0
AT
b'\r\n'
b'OK\r\n'
ATI0
b''
b''
>>> _read_response timed out
Failed to detect a compatible modem on /dev/ttyACM0
Looking for modem on /dev/ttyAMA0
AT
Error in _send_and_read('AT','OK',5): Write timeout
Failed to detect a compatible modem on /dev/ttyAMA0
Warning: _open_serial_port failed: /dev/ttyprintk, [Errno 13] could not open port /dev/ttyprintk: [Errno 13] Permission denied: '/dev/ttyprintk'
Modem initialization failed!