Skip to content

Firmware Specifications

Complete technical specifications for the Multiflexmeter 3.7.0 firmware platform.

SpecificationValue
Version0.0.0 (Development)
Build SystemPlatformIO
FrameworkArduino Core
LanguageC++ (C++11)
CompilerAVR-GCC
Flash Usage~30-35 KB (varies by board)
RAM Usage~2-4 KB (varies by board)
EEPROM Usage64 bytes (configuration)
LibraryVersionPurposeSize Impact
MCCI Arduino LoRaWAN^0.9.2LoRaWAN protocol stack~30KB flash
MedianFilterLocalSensor data filtering<1KB flash
Adafruit SleepyDog^1.6.4Declared dependency (unused)0KB
ParameterValue
RegionEU868
ClassClass A
ActivationOTAA (Over-The-Air)
Data RateDR0-DR7 (SF12-SF7)
TX Power14 dBm default
Duty CycleEU regulations compliant
Port1 (application data)
ParameterValue
ProtocolSMBus/I²C
Clock Speed100 kHz (standard mode)
Slave Address0x36
Data Format16-bit big-endian
CommandsRead sensor data
OffsetSizeFieldDescription
0x008 bytesdeveuiDevice EUI for LoRaWAN
0x088 bytesappeuiApplication EUI
0x1016 bytesappkeyApplication Key
0x204 bytesdevaddrDevice Address
0x2416 bytesnwkskeyNetwork Session Key
0x3416 bytesappskeyApplication Session Key
0x444 bytesnetidNetwork ID
0x484 bytesseqnoUpUplink sequence number
0x4C4 bytesseqnoDnDownlink sequence number
0x501 byteversionConfiguration version
0x5115 bytesReservedFuture use
// Version format: 0xMMmmpp (Major.minor.patch)
#define CONFIG_VERSION_MAJOR 3
#define CONFIG_VERSION_MINOR 7
#define CONFIG_VERSION_PATCH 0
// Results in version byte: 0x37 (3.7.0)
Board IDMCUFlashRAMClockCore
mfm_v3_m1284pATmega1284P128KB16KB8MHzMightyCore
mfm_v3ATmega328P32KB2KB8MHzMiniCore
build_flags =
-DCFG_eu868=1
-DCFG_sx1276_radio=1
-DARDUINO_LMIC_PROJECT_CONFIG_H_SUPPRESS
-DSERIAL_BAUD=115200
ModeCurrent DrawDurationNotes
Active~50-100mA<1 secondDuring transmission
Sleep~5-10µA95%+ of timeLMIC power management
Sensor Read~20-30mA<100msI²C communication
EventIntervalVariationNotes
Sensor Perform → Read10 secondsFixedMEASUREMENT_SEND_DELAY_AFTER_PERFORM_S
Join → Version Ping45 secondsFixedMEASUREMENT_DELAY_AFTER_PING_S
Measurement Interval20-4270 secondsConfigurableFrom EEPROM, bounds checked
Reset Delay5 secondsFixedAfter 0xDEAD command
LoRaWAN TXDuty cycle limitedEU868 regulationsMax 1% duty cycle
Watchdog Reset8 secondsHardware timerSafety mechanism
SectionSizeDescription
Bootloader~2KBArduino bootloader
Application~30-35KBMain firmware
LMIC Library~25KBLoRaWAN stack
Arduino Core~5KBHardware abstraction
Free Space~60-90KBAvailable for expansion
SectionSizeDescription
LMIC Stack~1.5KBLoRaWAN buffers
Application~0.5-1KBVariables and buffers
Arduino Core~0.5KBSystem overhead
Free StackRemainingAvailable for local variables
FunctionPurposeCall Frequency
setup()Board, sensor, LMIC initializationOnce at boot
loop()LMIC job scheduler onlyContinuous (os_runloop_once())
onEvent()LMIC event handlerOn LoRaWAN events
job_performMeasurements()Trigger sensor measurementLMIC scheduled
job_fetchAndSend()Read and transmit sensor dataAfter 10s delay
job_pingVersion()Send version after joinAfter join completion
scheduleNextMeasurement()Calculate next measurement timeAfter transmission
processDownlink()Handle downlink commandsOn RX data
// Actual job functions used in firmware
void job_pingVersion(osjob_t *job); // Send version info after join
void job_performMeasurements(osjob_t *job); // Start sensor measurement
void job_fetchAndSend(osjob_t *job); // Read sensor and transmit
void job_reset(osjob_t *job); // Device reset via watchdog
void job_error(osjob_t *job); // Error state (infinite loop)
IDE VersionSupportNotes
Arduino IDE 1.8.x✅ YesRecommended
Arduino IDE 2.x✅ YesModern interface
PlatformIO✅ YesPrimary development
CoreBoardCompatibility
MightyCoreATmega1284PRequired for mfm_v3_m1284p
MiniCoreATmega328PRequired for mfm_v3

MFM v2.0 Firmware Specification (Reference)

Section titled “MFM v2.0 Firmware Specification (Reference)”

📄 Download Firmware Specification (PDF)