← All posts

6 min read engineering offline safety

Built to work with no signal: how Bosun is engineered

Everything in Bosun that can wake you runs on the boat, with no connection. Here is what that rule decided about the computer, the voice, the lookouts and the updates.

By the end of this post you will know which parts of Bosun need a connection, which do not, and why we drew the line where we did. You will also have one question to ask of any electronics you trust with a watch.

This is not a tour of the code. Bosun is not a chartplotter, not an autopilot and not certified navigation equipment. It is not a cloud product either, and that last point is the subject of this post.

The night the signal went

Picture a boat at anchor in a bay behind a headland. The phone showed one bar at sunset and none by midnight. At 02:00 the wind backs thirty degrees and gusts harder, and the anchor starts to drag across the bottom.

A system that needs the internet to work out what is happening says nothing that night, and nothing tells the crew it has gone quiet. That is the case we design for. One rule follows from it: anything that can wake you must work on the boat, with no signal at all. Everything else in this post comes from that rule.

One small computer, one program on watch

Bosun is a small fanless computer: an Intel Core Series 3 processor with 16 GB of memory, in an aluminium case for a dry nav station or locker. It reads the boat's NMEA 2000 network through a USB adapter, and NMEA 0183 and GPS as well.

One program does the watchkeeping. It reads the instruments, runs the lookouts, raises the alerts, listens and speaks, and serves the web page you open on a phone or tablet over the boat's own Wi-Fi. Keeping these in one program means that the part that notices a problem and the part that tells you about it do not depend on a server, or on a link between two machines, to reach each other.

Hearing you without the internet

Speech recognition, the wake word, language understanding and a small local language model all run on that processor. They are written in the same language as the rest of Bosun, Go, so they are part of the same program and use no outside runtime and no server. Bosun can hear its wake word, understand "what's the depth?" and answer, with the router switched off. It hears and speaks English, German, French, Spanish, Italian and Dutch.

Hearing a voice in a cockpit is the harder part. The microphone array cancels the echo of Bosun's own voice and of the music before Bosun hears anything, and the computer filters out wind and engine noise before speech is transcribed. When Bosun listens or speaks, the music goes down. For an emergency, it goes down at once in every part of the boat and stays down.

The lookouts: quiet until it matters

Bosun has more than 70 lookouts. A lookout is a rule that watches one kind of trouble: anchor drag, a ship on a collision course, shoaling water, a bilge pump running too often, an engine running hot, a falling barometer, a man overboard beacon. Each one is a fixed rule that does the calculation. No language model decides whether you are dragging.

Most of a lookout's work is deciding when to stay quiet. Take the anchor. Bosun sizes the swing circle from the rode you let out and the depth, so the circle fits your boat rather than a fixed radius. It warns when the boat nears the edge, at 80% of the circle's radius, and raises an alarm when the boat is outside the circle. A short excursion across the line on a tidal swing does not count. At night alerts are louder and more of them are spoken. If the same thing fires twice, it becomes one alert, not two.

Alerts come at four levels: emergency, alarm, warning and caution. The levels and the rules for acknowledging, silencing and repeating them are designed with reference to IMO MSC.302(87), the bridge alert management guidance for ships. Do-not-disturb holds back cautions and routine notices; warnings, alarms and emergencies always get through. A warning that nobody acknowledges is repeated while the condition lasts, at most every five minutes. If nobody acknowledges an emergency, or an alarm at night, within five minutes, Bosun also sends it to the crew's phones, and again every five minutes after that.

What leaves the boat, and when

A connection is optional. When there is one, Bosun uses it for these things:

  • Open questions. If you ask something the boat cannot answer on its own, Bosun can pass it to a larger language model ashore. Outside an emergency it sends a trimmed summary of the situation, with the position rounded to about 110 metres and other boats' MMSI numbers, crew names and place names removed. Other boats' AIS names are kept. The owner can switch this off.
  • Messages ashore. Alerts and replies on WhatsApp or Telegram. Messages wait on the boat until there is signal, then go out.
  • Weather. Forecasts download when there is signal and are kept on board. The lookouts never wait for the network. They use the latest forecast while it is current, and the boat's own barometer and wind instruments.
  • Your account. Once the unit is linked to your account, it sends its position and track ashore every five minutes.

None of these is needed for an alert to sound on board. A language model may reword the explanation of a routine alert after it has sounded; the alarm itself, and every safety-critical lookout's wording, come from the rule.

Updates that undo themselves

The operating system is NixOS. The whole system, from the kernel up, is built from one written description, so every unit running a given version runs the same thing. An update replaces the whole system in one step. It never changes one package at a time, so a unit cannot end up with half an update.

Each night at around 04:00, if there is a connection, the unit checks for a new version. Every time the computer starts, it also starts a five-minute timer. If Bosun reports itself healthy within three minutes, the timer is cancelled. If it does not, the computer goes back to the previous version of the whole system and restarts. After three of these in a row it stops trying, so a person can look at what went wrong instead of the unit restarting in a loop. Bosun's data, which holds your logbook, settings and the boat's history, is kept, and so are the network and pairing settings; apart from those, the system's working files are cleared on every start, so a leftover from yesterday cannot carry into today.

How we test it

We sponsor several professional sailors who test Bosun on their own boats, all the time. What their boats record at sea goes into the simulations we run every change against.

A question to ask of anything on your boat

Before you trust any electronics with part of your watch, switch off the router and ask: what still wakes me?

Ask it of a plotter app, an anchor alarm, a monitoring service, and of Bosun. If the answer is "nothing", the device is a convenience, not a watch. With Bosun, the lookouts and the alerts on board still wake you with the router off. Only the copy sent to your phone waits for signal.