How MeshSonar pings
A ping is a short radio message, and radio time is shared. This is how often MeshSonar sends them, the airtime limit it keeps to, and how to work out the numbers for your own radio.
What a ping is
MeshSonar sends one short group message on the #wardriving channel. Its text is MS: and 10 random letters and digits, such as MS:m3jnr7dan5. Your radio puts its own name in front, so on the air it reads like YourRadio: MS:m3jnr7dan5.
Every repeater that hears the ping repeats it once. For about ten seconds (the listen window) your radio listens for those repeats and notes which repeater it heard and how strongly. That, plus where the phone was, is one point on the coverage map.
When a ping is sent
Two rules decide, and both must be met: enough time since the last ping, and enough distance travelled since the last ping. Standing still sends nothing.
| Setting | Starts at | Allowed range |
|---|---|---|
| Auto-ping | 30 seconds | 10 to 120 seconds |
| Minimum distance | 15 metres | 15 to 500 metres |
| Listen window | 10 seconds after each ping | 4 to 20 seconds |
The airtime budget below can make the effective interval longer than what you set, on a slow radio setting. It never makes it shorter.
The airtime budget
Airtime is the time a radio is actually transmitting. Everyone in range shares the channel, and only one radio can be heard at a time, so each ping takes a slice of everyone's turn. Repeaters also transmit every ping again, so the real cost on the channel is larger than your radio's own share: roughly the ping's airtime times one plus the number of repeaters that repeat it.
| Rule | Limit | What happens at the limit |
|---|---|---|
| Ping budget | Ping airtime under 2% of the time in any rolling 10 minutes (12 seconds of air in 600) | The ping is skipped. |
| Total cap | All of the radio's own transmitting under 1% of any rolling hour (36 seconds), for a region with no sourced figure | The ping is skipped. |
| Busy radio | The radio still has something queued, or you sent a message in the last 2 seconds | The ping is skipped. |
| Your messages | No limit from pings | A message you send goes out at once, ahead of any ping. |
Skipped, never queued late
A ping that cannot go now is dropped, and the next one is judged fresh at its own moment. A ping sent late would be filed at the wrong place on the map, and a queue of them would turn into a burst. So there is no queue.
Chat is never delayed
In an app that both chats and drives on one radio, a message you send always goes first. Pings give way to chat, never the other way round.
The budget is MeshSonar's own policy default. It is not legal advice and not a regulator's figure. The app enforces it as described here, together with the interval and distance limits above.
Limits in Indianapolis, US
We have no reviewed regulator source for a transmit-time limit in Indianapolis, US, so the 1% default applies, which is the strictest limit that the MeshCore documentation names (for the EU). If your area has a different legal limit, it is yours to follow. We only show a region's own figure once we can cite where it comes from.
Work it out for your radio
Pick your radio settings and the size of a ping to see how long it takes on the air and how many fit in the budget.
Starts at Indianapolis, US's radio preset (USA: SF7, 62.5 kHz, 4/5). Change anything.
Characters in the name your radio sends. The ping text is 13 characters after it.
Blank uses 37 bytes, the size of a ping from that name. 1 to 255.
- Packet on air
- 37 bytes
- Symbol time
- 2.048 ms
- Time on air of one ping
- 213.5 ms
- Shortest interval inside the 2% budget
- 10.7 s
- Most pings in any 10 minutes (2% budget)
- 56
- Most pings per hour, 2% budget
- 336
- Most pings per hour, 1% total cap (nothing else sent)
- 168
- Most pings per hour, both limits
- 168
Within budget. One ping every 30 s is 120 an hour, inside the 168 that fit. No ping would be skipped for airtime.
For Indianapolis, US's preset a 37-byte ping takes 214 ms and the shortest interval inside the 2% budget is 11 seconds. The table shows the same for every common setting.
| Spreading factor | 62.5 kHz | 125 kHz | 250 kHz |
|---|---|---|---|
| SF7 | 214 ms, every 11 s | 107 ms, every 6 s | 53 ms, every 3 s |
| SF8 | 386 ms, every 20 s | 193 ms, every 10 s | 97 ms, every 5 s |
| SF9 | 600 ms, every 31 s | 300 ms, every 16 s | 150 ms, every 8 s |
| SF10 | 1.28 s, every 65 s | 559 ms, every 28 s | 280 ms, every 14 s |
| SF11 | 2.40 s, every 121 s | 1.20 s, every 61 s | 518 ms, every 26 s |
| SF12 | 4.47 s, every 224 s | 2.24 s, every 112 s | 1.12 s, every 56 s |
The airtime formula
MeshSonar uses Semtech's published LoRa time-on-air formula (application note AN1200.13). With spreading factor SF, bandwidth BW in hertz, coding rate CR (1 for 4/5 up to 4 for 4/8) and a packet of PL bytes:
Tsym = 2^SF / BW Tpreamble = (Npreamble + 4.25) x Tsym Npayload = 8 + max( ceil( (8xPL - 4xSF + 28 + 16 - 20xIH) / (4 x (SF - 2xDE)) ) x (CR + 4), 0 ) Time on air = Tpreamble + Npayload x Tsym
- IH is 0, because MeshCore sends the explicit header. The 16 is the CRC, which is on.
- DE (low data rate optimise) is 1 only when Tsym is 16 ms or longer, which is SF11 and SF12 at 125 kHz, and 0 otherwise.
- Npreamble is 32 symbols in MeshCore at SF8 and below, and 16 above.
- PL is the whole packet: header, path length, path and payload. A channel message adds its channel hash, a 2-byte check and the encrypted text, padded to 16-byte blocks. Each repeater adds 1 byte to the path as it repeats.
The calculator and the tables above run this formula in your browser. It is checked in our tests against values worked by hand from the Semtech formula (for example SF7, 125 kHz, 4/5, 10 bytes, 8-symbol preamble is 41.216 ms; SF12, same, is 991.232 ms) and against a second, separate implementation of it across every setting in the table.
Privacy of pings
- The ping text is random. It holds no coordinates, no time, no driver name and no key.
- Anyone can add #wardriving and read it, so everything on it is public by design, and that is why nothing private goes on it.
- Where a ping happened is recorded on your phone and uploaded with your drive. The website then trims the start and end of drives and hides your privacy zones before anything is public. See Privacy.
- The website joins what a listening radio heard to your ping by the packet's hash, so no position has to be on the air for that.
How repeaters see pings
A repeater hears a ping as an ordinary group message on a channel it may not know the key of. It does not need to read it. It adds its own short ID to the packet's path and sends it on once, after a short random pause so that neighbouring repeaters do not all talk at once. A repeater that has already repeated the same packet ignores further copies.
That is why one ping may produce several echoes, and why pings from a car that is in range of many repeaters cost the most airtime. If your area has a lot of repeaters, use a longer interval.
Being a good neighbour
- Leave the interval and distance on their defaults unless you have a reason. Longer is always kind.
- Use your region's radio settings. A radio on the wrong settings sends pings nobody can use.
- Do not chat on
#wardriving. - Stop the drive when you park, and ping less when the mesh is busy.
- Do not set the radio's own duty cycle higher than your local rules allow. The MeshCore default is 50%, which is the radio's own setting, not a legal limit.
- Tell the local mesh operators you are driving. They can tell you what they would prefer.
Questions
Why 2%?
It is a deliberately small slice of the channel. It exists to stop a mistake or a slow radio setting from using a lot of it. The table above shows the shortest interval it allows for each setting.
Why skip a ping instead of sending it a moment later?
A ping is only useful if it is tied to the place it was sent from. Held back, it would be sent from somewhere else. Skipping also stops a backlog turning into a burst.
Does the website see my pings' airtime?
No. The budget is worked out on your phone from the settings of your radio. The website only receives the drive.
My radio uses a slow setting and the app sends fewer pings.
That is the budget working. Slower settings use much more airtime per ping. The table shows how much.
Is this legal advice?
No. The limits are MeshSonar's defaults. Your local rules apply, and you are responsible for following them.