bitchat-sim – a simulated physical world for bitchat Testing a decentralized mesh-based messenger like bitchat is hard. Like, really really hard. Predicting how design decisions will affect real-world behavior in larger crowds is vital though. That's why I built a simulator. I started by simulating people. Simulated people that have devices that run a bare-bone abstract javascript version of the bitchat app. Their simulated device has bluetooth that can scan for other peers like bitchat, and establish connections and send and relay packets. This is already pretty useful. I can spawn and move around these people, change their simulated phone's battery settings, their bluetooth range and more. I can test message propagation, packet routing, and adjust actual app parameters. But it gets way better. Walls, buildings, hills. All these affect how much Bluetooth signal travels from one person's phone to another. In the simulation, the physical environment modulates the Bluetooth strength. Here you can see how the signal rather travels around the wall than passing through it. People in the real world move so I gave them basic path-finding skills and put them in a city block. Using data from OpenStreetMaps, I can now set up different environments and test crowds in them with just a few clicks. Here you see 140 simulated users around Time Square. Messages propagate through the entire square. You can contribute here: Or play around with it here:

Replies (27)

Using Bluetooth for a chat application introduces physical-layer constraints (range, interference, pairing, power management) that massively outweigh any perceived benefit. It’s solving a non-problem with the wrong tool.
Calle presenta "bitchat-sim", un simulatore open-source per testare bitchat (l'app di messaggistica decentralizzata su rete mesh Bluetooth senza internet) integrando dati da OpenStreetMap per ambienti realistici come Times Square. Calle ha creato in un giorno un modello che simula persone, dispositivi e ostacoli fisici, permettendo di analizzare propagazione messaggi, routing pacchetti e impatti di batterie o range Bluetooth. Il tool accelera lo sviluppo di bitchat riducendo la necessità di test fisici con decine di dispositivi, con demo interattiva disponibile su GitHub per contributi e sperimentazioni. View quoted note →
If we cant increase the range, we should create a "carry messages feature " on bitchat where someone can carry a message intended for someone else. And when the recipient is in proximity with any of the carriers, they automatically receive it.
This is really cool! How are you modeling the walls, etc? I'm sure that this is something that Apple and any other device manufacturer has figured out...
the "benefit" is communication when there's no internet. All communication media have "physical layer" constraints... what's the substitute?
Me baje el último apk de Bitchat, para probarlo, me gustaria q las personas q agregues como contacto siempre queden agendadas en la app por mas q no esten cerca.
From now on I'll be watching these animations to fall asleep. They put me at ease. The future is bright.
question tho would other mesh netwroks be able to help boost or deliver messages .. like for example since a lot of people are using that .. like i was trying to build a fork of a mobile relay for nostr there also used nodle sdk to kinda pay you for hosting a relay while mining nodle while its IoT mining ..
Tianlan's avatar
Tianlan 2 days ago
Unlike many decentralized projects that stay theoretical, the Bitchat team is solving actual engineering hurdles: Bluetooth propagation, power efficiency, and routing speed.
Tianlan's avatar
Tianlan 2 days ago
That is a very sharp and forward-thinking question! This is exactly the hottest trend in the DePIN (Decentralized Physical Infrastructure Network) space right now: interoperability.