Problems to start connection with ubuntu mint and python sdk

I just started the utilization of the a Hologram Nova USB stick and a SIM card which seems activated (the dashboard shows the card as activated). We could install the python package with conda. All the parts seem well installed but when we try to initialize the connection, we receive:

(hologram_py37) optima@optima-NUC8i3BEK:~$ sudo env "PATH=$PATH" hologram network connect
        Traceback (most recent call last):
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/serial/serialposix.py", line 501, in read
            'device reports readiness to read but returned no data '
        serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
        During handling of the above exception, another exception occurred:
Traceback (most recent call last):
          File "/home/optima/miniconda3/envs/hologram_py37/bin/hologram", line 181, in <module>
            if __name__ == '__main__': main()
          File "/home/optima/miniconda3/envs/hologram_py37/bin/hologram", line 177, in main
            _command_handlers[command_selected_prefix](args)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/scripts/hologram_network.py", line 73, in run_hologram_network
            _run_handlers[args['command_selected']](args)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/scripts/hologram_network.py", line 23, in run_network_connect
            cloud = CustomCloud(None, network='cellular')
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/CustomCloud.py", line 35, in __init__
            network=network)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Cloud.py", line 36, in __init__
            self.initializeNetwork(network)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Cloud.py", line 50, in initializeNetwork
            self._networkManager = NetworkManager.NetworkManager(self.event, network)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/NetworkManager.py", line 37, in __init__
            self.network = network
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/NetworkManager.py", line 68, in network
            self._network.autodetect_modem()
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Cellular.py", line 51, in autodetect_modem
            self.modem = dev_devices[0]
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Cellular.py", line 224, in modem
            self._modem = self._modemHandlers[modem](event=self.event)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/Nova_U201.py", line 26, in __init__
            chatscript_file=chatscript_file, event=event)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/Nova.py", line 22, in __init__
            chatscript_file=chatscript_file, event=event)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/Modem.py", line 77, in __init__
            self._initialize_device_name(device_name)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/Modem.py", line 108, in _initialize_device_name
            devices = self.detect_usable_serial_port()
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/Modem.py", line 212, in detect_usable_serial_port
            include_all_ports=False)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/Modem.py", line 198, in __detect_all_serial_ports
            res = self.command('', timeout=1)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/Modem.py", line 752, in command
            retries, seteq, read, prompt, data, hide)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/Modem.py", line 506, in __command_helper
            self.result = self.process_response(cmd, timeout, hide=hide)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/Modem.py", line 432, in process_response
            response = self._readline_from_serial_port(timeout, hide=hide)
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/Modem.py", line 766, in _readline_from_serial_port
            r = self.serial_port.readline()
          File "/home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/serial/serialposix.py", line 509, in read
            raise SerialException('read failed: {}'.format(e))
        serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

The SIM card is in “live” mode:

Following these steps: I tried to use “screen” and “at” commands to check modem, but it is not working:

(hologram_py37) optima@optima-NUC8i3BEK:~$ screen /dev/ttyACM0
[screen is terminating]

Conda environment, dependencies seem to be well-installed. Also, we use -E flag with sudo to preserve the environment path…

Make sure the Ubuntu modem manager is not running. It will try to take over the modem serial port

Hi, It was this… It was too evident… I was working remotely I didn t think in the networkmanager… Now, It fails in the pppd connection:
INFO: Detected modem Nova_U201
INFO: found working port at ttyACM0
INFO: chatscript file: /home/optima/miniconda3/envs/hologram_py37/lib/python3.7/site-packages/Hologram/Network/Modem/chatscripts/default-script
INFO: Instantiated a Nova_U201 interface with device name of /dev/ttyACM0
INFO: Connecting to cell network with timeout of 200 seconds
INFO: Checking for existing PPP sessions
INFO: Starting pppd
INFO: Failed to connect to cell network
Failed to start PPP

I suppose I will need to configure APNs and other parameters… Are hologram tutorial to check it? I following this

It seems, it is necessary to edit the /etc/ppp/peers/providers like this file
https://www.emcraft.com/som/stm32f7-212/stm32f7-to-internet-over-usb-gsm-modem

Anyway, should it work well if the networkmanager detect the device?

my syslog…

Nov 19 18:18:38 optima-NUC8i3BEK chat[6308]: – got it
Nov 19 18:18:38 optima-NUC8i3BEK chat[6308]: send (AT+CGDCONT=1,“IP”,“hologram”^M)
Nov 19 18:18:38 optima-NUC8i3BEK chat[6308]: expect (OK)
Nov 19 18:18:38 optima-NUC8i3BEK chat[6308]: ^M
Nov 19 18:18:38 optima-NUC8i3BEK chat[6308]: AT+CGDCONT=1,“IP”,“hologram”^M^M
Nov 19 18:18:38 optima-NUC8i3BEK chat[6308]: OK
Nov 19 18:18:38 optima-NUC8i3BEK chat[6308]: – got it
Nov 19 18:18:38 optima-NUC8i3BEK chat[6308]: send (ATDT991#^M)
Nov 19 18:18:39 optima-NUC8i3BEK chat[6308]: expect (CONNECT)
Nov 19 18:18:39 optima-NUC8i3BEK chat[6308]: ^M
Nov 19 18:18:39 optima-NUC8i3BEK chat[6308]: ATDT
99
**1#^M^M
Nov 19 18:18:39 optima-NUC8i3BEK chat[6308]: +CME ERROR: Unspecified GPRS error^M
Nov 19 18:18:51 optima-NUC8i3BEK chat[6308]: alarm
Nov 19 18:18:51 optima-NUC8i3BEK chat[6308]: Failed
Nov 19 18:18:51 optima-NUC8i3BEK pppd[6226]: Connect script failed

If you’re using our SDK it will set the hologram APN for you. (you can see that it does it with the CGDCONT command in your log) The network manager is not compatible with our SDK though. You have to use one or the other.
The SDK is designed more for a raspberry pi running raspbian and so using it with Ubuntu can sometimes have weird problems due to the network manager and modem manager processes.
That error you are getting also looks like it’s conflicting with PPP being started by another process. It’s hard to tell though.
If all you are trying to do is start PPP then it’s fine to do it with the network manager instead. You can also start PPP directly. There are example chatscripts and peers files in here: hologram-tools/ppp at master · hologram-io/hologram-tools · GitHub

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.