Last edited by 97cweb at 2025-08-06 00:43:26.596038
What is Beeton Decoders
Beeton decoders is designed to take the challenge of dense network communication and pull it out of the tracks and into the air. Utilizing Open thread's Constrained Application (CoAp) as a foundation, Beeton simplifies communication, whilst allowing DC trains to run on the same layout, and not requiring AC encoded signals in the rails.
Beeton decoders runs with 2 layers over top of CoAp, a transport layer called LightThread, and Beeton itself, which is half of an application layer.
LightThread
LightThread directly sets up the mesh network required for Beeton, while showing the state the system is in using an RGB LED. This provides direct feedback on the status of the connection without needing serial communication to each device. LightThread manages the setup, and handles the transport of packets including acknowledgements, reliability, and keep alive signals. All this is done automatically, with optional content set by basic flags in the send method.
Beeton
The core of the system, Beeton is actually smaller than LightThread. Beeton's entire goal is to provide a template packet structure and a callback function hook to enable users to write whatever they want. The packet structure from the user's perspective contains the following information, all in binary to reduce packet size:
Thing
Thing bundles identical objects together, so they have the same methods to interact with. Think of it as assigning a class, like light bulb. There can be many light bulbs, but they all turn on and off.
ID
The specific identifier for a specific thing. This is light bulb 2, vs light bulb 1. Which do you want to control? This one.
Action
What do you want to do? Turn on, turn off, toggle? Set?etc.
Action Length
How many bytes the action takes, 0 or more bytes. Turn on, off and toggle would take 0 extra bytes, but to set would require a byte to pass the boolean value of on or off.
Payload
The content passed to the action. For the light bulb, it would be 1 byte representing on or off.