sudomesh / disaster-radio

A (paused) work-in-progress long-range, low-bandwidth wireless disaster recovery mesh network powered by the sun.
https://disaster.radio
1.06k stars 107 forks source link

Regular node check in auto-post #35

Closed samuk closed 4 years ago

samuk commented 4 years ago

Would it be difficult to generate a auto-post from each node every day, or week, just advertising that the node is still live?

I realise you wouldn't want to do this too often from a network overhead point of view, but it would be good to know that nodes were still up every week or so.

paidforby commented 4 years ago

Yes, this is already implemented to a degree. For a node to maintain it's routing table, it needs to ping it's neighbors to make sure they are still alive. This ping is sent by the LL2.daemon() that is called in the main loop. The interval between pings is set by the LL2.setInterval(<time_in_ms>) function in the main setup, see these lines. For development, I have the interval set to a very low 10s. In reality, you may only send this ping out every 10mins or every hour.

Ideally, this interval would be set in a web app config gui, in which we could also print the routing table to see what all nodes are alive on a given network.

samuk commented 4 years ago

Great!

The config bit sounds a bit involved, as a first step could the routing table just be printed below the chat app?

paidforby commented 4 years ago

Yes. Something like that could/should be done. Right now (since I'm actively avoiding getting bogged down in developing the web app) it might be easier to create a command that can be entered into the chat app that prints the routing table. This already exists in the latest console interface, you can print the nodes current routing table using the command lr -r. I'll work on cooking up a stable release that includes the new console interface features. And I'll think about ways to make this routing table info available to the web app.

paidforby commented 4 years ago

The config bit sounds a bit involved, as a first step could the routing table just be printed below the chat app?

This is now a reality.

dr1

I based it mostly off parts of the simulator that perform a similar function. If a node is added to the network, the table in the web app will update every time a routing packet is sent which is determined by LL2.setInterval().

This is improvement I was waiting to make before releasing 0.1.1, so keep an eye out.

Eventual improvements,