Missing advertisement location enablement setting? #24

Closed
opened 2026-10-05 01:53:37 +02:00 by adam · 7 comments
Owner

I think there's a missing get/set toggle for "Advertisement Location Policy".

So while a user can change the latitude/longitude from your Settings UI, they can't toggle it to be used (or not) in advertisements.

FYI: I think the meshcore-py call is set_advert_loc_policy().

I think there's a missing get/set toggle for "Advertisement Location Policy". So while a user can change the latitude/longitude from your Settings UI, they can't toggle it to be used (or not) in advertisements. FYI: I think the meshcore-py call is `set_advert_loc_policy()`. <!-- github-sync-id:4062126580 -->
adam closed this issue 2026-10-05 01:53:37 +02:00
Author
Owner

Ah good catch; thanks. Will fix that.

Ah good catch; thanks. Will fix that. <!-- github-comment-id:4043969308 -->
Author
Owner

Alrighty, I've added that, although my library doesn't have the power (and my serial kung fu has failed) to actually ENABLE GPS on the device, but now you can configure whether GPS is sent or not, and whether from the app setting or the radio's GPS chip (but you gotta turn that on manually).

Lemme know if that works for you.

Alrighty, I've added that, although my library doesn't have the power (and my serial kung fu has failed) to actually ENABLE GPS on the device, but now you can configure whether GPS is sent or not, and whether from the app setting or the radio's GPS chip (but you gotta turn that on manually). Lemme know if that works for you. <!-- github-comment-id:4044136440 -->
Author
Owner

I tested "Use Saved Coordinates" and that looks to include the location specified. And when toggling it back to "Off" no longer included it.

I don't have a way of testing GPS at the moment; but for my purposes we're golden.

I tested "Use Saved Coordinates" and that looks to include the location specified. And when toggling it back to "Off" no longer included it. I don't have a way of testing GPS at the moment; but for my purposes we're golden. <!-- github-comment-id:4044308903 -->
Author
Owner

Awesome; glad to hear it works at least as far as toggle on/toggle off goes, which is all I can test right now from the road without a gps enabled radio with me haha. Thanks for the ask and confirm!

Awesome; glad to hear it works at least as far as toggle on/toggle off goes, which is all I can test right now from the road without a gps enabled radio with me haha. Thanks for the ask and confirm! <!-- github-comment-id:4044340769 -->
Author
Owner

Was poking around the firmware code (where I'm much more comfortable), and I think the advert_loc_policy is really only 0 or 1 for companion radios.

https://github.com/meshcore-dev/MeshCore/blob/792f299986619aa62dad937f717d21e9d1b1882b/examples/companion_radio/NodePrefs.h#L8

#define ADVERT_LOC_NONE       0
#define ADVERT_LOC_SHARE      1

So your 3-way toggle is likely moot (and everything works out because the firmware just checks for against NONE.
https://github.com/meshcore-dev/MeshCore/blob/792f299986619aa62dad937f717d21e9d1b1882b/examples/companion_radio/MyMesh.cpp#L1197

Was poking around the firmware code (where I'm much more comfortable), and I think the `advert_loc_policy` is really only `0` or `1` for companion radios. https://github.com/meshcore-dev/MeshCore/blob/792f299986619aa62dad937f717d21e9d1b1882b/examples/companion_radio/NodePrefs.h#L8 ``` #define ADVERT_LOC_NONE 0 #define ADVERT_LOC_SHARE 1 ``` So your 3-way toggle is likely moot (and everything works out because the firmware just checks for against `NONE`. https://github.com/meshcore-dev/MeshCore/blob/792f299986619aa62dad937f717d21e9d1b1882b/examples/companion_radio/MyMesh.cpp#L1197 <!-- github-comment-id:4047401612 -->
Author
Owner

I think the only way to get the GPS location itself is via meshcore-py get_self_telemetry()? But there doesn't seem to be an "automatic" way to update it in the advert itself. (Which is probably a safer/saner policy.)

I think the only way to get the GPS location itself is via meshcore-py `get_self_telemetry()`? But there doesn't seem to be an "automatic" way to update it in the advert itself. (Which is probably a safer/saner policy.) <!-- github-comment-id:4047554714 -->
Author
Owner

Ah right you are. I was assuming that setting vs. allowing population of the sensor value would be relevant but it's not. I'll tweak that option out.

Ah right you are. I was assuming that setting vs. allowing population of the sensor value would be relevant but it's not. I'll tweak that option out. <!-- github-comment-id:4048082749 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Remote-Terminal-for-MeshCore#24