mirror of
https://github.com/mikecarper/MeshCore.git
synced 2026-09-09 18:05:37 +00:00
Adds ThinkNode_M7_repeater_observer_mqtt and ThinkNode_M7_room_server_observer_mqtt, following the Station G3 observer overlay: adafruit-full cert bundle, MQTT bridge + SNMP, pinned observer lib_deps, and the quieter default logging profile. WiFi-only for now. The M7 has an onboard CH390 Ethernet controller (used by ThinkNode_M7_companion_radio_ethernet, and an lwIP netif so the MQTT data path would work over it), but the bridge's link management is bound to the WiFi station API, so Ethernet cannot carry MQTT yet. The board has PSRAM, so MAX_NEIGHBOURS=50 enables WITH_MQTT_NEIGHBORS — verified present in both images. Builds use 46.5% of the 3.19 MB app slot at 13.7% RAM, and build.sh emits the full artifact set (.bin, -merged.bin, .partsig). The partition table is inherited from [ThinkNode_M7] unchanged, so no merged first flash is needed; its signature is byte-identical to the T-Beam Supreme observer builds (both default_8MB.csv). Also fixes two pre-existing build failures on this board: - [ThinkNode_M7] re-added a blanket helpers/*.cpp after arduino_base excludes the MQTT-only sources, so every M7 env failed on a missing Timezone.h. The glob was otherwise fully redundant with the base, so it is dropped rather than re-excluding the two files. - ThinkNode_M7_companion_radio_ethernet sets DISPLAY_CLASS=NullDisplayDriver but never compiled NullDisplayDriver.cpp, which defines UIColor::window_bkg, so it failed at link. The ble and wifi envs both already list it. All nine M7 envs now build. Observer env discovery picks up both new envs, and the ArduinoJson pin check covers both new sections.
276 lines
7.9 KiB
INI
276 lines
7.9 KiB
INI
[ThinkNode_M7]
|
|
extends = esp32_base
|
|
board = thinknode_m7
|
|
board_upload.flash_size = 8MB
|
|
board_build.partitions = default_8MB.csv
|
|
build_flags = ${esp32_base.build_flags}
|
|
-I src/helpers/esp32
|
|
-I variants/thinknode_m7
|
|
-I src/helpers/sensors
|
|
-I src/helpers/ui
|
|
-D THINKNODE_M7
|
|
-D PIN_USER_BTN_ANA=4
|
|
-D PIN_STATUS_LED=3 ; green
|
|
-D LED_STATE_ON=LOW
|
|
-D RADIO_CLASS=CustomLR1110
|
|
-D WRAPPER_CLASS=CustomLR1110Wrapper
|
|
-D USE_LR1110
|
|
-D LORA_TX_POWER=22
|
|
-D RF_SWITCH_TABLE
|
|
-D RX_BOOSTED_GAIN=true
|
|
-D P_LORA_BUSY=13
|
|
-D P_LORA_SCLK=11
|
|
-D P_LORA_NSS=12
|
|
-D P_LORA_DIO_1=38
|
|
-D P_LORA_MISO=9
|
|
-D P_LORA_MOSI=10
|
|
-D P_LORA_RESET=39
|
|
-D P_LORA_TX_LED=46 ; blue
|
|
-D LR11X0_DIO_AS_RF_SWITCH=true
|
|
-D LR11X0_DIO3_TCXO_VOLTAGE=1.8
|
|
; No blanket +<helpers/*.cpp> here: it would undo arduino_base's exclusion of the
|
|
; MQTT-only sources, which need Timezone/NTPClient that only observer envs pull in.
|
|
build_src_filter = ${esp32_base.build_src_filter}
|
|
+<helpers/sensors/EnvironmentSensorManager.cpp>
|
|
+<helpers/ui/MomentaryButton.cpp>
|
|
+<../variants/thinknode_m7>
|
|
lib_deps = ${esp32_base.lib_deps}
|
|
stevemarple/MicroNMEA @ ^2.0.6
|
|
|
|
[ThinkNode_M7_ethernet]
|
|
build_flags =
|
|
-D ETHERNET_ENABLED
|
|
-D ETHERNET_USE_CH390
|
|
-D ETHERNET_CLASS=CH390EthernetInterface
|
|
-D ETH_MISO_PIN=14
|
|
-D ETH_MOSI_PIN=48
|
|
-D ETH_SCLK_PIN=47
|
|
-D ETH_CS_PIN=21
|
|
-D ETH_INT_PIN=45
|
|
-D ETHERNET_DEBUG_LOGGING=1
|
|
build_src_filter =
|
|
+<helpers/ethernet/*.cpp>
|
|
+<helpers/ethernet/ch390/>
|
|
lib_deps =
|
|
https://github.com/liamcottle/ESP32-CH390.git#47b401f1de546118b03c18b5689dedec45871f2d
|
|
|
|
[env:ThinkNode_M7_repeater]
|
|
extends = ThinkNode_M7
|
|
build_src_filter = ${ThinkNode_M7.build_src_filter}
|
|
+<../examples/simple_repeater/*.cpp>
|
|
build_flags =
|
|
${ThinkNode_M7.build_flags}
|
|
-D ADVERT_NAME='"ThinkNode M7 Repeater"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D MAX_NEIGHBOURS=50
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
lib_deps =
|
|
${ThinkNode_M7.lib_deps}
|
|
${esp32_ota.lib_deps}
|
|
|
|
[env:ThinkNode_M7_room_server]
|
|
extends = ThinkNode_M7
|
|
build_src_filter = ${ThinkNode_M7.build_src_filter}
|
|
+<../examples/simple_room_server>
|
|
build_flags =
|
|
${ThinkNode_M7.build_flags}
|
|
-D ADVERT_NAME='"ThinkNode M7 Room Server"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D ROOM_PASSWORD='"hello"'
|
|
; -D MESH_PACKET_LOGGING=1
|
|
; -D MESH_DEBUG=1
|
|
lib_deps =
|
|
${ThinkNode_M7.lib_deps}
|
|
${esp32_ota.lib_deps}
|
|
|
|
[env:ThinkNode_M7_companion_radio_ble]
|
|
extends = ThinkNode_M7
|
|
build_flags =
|
|
${ThinkNode_M7.build_flags}
|
|
${ThinkNode_M7_ethernet.build_flags}
|
|
-I examples/companion_radio/ui-orig
|
|
-D DISPLAY_CLASS=NullDisplayDriver
|
|
-D MAX_CONTACTS=350
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-D BLE_PIN_CODE=123456
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
; -D BLE_DEBUG_LOGGING=1
|
|
; -D MESH_PACKET_LOGGING=1
|
|
build_src_filter = ${ThinkNode_M7.build_src_filter}
|
|
${ThinkNode_M7_ethernet.build_src_filter}
|
|
+<helpers/esp32/*.cpp>
|
|
+<helpers/ui/MomentaryButton.cpp>
|
|
+<helpers/ui/NullDisplayDriver.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
+<../examples/companion_radio/ui-orig/*.cpp>
|
|
lib_deps =
|
|
${ThinkNode_M7.lib_deps}
|
|
${ThinkNode_M7_ethernet.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:ThinkNode_M7_companion_radio_usb]
|
|
extends = ThinkNode_M7
|
|
build_flags =
|
|
${ThinkNode_M7.build_flags}
|
|
-I examples/companion_radio/ui-orig
|
|
-D MAX_CONTACTS=350
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
-D ENABLE_USB_INTERFACE
|
|
build_src_filter = ${ThinkNode_M7.build_src_filter}
|
|
+<helpers/esp32/*.cpp>
|
|
+<helpers/ui/MomentaryButton.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
+<../examples/companion_radio/ui-orig/*.cpp>
|
|
lib_deps =
|
|
${ThinkNode_M7.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:ThinkNode_M7_companion_radio_wifi]
|
|
extends = ThinkNode_M7
|
|
build_flags =
|
|
${ThinkNode_M7.build_flags}
|
|
-I examples/companion_radio/ui-orig
|
|
-D MAX_CONTACTS=350
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-D DISPLAY_CLASS=NullDisplayDriver
|
|
-D WIFI_DEBUG_LOGGING=1
|
|
-D WIFI_SSID='"myssid"'
|
|
-D WIFI_PWD='"mypwd"'
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
; -D MESH_PACKET_LOGGING=1
|
|
build_src_filter = ${ThinkNode_M7.build_src_filter}
|
|
+<helpers/esp32/*.cpp>
|
|
+<helpers/ui/MomentaryButton.cpp>
|
|
+<helpers/ui/NullDisplayDriver.cpp>
|
|
+<../examples/companion_radio/*.cpp>
|
|
+<../examples/companion_radio/ui-orig/*.cpp>
|
|
lib_deps =
|
|
${ThinkNode_M7.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:ThinkNode_M7_companion_radio_ethernet]
|
|
extends = ThinkNode_M7
|
|
build_flags =
|
|
${ThinkNode_M7.build_flags}
|
|
${ThinkNode_M7_ethernet.build_flags}
|
|
-I examples/companion_radio/ui-orig
|
|
-D MAX_CONTACTS=350
|
|
-D MAX_GROUP_CHANNELS=40
|
|
-D DISPLAY_CLASS=NullDisplayDriver
|
|
-D OFFLINE_QUEUE_SIZE=256
|
|
build_src_filter = ${ThinkNode_M7.build_src_filter}
|
|
${ThinkNode_M7_ethernet.build_src_filter}
|
|
+<helpers/esp32/*.cpp>
|
|
+<helpers/ui/MomentaryButton.cpp>
|
|
+<helpers/ui/NullDisplayDriver.cpp> ; defines UIColor::window_bkg for DISPLAY_CLASS
|
|
+<../examples/companion_radio/*.cpp>
|
|
+<../examples/companion_radio/ui-orig/*.cpp>
|
|
lib_deps = ${ThinkNode_M7.lib_deps}
|
|
${ThinkNode_M7_ethernet.lib_deps}
|
|
densaugeo/base64 @ ~1.4.0
|
|
|
|
[env:ThinkNode_M7_kiss_modem]
|
|
extends = ThinkNode_M7
|
|
build_src_filter = ${ThinkNode_M7.build_src_filter}
|
|
+<../examples/kiss_modem/>
|
|
|
|
; MQTT observer envs are WiFi-only: the bridge's link management is bound to the
|
|
; WiFi station API, so the onboard CH390 cannot carry MQTT yet. The board has
|
|
; PSRAM, so MAX_NEIGHBOURS enables WITH_MQTT_NEIGHBORS (see MQTTBridge.h).
|
|
[env:ThinkNode_M7_repeater_observer_mqtt]
|
|
extends = ThinkNode_M7
|
|
extra_scripts =
|
|
${esp32_base.extra_scripts}
|
|
pre:scripts/generate_cert_bundle.py
|
|
board_ssl_cert_source = adafruit-full
|
|
board_build.embed_files = src/certs/x509_crt_bundle.bin
|
|
build_flags =
|
|
${ThinkNode_M7.build_flags}
|
|
-D ADVERT_NAME='"MQTT Observer"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D MAX_NEIGHBOURS=50
|
|
-D WITH_MQTT_BRIDGE=1
|
|
-D MAX_MQTT_BROKERS=3
|
|
-D MQTT_MAX_PACKET_SIZE=1024
|
|
-D MQTT_DEBUG=1
|
|
# -D MESH_PACKET_LOGGING=1
|
|
# -D MESH_DEBUG=1
|
|
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
|
|
-D ESP32_CPU_FREQ=160
|
|
-D WITH_SNMP=1
|
|
# -D WIFI_SSID='"ssid"'
|
|
# -D WIFI_PWD='"password"'
|
|
# -D MQTT_SERVER='"your-mqtt-broker.com"'
|
|
# -D MQTT_PORT=1883
|
|
# -D MQTT_USERNAME='"your-username"'
|
|
# -D MQTT_PASSWORD='"your-password"'
|
|
build_src_filter = ${ThinkNode_M7.build_src_filter}
|
|
+<helpers/bridges/MQTTBridge.cpp>
|
|
+<helpers/MQTTMessageBuilder.cpp>
|
|
+<helpers/JWTHelper.cpp>
|
|
+<helpers/SNMPAgent.cpp>
|
|
+<../examples/simple_repeater>
|
|
lib_deps =
|
|
${ThinkNode_M7.lib_deps}
|
|
${esp32_ota.lib_deps}
|
|
elims/PsychicMqttClient@^0.2.4
|
|
bblanchon/ArduinoJson @ 7.4.3
|
|
arduino-libraries/NTPClient
|
|
JChristensen/Timezone
|
|
paulstoffregen/Time@1.6.1
|
|
0neblock/SNMP_Agent
|
|
|
|
[env:ThinkNode_M7_room_server_observer_mqtt]
|
|
extends = ThinkNode_M7
|
|
extra_scripts =
|
|
${esp32_base.extra_scripts}
|
|
pre:scripts/generate_cert_bundle.py
|
|
board_ssl_cert_source = adafruit-full
|
|
board_build.embed_files = src/certs/x509_crt_bundle.bin
|
|
build_flags =
|
|
${ThinkNode_M7.build_flags}
|
|
-D ADVERT_NAME='"ThinkNode M7 Room Observer"'
|
|
-D ADVERT_LAT=0.0
|
|
-D ADVERT_LON=0.0
|
|
-D ADMIN_PASSWORD='"password"'
|
|
-D ROOM_PASSWORD='"hello"'
|
|
-D MAX_NEIGHBOURS=50
|
|
-D WITH_MQTT_BRIDGE=1
|
|
-D MAX_MQTT_BROKERS=3
|
|
-D MQTT_MAX_PACKET_SIZE=1024
|
|
-D MQTT_DEBUG=1
|
|
# -D MESH_PACKET_LOGGING=1
|
|
# -D MESH_DEBUG=1
|
|
-D CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y
|
|
-D ESP32_CPU_FREQ=160
|
|
-D WITH_SNMP=1
|
|
# -D WIFI_SSID='"ssid"'
|
|
# -D WIFI_PWD='"password"'
|
|
# -D MQTT_SERVER='"your-mqtt-broker.com"'
|
|
# -D MQTT_PORT=1883
|
|
# -D MQTT_USERNAME='"your-username"'
|
|
# -D MQTT_PASSWORD='"your-password"'
|
|
build_src_filter = ${ThinkNode_M7.build_src_filter}
|
|
+<helpers/bridges/MQTTBridge.cpp>
|
|
+<helpers/MQTTMessageBuilder.cpp>
|
|
+<helpers/JWTHelper.cpp>
|
|
+<helpers/SNMPAgent.cpp>
|
|
+<../examples/simple_room_server>
|
|
lib_deps =
|
|
${ThinkNode_M7.lib_deps}
|
|
${esp32_ota.lib_deps}
|
|
elims/PsychicMqttClient@^0.2.4
|
|
bblanchon/ArduinoJson @ 7.4.3
|
|
arduino-libraries/NTPClient
|
|
JChristensen/Timezone
|
|
paulstoffregen/Time@1.6.1
|
|
0neblock/SNMP_Agent
|