Meshtastic-Apple icon indicating copy to clipboard operation
Meshtastic-Apple copied to clipboard

🐞 [Bug]: Range Test module settings on-node are not respected in-app

Open Kealper opened this issue 2 months ago • 4 comments

Before submitting

  • [x] I have searched existing issues to make sure this bug hasn't already been reported
  • [x] I have updated to the latest version of the software to verify the issue still exists

Firmware Version

2.6.11.60ec05e

What did you do?

Make sure Range Test is completely disabled on your connected node, then, using a secondary node on the same mesh, enable Range Test with a non-zero interval (say, 30).

Expected Behavior

Since the firmware still forwards those packets to the connected app, if the app sees the module is disabled, it should suppress displaying those received packets from other nodes.

Current Behavior

If the Range Test module is disabled in the connected node's settings, the app still shows received "seq" packets on the channel that the packet was received in if another nearby node has the module enabled and beaconing.

Participation

  • [ ] I am willing to submit a pull request for this issue.

Additional comments

No response

Code of Conduct

  • [x] I agree to follow this project's Code of Conduct

Kealper avatar Oct 01 '25 11:10 Kealper

This is a big problem, and it's the biggest reason that Range Tests are very hard to do, if you do them with default settings you will bother everyone with an iOS app. Is anyone else working this? I want to try my hand at making a PR but I've never developed for mobile apps and I don't have the ability to test an iOS app.

emilyboda avatar Oct 16 '25 15:10 emilyboda

So, from what I can see:

When the Range Test module is disabled on your connected node, the app still shows range test "seq" packets from other nodes on the mesh that have Range Test enabled. The app is definitely not respecting the local node's module settings.

The cause seems pretty straightforward:

There is a wantRangeTestPackets variable defaulted to true, and the initialization logic only set it to true when enabled but never set it to false when disabled, so it stays at the default true value.

I'll see if I can submit a fix/PR. The code is around here:

Meshtastic/Accessory/Accessory Manager/AccessoryManager+MQTT.swift

if fetchedNodeInfo.count == 1 && fetchedNodeInfo[0].rangeTestConfig?.enabled == true { wantRangeTestPackets = true

martinbogo avatar Oct 17 '25 01:10 martinbogo

@martinbogo I attempted to fix the code here, although I have no idea how to test it or if it works. Please feel free to edit it if it's helpful, or start from scratch if I'm completely on the wrong track. I'm certainly not an iOS developer: https://github.com/meshtastic/Meshtastic-Apple/pull/1466

emilyboda avatar Oct 17 '25 02:10 emilyboda

Fixed in https://github.com/meshtastic/Meshtastic-Apple/pull/1489

compumike avatar Oct 28 '25 19:10 compumike