All the information is in the first two minutes minutes. The last minute has a demo to show raw packet data in the terminal if you're interested in looking at the encoded data.

Inspiration

Here in Texas, we've seen quite a few devastating natural disasters in the past few years. Hurricane Harvey, most recently the deep freeze, just to name a few. Across the world, as climate change continues to grow, devastating disasters are becoming the norm, rather than the exception, harming the most marginalized in society. When floods, hurricanes, earthquakes strike, cell towers collapse, electricity disappears, there is no way to seek help. We’ve developed Disaster Duck to provide a bridge between those afflicted by disasters, and those in need.

What it does

Disaster Duck is a low cost communication network that uses Raspberry Pi’s (or any other cheap, small computer) and Bluetooth Low Energy to create a distributed mesh network that allows for the transmission of emergency signals across large distances, even when there is no other method for communication. The Bluetooth Low Energy Code PHY has a range of about 500 meters between each node. Disaster Ducks can either be dropped into disaster zones, or attached to structures in possible disaster-zones beforehand. Then, people in need of help can either use the app to connect to the mesh network or press a button on each Disaster Duck to signal that they are in need of help. Rescuers can then connect to any node in the network, and they will have access to a list of all requests for help on the network as well as a GPS location of where the person in need of help is located. The network can transmit about 20 bytes of data, which we used for GPS, though other forms of information could also be used.

How we built it

The project consists of two parts, the app that users can use to interface with the network, and the Pi itself. The mesh network was made using the Bluetooth Low Energy protocol. The network is written in rust, and runs on multiple threads to increase efficiency. The GPS system attached to the pi ($2 off AliExpress) interfaces with a Python script and the Rust backend to transmit the GPS coordinates, while also detecting when the help button is pressed on the Pi. We also created a custom encoding and decoding schema to condense the coordinate data into less bytes. We had to learn about bitwise operations to get this to work since we needed to recognize the two's-complement form the integers are converted from. The iOS app is written using SwiftUI, Mapkit, and CoreBluetooth which enable it to interface with the network, while allowing different users to access different information and functions of the network.

Challenges we ran into

We found the Bluetooth Low Energy protocol was very poorly documented, and had to rely on StackOverflow and obscure Russian forums to understand how the protocol could be fit to our needs. Furthermore, all the Bluetooth mesh code was written at a very low level (sending individual bytes encoded by a custom encoding algorithm) The iPhone-Pi interface was also tricky to get working properly, and our use of CoreBluetooth kept crashing the Swift compiler.

What's next for DisasterDuck

Next, we seek to make DisasterDuck more disaster ready. We hope to find a more robusts rubber duck, and parachute system so that the ducks can easily be dropped into disaster areas. We also hope to improve the network by creating an expanded encoding schema to allow for the transmission of more custom, situation specific information to aid in a better response. Finally, we would like to make an android app to interface with the network as well to further increase accessibility.

Built With

Share this project:

Updates