Node and submaster firmware¶
MSCB firmware has two distinct roles:
- a submaster bridges host-side Ethernet/UDP requests to ninth-bit RS-485;
- a node implements address handling, commands, variables, persistence and application-specific I/O.
Node responsibilities¶
A conforming node should:
- recognize 8- and 16-bit node, group and broadcast address cycles;
- answer ping quickly and never answer another node's address;
- validate command CRC before changing state;
- expose complete variable metadata;
- serialize numeric variable values in the protocol byte order;
- return the received CRC for acknowledged writes;
- reserve slow timeout behavior for flash and upgrade work; and
- avoid replies to group/broadcast commands.
Application firmware owns the variable table and the behavior of MCMD_USER.
Memory-access and upgrade commands must enforce the device's real memory map
and write restrictions.
Submaster responsibilities¶
The Ethernet submaster validates the UDP header/version, correlates sequence numbers, produces address characters with bit 9 set, forwards ordinary data with bit 9 clear, observes timeout flags, and returns bus timeout separately from a lost UDP packet. It also implements discovery, echo, token/password, reset, and information commands used by host initialization.
Firmware files¶
The C host library recognizes the supported firmware image formats. Use
mscb_upload(), mscb_download(), and
mscb_verify() rather than reimplementing flash packet details. Always verify
the exact image and target/subaddress before writing program memory.