Mysteries of spacebridge

I have been testing the spacebridge facility as it seems to meet the demands of a product I am looking to launch. My use case is to tunnel some rest “posts” to a server running on a RPI. The docs show that I should use “sudo hologram network connect” on the RPI to receive the posts. This works fine. I have also experimented with using the “sudo hologram spacebridge” command to enable the reception of the posts. This also works fine. The questions is, what are the differences? The “sudo hologram spacebridge” logs out some messages about binding to port 4010, what is that used for? It would be really great to have a document that details the internals of the spacebridge facility, pros and cons, things to watch out for, differences between the 2 options, … I am very excited to launch this product, would love to get more info. Keep up the great work!

Yeah those commands are a little confusing in how they are named.

Doing sudo hologram network connect opens up a persistent cellular internet connection such that all internet traffic on the device can be routed via the modem. This means that you can use it with spacebridge in order to connect to servers running on the Pi or even SSH into the Pi.

sudo hologram spacebridge starts a slightly more limited version of this so you can listen on a port on cellular without moving all other services to cellular. (Note that this mode is still a little buggy right now which is why we don’t usually recommend it)

sudo hologram receive will use the network stack on the modem to listen for inbound messages on one specific port. It won’t move any services on the Pi itself to cellular at all.

If all you need to do is get some inbound messages, that last one is probably the way to go.

First - Thanks for responding Reuben!

So, I have done some more testing and have lots of questions. My use case involves using a well established “rest” service that I have to conform to. Their service issues “posts” to my server, and requires responses back if a very specific format. Spacebridge appears to be the only way a can do this (please correct me if I am wrong). If I use holograms basic messaging, or web hook, I aways get a response back in the hologram specific JSON format (even if the message did not get to my server). It seems those responses just indicate that the message got to the hologram server (not to the final endpoint). But it does seem that Spacebridge tunnel does pass back the message from my server. When using the Spacebridge client, I am guessing that this provides a port tunneled over ssh to the service, which then creates another tunnel to my device (non ssh) to the pppd; is that correct? I am also still curious what the “sudo hologram spacebridge” implementation uses port 4010 for? I think I am getting close to having a solution, but before I try a larger implementation, I want to understand the details and any pros/cons involved in using this. Hoping to hear back soon.

@alexapoc : in your example is the “server” your cellular connected device or an actual server (say something hosted on AWS).

If your server, the thing receiving http requests, is the actual cellular connected device I would recommend reading the post and my response at: Hologram Nova/BeagleBone Black/Web App Access

In general I would not advise running webservers on your cellular connected devices for many reasons. It may be ok for “proof of concept” but you will be massively overpaying for data and have lots of headaches and reliability issues if you can get it to work at all.

If your cellular device is issuing the “posts” and the cloud server is receiving them, then you can do it directly, you dont have to use hologram cloud messaging at all. It looks like you are using a Nova (based on you using Holograms CLI) and with that you can route any and all internet traffic through the Nova and make outgoing requests to an http server as if you were connected to wifi.

Good advice there ^^

Just to answer the question about port 4010 that’s just the default port for sending messages from the dashboard. Your understanding of how spacebridge works seems correct otherwise.

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