So I’ve been working around the edges of this question of dead-simple (noob-level) file transfer over the Hologram Nova cellular system for the last week or so.
See my other threads here:
Basically I wanted a way to communicate with a remote Pi + NovaM to send/receive complex information, or images. Below is one way to get it done, without getting into a lot of scripting or AT commands. Obvious this won’t work for everyone’s needs, and maybe not for me in the end, but it’s a place to start. I will add to this thread as I figure out other methods. The goal here is to leave a paper trail for myself, and instructions for others who are just beginning and in over their heads.
Use SpaceBridge and WinSCP to send/receive files over Cellular
My setup is as follows:
Pi 3B+ running latest Raspbian, and latest build of Hologram CLI and python libraries. (After getting Raspbian installed/updated, see “Install the Hologram CLI” here: https://hologram.io/docs/reference/nova/user-manual/#hologram-python-sdk-and-hologram-cli
On a windows laptop, I have PuTTy installed.
Both the laptop and pi are on the same wifi network. My Pi is headless, with no monitor/keyboard.
Set up your Pi’s wifi and ready it for SSH. You can do this headless.
Discover the IP address of the Pi on your network. You can look this up in your router’s settings page (maybe type 192.168.1.1 in your browser) under attached devices, or, if you’re working off a mobile hotspot, like I am:
- download a network scanner app to your phone,
- connect the Pi to your hotspot,
- and scan your network to look up the pi’s IP address.
On PuTTy, open an SSH terminal and sign into your Pi. Type in your Pi’s IP address, and port number 22, select SSH, and click open. You should see your Pi’s login screen. Login. If you haven’t already, install the hologram libraries (see link above for step by step instructions).
sudo hologram network connect -v to start a PPP connection. This may be easier said than done. For me, it took disabling the NB-IoT radio. I will add links here later.
You can check if a PPP connection has been made using
sudo ifconfig. You will see “PPP0” listed with the other connections.
Once your connection is up, download and install WinSCP and SpaceBridge on your laptop.
WinSCP is a SCP (secure copy protocol) is a protocol for filesharing over SSH connections. During download, I selected side-by-side (remote/local directories) as default.
SpaceBridge is a Hologram program for establishing a secure “tunneled” connection to your NovaM.
On the dashboard, select your sim card, and under configurations, enable tunneling.
Then open SpaceBridge and follow the instructions “Establishing a Connection with the SpaceBridge Client” available here:
After entering your API key, and port numbers, click done and start the tunnel connection.
Open WinSCP. Under connection settings (which should be open on startup), select SCP as the protocol. Type in 127.0.0.1 as the IP address, and 5000 (or whatever you chose in SpaceBridge) as the port number. Enter your Pi login credentials. In advanced options/connection, I also unchecked “optimize connection buffer size” and increased “server response timeout” to 200 seconds. Click okay. WinSCP will attempt a connection. When it connects, it will show the file directory of the Pi in the right pane, and the file directory of your local machine on the left. You can now select files to upload or download over the cellular connection.
To make sure this was truly working only over the cellular connection, I created a small image, uploaded it to the pi over WinSCP with my default wifi connection (using the Pi’s IP address on my local network and “22” for the port number), then closed winSCP. I then SSHed back into the Pi on PuTTy over the wifi, changed the filename using
sudo mv old_name.png new_name.png, then closed the PuTTy connection. Finally, I logged back in with WinSCP using the SpaceBridge connection at 127.0.0.1 on port 5000, and downloaded the renamed image back to my laptop using the cellular tunneled connection.
If you didn’t need file transfer, you can also do this method without WinSCP, just using PuTTy and SpaceBridge. When configuring PuTTy, use the 127.0.0.1 address with port 5000. You may want to change the connection timeout, possibly in Connection Settings using the “seconds between keepalives” variable. In PuTTy, you will be able to login and access the CLI of the Pi.
. . .
Obviously a lot of this could be coded out in python scripts or AT commands, at both ends of the connection. But this at least proved to me that NovaM will work for this type of file transfer, and will be a starting point for future projects.
Hope this helps you out.