Communicate directly with Nova R410


#1

Hi,

I am using the Nova 410 with an Orange Pi for Internet access. I have been able to connect aavnd move data using the Python SDK and Hologram CLI. For a variety of reasons I prefer to create a ppp session using wvdial and avoid using the Python SDK and Hologram CLI.

When I connect the Nova to the computer I can see it in output from lsusb (Vendor:Product as: 05c6:30b2), but I do not see any USB port appear. If I run the CLI command,

hologram modem reset

after it completes I see,

/dev/ttyUSB0
/dev/ttyUSB1
/dev/ttyUSB2
/dev/ttyUSB3

and I can open /dev/ttyUSB2 and interact with the Nova.

Since I want to avoid using the Python SDK and Hologram CLI, I need to understand what does the CLI do in the “hologram modem reset” command to make the /dev/ttyUSBs appear?

I’ll be most grateful for any assistance.

Regards,
Matt


#2

You need the driver loaded for it to work and the hologram sdk does that automatically. You should actually see the ports show up after running any command, not just reset. Try hologram modem sim for example.

To load the drivers on your own do:

sudo modprobe option
sudo sh -c 'echo -n 05c6 90b2 > /sys/bus/usb-serial/drivers/option1/new_id'

#3

BTW, if you just want a PPP session that’s what sudo hologram network connect does


#4

Hi Reuben,

Thanks so much for the speedy and informative reply. Yes, I realized that running any Hologram command would make the /dev/ttyUSBs appear. I just wanted to provide a concrete example. But now you have shown me how to load the drivers–that’s a great help.

I also understand that “Hologram network connect” creates a ppp session. I’ve only been working with the Nova for about a week and I have been using that command to set up ppp sessions.

I have, however, run into two problems using the CLI. First, I created shell script for setting up ppp:

hologram network disconnect -v
sleep 3
hologram modem reset 0v
sleep 5
hologram network connect -v
sleep 1

I found that without the ‘sleep’ delays the script would not work reliably (though I’m not sure what sleep values are optimal). It makes sense that delays are need to allow the CLI commands to complete.

That script usually works. The (verbose) output from the ‘network connect’ command end with:

PPP session started

followed by a prompt. However, sometimes the the script seems to hang after displaying “PPP session started” and no prompt is produced. In this case it appears no ppp session is established.

The second issue is that when I start a ppp session using the above script, I am not able to open /dev/ttyUSB2 to interact with the Nova. I want to be able to open /dev/ttyUSB2 so that I can query the Nova for various status conditions using AT commands. My main concern here is that if I cannot interact with the Nova it is difficult to determine accurately if the ppp connection has dropped.

Using the Python SDK and Hologram CLI would be fine if I could connect reliably connect and accurately determine when the ppp connection is lost (so I can initiate a reconnect).

Any advice you can offer will be much appreciated.

Regards,
Matt


#5

Hi again,

Okay, Reuben pointed out that I need to load the Nova driver and showed how. Now, I can use wvdial to set up a ppp connection.

After loading the driver, but before running wvdial, I can communicate with the Nova using:

screen /dev/ttyUSB2

I can issue AT commands a view the responses. However, once I run wvdial and set up the ppp connection I can no longer open /dev/ttyUSB2. I can use screen to try to communication on /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB3 but I get no responses.

Does anyone know if it is possible to communicate with the Nova while a ppp sessions is active?

Regards,
Matt


#6

I don’t think so, looking at the Nova documentation I think its either/or. The PPP basically says “whatever comes across this port send out” That means if you sent text like AT+CREG? it sends that across the link and interprets it as data. To send commands you will have to close the PPP connection, send the commands, and then re-setup the PPP.

All that being said, I haven’t tested this and Reuben may know better.


#7

Oh boy, this is not good. If I cannot communicate with the Nova while it is in a ppp session then how can I tell when it loses connectivity. The ppp session will continue to show up in an ifconfig long after network connectivity has failed.


#8

Yeah this is a limitation of the R410 module. Only one serial port at a time. The 3G version has multiple ports which is nice.
Your question has been discussed elsewhere on here though. I think others are sending an occasional ping to keep the connection open


#9

Hi,

Thanks for the info. My problem isn’t that the connection is closing because of inactivity (an occasional ping would in that case). I’m using the Nova as part of a GPS tracking device for school buses. The tracker sends location information every 30 seconds, so there’s no concern about the connection being closed due to inactivity. Rather, the problem is that in rural areas the bus may enter a cellular “dead zone” where the connection drops because the signal grows too weak.

The challenge is to detect that the connection has dropped. In practice, the ppp interface can remain long after the connection has dropped. Presently, I’m checking for a ppp interface. If the interface exists (in ifconfig) then the connection is assumed to be active. When the ppp interface disappears the tracker will begin trying to establish a new ppp connection. But it won’t try to establish a new connection until the ppp interface disappears.

So, the problem is to find a better way to determine the ppp connection has disappeared.

Any suggestions will be appreciated.

Regards,
Matt


closed #10

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