From 66a961cb750afc340d86f98521825b833ea2b5a9 Mon Sep 17 00:00:00 2001 From: isseysandei Date: Fri, 3 Jan 2025 18:35:34 +0100 Subject: [PATCH 1/7] increased buffer size to 1024 (#5733) --- src/mqtt/MQTT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mqtt/MQTT.cpp b/src/mqtt/MQTT.cpp index 46fb607b52..3db3c37bb9 100644 --- a/src/mqtt/MQTT.cpp +++ b/src/mqtt/MQTT.cpp @@ -435,7 +435,7 @@ void MQTT::reconnect() serverAddr = hostAndPort.first.c_str(); serverPort = hostAndPort.second; pubSub.setServer(serverAddr, serverPort); - pubSub.setBufferSize(512); + pubSub.setBufferSize(1024); LOG_INFO("Connect directly to MQTT server %s, port: %d, username: %s, password: %s", serverAddr, serverPort, mqttUsername, mqttPassword); From 9afadde2f4ef8c59c80c7926d1c77153f6f9ca33 Mon Sep 17 00:00:00 2001 From: Alex Markley Date: Fri, 3 Jan 2025 18:00:39 -0500 Subject: [PATCH 2/7] Add support for LS20031 GPS module. (#5718) Hardware documentation referenced: - https://cdn.sparkfun.com/datasheets/GPS/LS20030~3_datasheet_v1.3.pdf - https://cdn-shop.adafruit.com/datasheets/PMTK%20command%20packet-Complete-C39-A01.pdf --- src/gps/GPS.cpp | 4 +++- src/gps/GPS.h | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/gps/GPS.cpp b/src/gps/GPS.cpp index dcece305a6..e88e774bda 100644 --- a/src/gps/GPS.cpp +++ b/src/gps/GPS.cpp @@ -1190,6 +1190,8 @@ GnssModel_t GPS::probe(int serialSpeed) PROBE_SIMPLE("L76B", "$PMTK605*31", "Quectel-L76B", GNSS_MODEL_MTK_L76B, 500); PROBE_SIMPLE("PA1616S", "$PMTK605*31", "1616S", GNSS_MODEL_MTK_PA1616S, 500); + PROBE_SIMPLE("LS20031", "$PMTK605*31", "MC-1513", GNSS_MODEL_LS20031, 500); + uint8_t cfg_rate[] = {0xB5, 0x62, 0x06, 0x08, 0x00, 0x00, 0x00, 0x00}; UBXChecksum(cfg_rate, sizeof(cfg_rate)); clearBuffer(); @@ -1750,4 +1752,4 @@ void GPS::toggleGpsMode() enable(); } } -#endif // Exclude GPS \ No newline at end of file +#endif // Exclude GPS diff --git a/src/gps/GPS.h b/src/gps/GPS.h index 15fc50fe7f..df85b7cbf6 100644 --- a/src/gps/GPS.h +++ b/src/gps/GPS.h @@ -29,7 +29,8 @@ typedef enum { GNSS_MODEL_MTK_L76B, GNSS_MODEL_MTK_PA1616S, GNSS_MODEL_AG3335, - GNSS_MODEL_AG3352 + GNSS_MODEL_AG3352, + GNSS_MODEL_LS20031 } GnssModel_t; typedef enum { @@ -239,4 +240,4 @@ class GPS : private concurrency::OSThread }; extern GPS *gps; -#endif // Exclude GPS \ No newline at end of file +#endif // Exclude GPS From 2c654454cffabdd165311ac7bac3770ba975b53b Mon Sep 17 00:00:00 2001 From: Austin Date: Sat, 4 Jan 2025 14:39:37 -0500 Subject: [PATCH 3/7] meshtasticd debian source package (#5741) --- bin/.gitignore | 1 + debian/.gitignore | 6 ++++++ debian/changelog | 5 +++++ debian/control | 25 +++++++++++++++++++++++++ debian/meshtasticd.dirs | 3 +++ debian/meshtasticd.install | 6 ++++++ debian/rules | 15 +++++++++++++++ debian/source/format | 1 + debian/update_changelog.sh | 5 +++++ 9 files changed, 67 insertions(+) create mode 100644 bin/.gitignore create mode 100644 debian/.gitignore create mode 100644 debian/changelog create mode 100644 debian/control create mode 100644 debian/meshtasticd.dirs create mode 100644 debian/meshtasticd.install create mode 100755 debian/rules create mode 100644 debian/source/format create mode 100644 debian/update_changelog.sh diff --git a/bin/.gitignore b/bin/.gitignore new file mode 100644 index 0000000000..5b6b0720c9 --- /dev/null +++ b/bin/.gitignore @@ -0,0 +1 @@ +config.yaml diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 0000000000..b36ab39fc1 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,6 @@ +.debhelper +debhelper-build-stamp +meshtasticd +files +meshtasticd.substvars +meshtasticd.postrm.debhelper diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000000..5dd6fb1c0a --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +meshtasticd (2.5.19) unstable; urgency=medium + + * Initial packaging + + -- Austin Lane Thu, 02 Jan 2025 12:00:00 +0000 \ No newline at end of file diff --git a/debian/control b/debian/control new file mode 100644 index 0000000000..b00c6d78ea --- /dev/null +++ b/debian/control @@ -0,0 +1,25 @@ +Source: meshtasticd +Section: misc +Priority: optional +Maintainer: Austin Lane +Build-Depends: debhelper-compat (= 13), + python3-pip, + python3-venv, + git, + g++, + pkg-config, + libyaml-cpp-dev, + libgpiod-dev, + libbluetooth-dev, + libusb-1.0-0-dev, + libi2c-dev +Standards-Version: 4.6.2 +Homepage: https://github.com/meshtastic/firmware +Rules-Requires-Root: no + +Package: meshtasticd +Architecture: any +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Meshtastic daemon for communicating with Meshtastic devices + Meshtastic is an off-grid text communication platform that uses inexpensive + LoRa radios. diff --git a/debian/meshtasticd.dirs b/debian/meshtasticd.dirs new file mode 100644 index 0000000000..cf1ba7a373 --- /dev/null +++ b/debian/meshtasticd.dirs @@ -0,0 +1,3 @@ +etc/meshtasticd +etc/meshtasticd/config.d +etc/meshtasticd/available.d diff --git a/debian/meshtasticd.install b/debian/meshtasticd.install new file mode 100644 index 0000000000..04bf34daf5 --- /dev/null +++ b/debian/meshtasticd.install @@ -0,0 +1,6 @@ +.pio/build/native/meshtasticd usr/sbin + +bin/config.yaml etc/meshtasticd +bin/config.d/* etc/meshtasticd/available.d + +bin/meshtasticd.service lib/systemd/system diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000000..5486611a65 --- /dev/null +++ b/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +# Use the "dh" sequencer +%: + dh $@ + +override_dh_auto_build: + # Terrible hack to use modern platformio to build the native version + python3 -m venv venv + venv/bin/pip install platformio + venv/bin/platformio run -e native + rm -rf venv + # Move the binary and default config to the correct name + mv .pio/build/native/program .pio/build/native/meshtasticd + cp bin/config-dist.yaml bin/config.yaml diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 0000000000..9f6742789c --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (native) \ No newline at end of file diff --git a/debian/update_changelog.sh b/debian/update_changelog.sh new file mode 100644 index 0000000000..60af345112 --- /dev/null +++ b/debian/update_changelog.sh @@ -0,0 +1,5 @@ +#!/usr/bin/bash +export DEBEMAIL="github-actions[bot]@users.noreply.github.com" +dch --newversion "$(python3 bin/buildinfo.py short)-1" \ + --distribution unstable \ + "GitHub Actions Automatic version bump" From 7c21d7761cf8f63e8acdfe09be7ede63a3a9c379 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 4 Jan 2025 14:12:54 -0600 Subject: [PATCH 4/7] Move the RFM9x to config.available (#5742) --- bin/config-dist.yaml | 6 ------ bin/config.d/lora-Adafruit-RFM9x | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 bin/config.d/lora-Adafruit-RFM9x diff --git a/bin/config-dist.yaml b/bin/config-dist.yaml index 49de1675be..e68b01ba3c 100644 --- a/bin/config-dist.yaml +++ b/bin/config-dist.yaml @@ -12,12 +12,6 @@ Lora: # IRQ: 17 # Reset: 22 -# Module: RF95 # Adafruit RFM9x -# Reset: 25 -# CS: 7 -# IRQ: 22 -# Busy: 23 - # Module: RF95 # Elecrow Lora RFM95 IOT https://www.elecrow.com/lora-rfm95-iot-board-for-rpi.html # Reset: 22 # CS: 7 diff --git a/bin/config.d/lora-Adafruit-RFM9x b/bin/config.d/lora-Adafruit-RFM9x new file mode 100644 index 0000000000..2d64f1f918 --- /dev/null +++ b/bin/config.d/lora-Adafruit-RFM9x @@ -0,0 +1,5 @@ +# Module: RF95 # Adafruit RFM9x +# Reset: 25 +# CS: 7 +# IRQ: 22 +# Busy: 23 \ No newline at end of file From 7480378aed611dad0acf5ea0b2e288f67ba13348 Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 4 Jan 2025 14:37:13 -0600 Subject: [PATCH 5/7] Update debian build rules --- debian/rules | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debian/rules b/debian/rules index 5486611a65..ee8e74c324 100755 --- a/debian/rules +++ b/debian/rules @@ -7,8 +7,10 @@ override_dh_auto_build: # Terrible hack to use modern platformio to build the native version python3 -m venv venv - venv/bin/pip install platformio - venv/bin/platformio run -e native + source venv/bin/activate + pip install platformio + platformio run -e native + deactivate rm -rf venv # Move the binary and default config to the correct name mv .pio/build/native/program .pio/build/native/meshtasticd From eb72ee0fc19b435ff435ca2f4b31f2ba24870eea Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 4 Jan 2025 14:51:36 -0600 Subject: [PATCH 6/7] don't use "source" for deb builds --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index ee8e74c324..2ea031c51e 100755 --- a/debian/rules +++ b/debian/rules @@ -7,7 +7,7 @@ override_dh_auto_build: # Terrible hack to use modern platformio to build the native version python3 -m venv venv - source venv/bin/activate + . venv/bin/activate pip install platformio platformio run -e native deactivate From 6aabbedc006bd48def207d5b8337f6dfffb6447f Mon Sep 17 00:00:00 2001 From: Jonathan Bennett Date: Sat, 4 Jan 2025 15:41:49 -0600 Subject: [PATCH 7/7] Last Ditch effort for PPA build --- debian/rules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/debian/rules b/debian/rules index 2ea031c51e..c60d611a42 100755 --- a/debian/rules +++ b/debian/rules @@ -6,12 +6,12 @@ override_dh_auto_build: # Terrible hack to use modern platformio to build the native version - python3 -m venv venv - . venv/bin/activate - pip install platformio + # python3 -m venv venv + # . venv/bin/activate + pip install platformio --break-system-packages platformio run -e native - deactivate - rm -rf venv + # deactivate + # rm -rf venv # Move the binary and default config to the correct name mv .pio/build/native/program .pio/build/native/meshtasticd cp bin/config-dist.yaml bin/config.yaml