diff --git a/CHANGELOG.md b/CHANGELOG.md index 179f473..a1f1144 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,10 +13,25 @@ All notable changes to this project will be documented in this file. - First working version. ## [1.0.1] - 2023-01-14 -- Changed: aprs_status (published on the MQTT broker) now returns actual state of transmision (sending, retrying, send or failed) instead if just 'ready' and 'busy'. + +### Changed + +- aprs_status (published on the MQTT broker) now returns actual state of transmision (sending, retrying, send or failed) instead if just 'ready' and 'busy'. ## [1.1.0] - 2023-07-08 -- Added: APRS nodes can now be polled to get there actual status. An extra section in the YAML configuration file is added for this functionality. + +### Added + +- APRS nodes can now be polled to get there actual status. An extra section in the YAML configuration file is added for this functionality. ## [1.1.1] - 2024-01-04 -- Fixed: after reconnect to MQTT broker messages from broker were not received. + +### Fixed + +- after reconnect to MQTT broker messages from broker were not received. + +## [1.1.2] - 2024-01--8 + +### Fixed + +- In parsePacket(string): Occasionally a bad APRS packet is received causing the program to crash with an "IndexError: list index out of range". Fix: check if index IS out of range before copying it to payload diff --git a/aprs-mqtt-bridge.py b/aprs-mqtt-bridge.py index 05855b0..42f6270 100755 --- a/aprs-mqtt-bridge.py +++ b/aprs-mqtt-bridge.py @@ -76,7 +76,11 @@ def parsePacket(string): source = listAddress[1] destination = listAddress[0] digipeaters = listAddress[2:] - payload = buffer[1] + # Occasionally a bad packet is received causng the program to crash with an "IndexError: list index out of range". Fix: check if index IS out of range before copying it to payload + if len(buffer) > 1: + payload = buffer[1] + else: + payload = 'NOT VALID' else: # If there was an error decoding the address we return save values which will be ignored by the rest of the program source = 'NOCALL'