[Bug]: NeighborInfoApp stopped broadcasting over LoRa
Category
Other
Hardware
Not Applicable
Is this bug report about any UI component firmware like InkHUD or Meshtatic UI (MUI)?
- [ ] Meshtastic UI aka MUI colorTFT
- [ ] InkHUD ePaper
- [ ] OLED slide UI on any display
Firmware Version
2.7.10, 2.7.11, 2.7.13
Description
I'm maintaining a node monitoring dashboard that relies on nodes broadcasting their neighbor info over lora.
We have around 300 active nodes in the area. I am running 6 nodes myself with different hardware (RAK, LILYGO, Raspberry Pi,...).
Around the time of the release of 2.7.10 or 2.7.11 I noticed neighbor info to gradually disappear from the mesh. This includes the nodes I maintain.
I have primary and secondary channels, I have reduced the broadcast interval to 7200 seconds, and I enabled the LoRa checkbox.
But it wouldn't get broadcasted and I see less and less neighbor info on our mesh. I'm at this point fairly confident that the neighbor info app module might be bugged.
Any idea what change has caused this?
Relevant log output
Hi, here are the list of patches to the module https://github.com/meshtastic/firmware/commits/develop/src/modules/NeighborInfoModule.cpp
Confirming everyone's primary channel is not the default key/settings?
Thanks for that pointer. It looks like the issue was introduced in #7493
From how I read the code, is that not sending neighbors also does not request neighbors.
The deleted comment reads:
// send regardless of whether or not we have neighbors in our DB,
// because we want to get neighbors for the next cycle
I'm by no means expert in meshtastic firmware but from how I read this pull request, by disabling empty neighbor info broadcasts, we also do not tell neighbors that we want that information.
Could this be a regression?
It could well be
Ok, here are some findings after carefully reading the code.
NeighborInfoModule()constructor documentation indicates that we send out a broadcast 35 seconds after boot- potential issue: there is no line of code that looks like a 35 seconds delay nor a broadcast. did we purge such an initial broadcast in the past?
runOnce()is never called unless this is inherited somewhere? (I don't understand how this part of the code is invoked) but it's the only place that actually callssendNeighborInfo(). but even if, it is literally called "run once" and not on interval or anything - can we ensure we actually still call send neighbor info somewhere?neighborsis private to the NeighborInfoModule, so it can only be updated inside that module- potential issue: if nobody is sending neighbor info, how do we gather neighbors?
- We have
neighbors.sizeandneighborInfo->neighbor_countbut I'm not sure that's relevant - We do not broadcast neighbor info unless
neighbor_count > 0- potential issue: some mechanics could lead neighbor count to cascade down to 0 over time and we never broadcast any neighbors anymore
- We remove
neighborsif we didn't get their neighbor info in the lastnode_broadcast_interval_secs * 2- potential issue: this might be too strict of a window, especially if users set a very small interval (e.g., 3600)
- There is an instance of
getOrCreateNeighbor()where we do not know thenode_broadcast_interval_secsand set it to 0.- potential issue: this neighbor will always be purged on next run of
cleanUpNeighbors()
- potential issue: this neighbor will always be purged on next run of
Since the initial issue (MQTT spam) mentioned in the PR linked above was resolved elsewhere, could we attempt reverting #7493 to see if we can restore normal neighbor info app module behavior?
Testing my patch in #8584 was inconclusive, so the underlaying problem might be caused by a different part of the firmware.
Something else I observed: I receive neighbor info via serial connection but not via LoRa even though I'm sitting right next to the node with a receiver and "transmit via LoRa" is enabled. Is the serial port consuming this before it gets out to the aether?
I also have big network and the same problem. My node has around 30 neighbours... maybe neighbour info simply cannot fit into single packet?
This issue has not had any comment or update in the last month. If it is still relevant, please post update comments. If no comments are made, this issue will be closed automagically in 7 days.
This issue has not had any comment since the last notice. It has been closed automatically. If this is incorrect, or the issue becomes relevant again, please request that it is reopened.