hologram-python icon indicating copy to clipboard operation
hologram-python copied to clipboard

R410 Does not free up serial port after scanning for modems

Open DomAmato opened this issue 4 years ago • 0 comments
trafficstars

Describe the problem

When setting up the modems we scan for hardware and then send AT commands to the ports to see which responds. For one reason or another the R410, which only has 1 AT command port, seems to get tied up and does not return an OK when probing the ports.

2021-07-07 16:44:31,703 [INFO] Hologram.Network.Network (1): Detected modem NovaM
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/src/app/hologram/__main__.py", line 105, in <module>
    pinger = CarrierPinger()
  File "/usr/src/app/hologram/__main__.py", line 40, in __init__
    self.hologram = HologramCloud({}, authentication_type='totp', network='cellular')
  File "/usr/local/lib/python3.7/site-packages/Hologram/HologramCloud.py", line 70, in __init__
    network=network)
  File "/usr/local/lib/python3.7/site-packages/Hologram/CustomCloud.py", line 35, in __init__
    network=network)
  File "/usr/local/lib/python3.7/site-packages/Hologram/Cloud.py", line 36, in __init__
    self.initializeNetwork(network)
  File "/usr/local/lib/python3.7/site-packages/Hologram/Cloud.py", line 50, in initializeNetwork
    self._networkManager = NetworkManager.NetworkManager(self.event, network)
  File "/usr/local/lib/python3.7/site-packages/Hologram/Network/NetworkManager.py", line 37, in __init__
    self.network = network
  File "/usr/local/lib/python3.7/site-packages/Hologram/Network/NetworkManager.py", line 68, in network
    self._network.autodetect_modem()
  File "/usr/local/lib/python3.7/site-packages/Hologram/Network/Cellular.py", line 53, in autodetect_modem
    self.modem = dev_devices[0]
  File "/usr/local/lib/python3.7/site-packages/Hologram/Network/Cellular.py", line 243, in modem
    self._modem = self._modemHandlers[modem](event=self.event)
  File "/usr/local/lib/python3.7/site-packages/Hologram/Network/Modem/NovaM.py", line 27, in __init__
    chatscript_file=chatscript_file, event=event)
  File "/usr/local/lib/python3.7/site-packages/Hologram/Network/Modem/Nova.py", line 22, in __init__
    chatscript_file=chatscript_file, event=event)
  File "/usr/local/lib/python3.7/site-packages/Hologram/Network/Modem/Modem.py", line 79, in __init__
    self._initialize_device_name(device_name)
  File "/usr/local/lib/python3.7/site-packages/Hologram/Network/Modem/Modem.py", line 120, in _initialize_device_name
    raise SerialError('Unable to detect a usable serial port')
Exceptions.HologramError.SerialError: Unable to detect a usable serial port

Expected behavior

The modem should be properly detected

Actual behavior

Serial port is not available and prevents the modem from being able to be setup properly

Steps to reproduce the behavior

Plug in an R410 and use our SDK to try and run code with it.

System information

  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
  • Python SDK installed via PyPI or GitHub:
  • SDK version (use command below):
  • Python version:
  • Hardware (modem) model:

DomAmato avatar Jul 07 '21 18:07 DomAmato