I have a old serial modem, and when i run modem_cliente.py, i get the next error:
NFO:reeprotocol:try open port 0
INFO:reeprotocol:serial port COM7 opened
INFO:reeprotocol:read thread Starting
INFO:reeprotocol:sending command ATZ
INFO:reeprotocol:iterate read thread
INFO:reeprotocol:->41:54:5a:0d
INFO:reeprotocol:<-41:54:5a:0d:0d:0a:4f:4b:0d:0a
INFO:reeprotocol:R-ATZ
INFO:reeprotocol:R-OK
INFO:reeprotocol:iterate read thread
INFO:reeprotocol:sending command AT+CBST=7,0,1
INFO:reeprotocol:iterate read thread
INFO:reeprotocol:->41:54:2b:43:42:53:54:3d:37:2c:30:2c:31:0d
INFO:reeprotocol:<-41:54:2b:43:42:53:54:3d:37:2c:30:2c:31:0d:0d:0a
INFO:reeprotocol:R-AT+CBST=7,0,1
INFO:reeprotocol:iterate read thread
INFO:reeprotocol:<-45:52:52:4f:52:0d:0a
INFO:reeprotocol:R-ERROR
After, the modem execute the dial, but when it send the command AT0, get other error:
INFO:reeprotocol:sending command ATH0
INFO:reeprotocol:->41:54:48:30:0d
INFO:reeprotocol:<-0d:0a:4e:4f:20:43:41:52:52:49:45:52:0d:0a
INFO:reeprotocol:R-ATD657872953
INFO:reeprotocol:R-NO CARRIER
INFO:reeprotocol:iterate read thread
INFO:reeprotocol:iterate read thread
Traceback (most recent call last):
File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\reeprotocol\modem.py", line 30, in connect
self.initialize_modem()
File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\reeprotocol\modem.py", line 63, in initialize_modem
self.waitforconnect()
File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\reeprotocol\modem.py", line 83, in waitforconnect
raise ConnectionError("Error Waiting for connection")
ConnectionError: Error Waiting for connection
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".\modem_cliente.py", line 75, in <module>
run_example(port, phone_number, der, dir_pm, clave_pm)
File ".\modem_cliente.py", line 20, in run_example
physical_layer.connect()
File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\reeprotocol\modem.py", line 33, in connect
raise ConnectionError(e)
ConnectionError: Error Waiting for connection
Exception in thread Thread-1:
Traceback (most recent call last):
File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\threading.py", line 916, in _bootstrap_inner
self.run()
File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\threading.py", line 864, in run
self._target(*self._args, **self._kwargs)
File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\reeprotocol\modem.py", line 132, in read_port
response = self.sport.read(16)
File "C:\Users\XXX\AppData\Local\Programs\Python\Python36-32\lib\site-packages\serial\serialwin32.py", line 269, in read
win32.ResetEvent(self._overlapped_read.hEvent)
AttributeError: 'NoneType' object has no attribute 'hEvent'