When spreading factor is 11 or higher the repeater won't broadcast #29

Closed
opened 2026-10-27 09:29:17 +01:00 by adam · 1 comment
Owner

airtime.py has a bug only detected when SF >= 11 as bandwidth_hz is unset.

Found from a friend testing on Femtofox, have adjusted in my fork to resolve https://github.com/theshaun/pyMC_Repeater/blob/dev/repeater/airtime.py

Error:

Feb 01 14:35:25 femtofox pymc-repeater[252]: 2026-02-01 14:35:24,974 - Dispatcher - INFO - RX GRP_TXT (5)
Feb 01 14:35:25 femtofox pymc-repeater[252]: 2026-02-01 14:35:25,059 - PacketRouter - ERROR - Router error: '<=' not supported between instances of 'NoneType' and 'int'
Feb 01 14:35:25 femtofox pymc-repeater[252]: Traceback (most recent call last):
Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/packet_router.py", line 64, in _process_queue
Feb 01 14:35:25 femtofox pymc-repeater[252]: await self._route_packet(packet)
Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/packet_router.py", line 133, in _route_packet
Feb 01 14:35:25 femtofox pymc-repeater[252]: await self.daemon.repeater_handler(packet, metadata)
Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/engine.py", line 135, in call
Feb 01 14:35:25 femtofox pymc-repeater[252]: result = None if (monitor_mode or local_transmission) else self.process_packet(processed_packet, snr)
Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/engine.py", line 636, in process_packet
Feb 01 14:35:25 femtofox pymc-repeater[252]: delay = self._calculate_tx_delay(fwd_pkt, snr)
Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/engine.py", line 585, in _calculate_tx_delay
Feb 01 14:35:25 femtofox pymc-repeater[252]: airtime_ms = self.airtime_mgr.calculate_airtime(packet_len)
Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/airtime.py", line 63, in calculate_airtime
Feb 01 14:35:25 femtofox pymc-repeater[252]: de = 1 if (sf >= 11 and bandwidth_hz <= 125000) else 0
Feb 01 14:35:25 femtofox pymc-repeater[252]: TypeError: '<=' not supported between instances of 'NoneType' and 'int'

airtime.py has a bug only detected when SF >= 11 as bandwidth_hz is unset. Found from a friend testing on Femtofox, have adjusted in my fork to resolve https://github.com/theshaun/pyMC_Repeater/blob/dev/repeater/airtime.py Error: > Feb 01 14:35:25 femtofox pymc-repeater[252]: 2026-02-01 14:35:24,974 - Dispatcher - INFO - RX GRP_TXT (5) > Feb 01 14:35:25 femtofox pymc-repeater[252]: 2026-02-01 14:35:25,059 - PacketRouter - ERROR - Router error: '<=' not supported between instances of 'NoneType' and 'int' > Feb 01 14:35:25 femtofox pymc-repeater[252]: Traceback (most recent call last): > Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/packet_router.py", line 64, in _process_queue > Feb 01 14:35:25 femtofox pymc-repeater[252]: await self._route_packet(packet) > Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/packet_router.py", line 133, in _route_packet > Feb 01 14:35:25 femtofox pymc-repeater[252]: await self.daemon.repeater_handler(packet, metadata) > Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/engine.py", line 135, in call > Feb 01 14:35:25 femtofox pymc-repeater[252]: result = None if (monitor_mode or local_transmission) else self.process_packet(processed_packet, snr) > Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/engine.py", line 636, in process_packet > Feb 01 14:35:25 femtofox pymc-repeater[252]: delay = self._calculate_tx_delay(fwd_pkt, snr) > Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/engine.py", line 585, in _calculate_tx_delay > Feb 01 14:35:25 femtofox pymc-repeater[252]: airtime_ms = self.airtime_mgr.calculate_airtime(packet_len) > Feb 01 14:35:25 femtofox pymc-repeater[252]: File "/opt/pymc_repeater/repeater/airtime.py", line 63, in calculate_airtime > Feb 01 14:35:25 femtofox pymc-repeater[252]: de = 1 if (sf >= 11 and bandwidth_hz <= 125000) else 0 > Feb 01 14:35:25 femtofox pymc-repeater[252]: TypeError: '<=' not supported between instances of 'NoneType' and 'int' > <!-- github-sync-id:3881092520 -->
adam closed this issue 2026-10-27 09:29:17 +01:00
Author
Owner

Issue resolved in the new radioBranch.

Issue resolved in the new radioBranch. <!-- github-comment-id:3945407912 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/pyMC_Repeater#29