-
-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding support for Meshtastic (Bircom) #301
Comments
Sounds super cool.
I'm busy today let's discuss tomorrow!
…On Sun, Sep 1, 2024, 11:51 Ketan Padegaonkar ***@***.***> wrote:
Hello there -
As you may or may not be aware, sat comm devices (like Inreach and Spot)
are illegal to operate in India without an operating license from the
government. I'm part of volunteer team that is building a tracking network
for pilots in Bir/Biling in India based on a mesh technology called
meshtastic <https://meshtastic.org> mesh network. We already have a
tracker in place at https://tracker.bircom.in.
Since flyxc is a great app that's used and trusted by many pilots - I'm
wondering if you'd be open to integrating with our tracker. I have some
questions in terms of how you integrate with other trackers right now, so I
can contribute back to this repository.
For context - our mesh network captures the following details:
- unique device identifier
- short name (initials) to show on the map
- long name - for better identification
- gps co-ordinates, along with timestamps
- baro altitude, along with timestamps
- (optional) some device details - hardware and firmware versions
From a design point of view, we can push these packets to you as and when
we see the packets (we have a mqtt backend), or we can offer any APIs as
you see fit for you to periodically pull this information.
Let me know, thanks!
—
Reply to this email directly, view it on GitHub
<#301>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAB4X4XGZVJ2DAQ3JTNJQITZULPSLAVCNFSM6AAAAABNOV6KY2VHI2DSMVQWIX3LMV43ASLTON2WKOZSGQ4TSMZVGIYTGOI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
Ketan, First of all thanks for contacting flyXC. I'm all for integrating your platform in flyXC. A few notes on how flyXC works:
For 1, there needs to be some kind of id/SSO to connect your platform to flyXC. The pilot name is defined on the flyXC account so that every platform uses the same name. For 2, pushing to flyXC sounds better to me so that flyXC does not keep pulling your server while nobody is flying. flyXC needs to receive lat/lon/alt and some kind of id. You can optional send the speed, heading and messages (landed ok, need help, ...) I'm based on France, Paris TZ. We can discuss more tomorrow. Please send any question you have. |
For the push based system - do you have some sample code that I can look at? I suppose that for the identifier bit, you'd probably expect that a tile is added to https://flyxc.app/devices that allows collecting some identifier/token corresponding to the user on my tracking system? |
Here is our current way of getting these devices to flyxc via skylines. https://bircom.in We would like to avoid skylines step, we could use the same way to push to flyxc as we do to skylines if that works.
Please note that the devices don’t have internet connection, the data is sent by base stations that are connected to internet. We cannot collect passwords so the push has to be key based or dummy password like skylines. Livetrack24 doesn’t work as it needsa proper password. This is what our raw data looks like: |
Yes, there would be a new card on the devices page. I can create a POST endpoint on flyxc.app (i.e. flyXC/apps/fxc-server/src/app/routes/zoleo.ts Lines 131 to 147 in 6be1593
I can update the code for those 2 steps - it should not take me much longer than 1h. What is left to be defined:
|
Each of the device has unique ID like "!674c3f41" which we can ask user to register their device with flyxc. This is the raw packet we get from the device.
|
How can we validate those id:
About the payload:
|
Yes, this is the known structure "!" followed by 8 hex digits, like the skylines user ID, users can add this to flyxc settings.
Converting that hex get you the decimal, which can be used to query like this:
One message like the packet example shared per push.
Yes, unix timestamp
yes
not sure about that
Position Dilution of Precision (PDOP), which can be ignored
yes, this is what the text packet look like:
|
Is there any way to add the lat/lon/alt in the packet on your side? If not I can get the position at around rxTime. What name should I use for your platform? "meshtastic", "bircom", ... and what stable link can I use to give users more info about the platform. I think I can the implementation ready by tomorrow. |
What would help is a payload sample for each of the message you can push (position, text message, any other?) Thanks! |
Nope, you can use last position received.
Meshtastic, as that is the project firmware we are using. More information on https://bircom.in. We will update the page for getting the devices registered on flyxc.
You're the best :) |
Position packet:
🙏 |
You can email me at victor at the app domain to agree on a way to authenticate your push requests |
We are revisiting device ID. Thinking of using hash of id + shortname + longname. This way the device can be used by different pilots and the tracks will show under their account. |
Wouldn't that be a problem if a pilot updates its name? (they would have to update the ID in flyxc, right?) |
Yes, new pilot will get unique key if he uses the device used by someone else already registered to flyxc and if pilot changes his name then they'll update the key on flyxc. |
Let me know what the format looks like so that I can validate with a regexp when a device is registered |
Yes, 0-359 |
Hi @vicb - I'll take over this implementation from @cyberorg from pushing the data point of view. Here's what I can send you as a reference. Can change the contract as you wish, if there's any optional data or additional that you can use, let me know: Again, all of this is just indicative as reference, and open to change based on your needs. curl -X POST https://flyxc.app/api/bircom/push \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer [TOKEN]' \
-d '{
"type": "message",
"user_id": "xxxxx",
"time": "2024-09-02T10:01:12.000Z",
"message": "I have landed safely, waiting for pickup"
}' curl -X POST https://flyxc.app/api/bircom/push \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: bearer [TOKEN]' \
-d '{
"type": "position",
"user_id": "xxxxx",
"time": "2024-09-02T10:01:12.000Z",
"latitude": 32.1927,
"longitude": 76.4506,
"altitude": 1778.12,
"baro_pressure": 1012.24,
"ground_speed": 30,
"heading": 90,
"satsInView": 12,
}' The payload structure. This is the data we have:
|
I believe this may not be needed, we'll ensure that we're sending valid device IDs right away. That said, we'll be making improvements (probably in the next few weeks/months) to allow signups so we get more stable user-ids. |
If you'd like to have a quick connect, let me know - we can setup a quick zoom per your convenience. |
Nice format! A few comments:
|
Thanks!
Updating based on your inputs
Removed fields
|
I've added my implementation here The payload is here |
flyXC changes have been merged, let me know how the testing goes. Thanks 🙏 |
Awesome! You must be tired of hearing “you’re the best”.
…On Tue, 3 Sep 2024 at 12:58 AM, Victor Berchet ***@***.***> wrote:
flyXC changes have been merged, let me know how the testing goes.
Thanks 🙏
—
Reply to this email directly, view it on GitHub
<#301 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ5Q6UNVDECA6CHBEQPJB3ZUS35FAVCNFSM6AAAAABNOV6KY2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRVGIZTANJQGU>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi @vicb - thanks for implementing this quickly. I'm unable to push to the endpoint, getting a 405 method not allowed.
I also tried with plain old curl, to no avail. |
Quick update - I changed the post url to When you get the time, please let me know if this is because of some input errors? Thanks |
That's probably a validation error |
Reopening this issue:
|
Here's my curl request (I've removed the token, my user ID is specified here)
|
You have a typo, it should be curl https://api.flyxc.app/api/bircom/push \
-H 'Content-Type: application/json' \ <- missing ":"
-H 'Authorization: Bearer XXXXXX' \
-d '...' or
|
I added support for Bircom messages to flyXC. Please test the integration and report on that issue. Your platform is very nice. Hopefully more PG communities around the world will get inspired by your use of Meshtastic. Have a great day |
I'm able to see myself on the map! Thanks a bunch, although unsure why @cyberorg is not able to see himself. One interesting side-effect of how this is implemented is that I'm seeing 500 errors for when submitting data points for devices that are not registered on flyxc. Could you perhaps respond with a 404 or something if the |
There is no validation of the account on the endpoint flyXC/apps/fxc-server/src/app/routes/meshbir.ts Lines 14 to 30 in 9155021
The reason why you receive a 500 error is that one of the field is malformed (user_id?) Anyway I'll change the return status to:
|
You are right. Then I don't believe a change is necessary at your end. I'm getting a 200 OK if I send a device id that looks valid, but does not exist in your DB, and that I think is reasonable. You accepted the packet, it looked good, and you accepted it, decided to do nothing with it :) About 429 - how long is the queue length, and processing rate? |
Could you please also regenerate our token please? @cyberorg accidentally pasted the token here. My email address is `ketanpadegaonkar [at] gmail.com]. Thanks Apologies for the inconvenience. |
See #307 for the status changes.
np, I'll email you an updated token |
The VM that processes the messages ("fetcher") has no static/public IP currently. That's why the server (Google App Engine) collects the messages and enqueue them in Redis for the fetcher to consume on every tick (1min). The fetcher will discard any message that is not associated with a registered ID. |
And for @cyberorg, the only reasons why you might not show up on the map after a 200 are:
|
Looks like everything is working now 🎉 |
It worked, then it stopped again! What would you want me to try? position is not being updated and my device messages haven’t showed up yet. |
Yes, updated token, kept my device on, it is sending positions every 2 min. Nope something messed up with post if you sent by that. |
Can you capture a request and email it to me? |
I have some incoming requests with |
Mine is 9d5bb902-... Sent you mail about txt message. For position, curl works, so @ketan will have to figure out at his end why push from there is not working. |
Hello there -
As you may or may not be aware, sat comm devices (like Inreach and Spot) are illegal to operate in India without an operating license from the government. I'm part of volunteer team that is building a tracking network for pilots in Bir/Biling in India based on a mesh technology called meshtastic mesh network. We already have a tracker in place at https://tracker.bircom.in.
Since flyxc is a great app that's used and trusted by many pilots - I'm wondering if you'd be open to integrating with our tracker. I have some questions in terms of how you integrate with other trackers right now, so I can contribute back to this repository.
For context - our mesh network captures the following details:
From a design point of view, we can push these packets to you as and when we see the packets (we have a mqtt backend), or we can offer any APIs as you see fit for you to periodically pull this information.
Let me know, thanks!
The text was updated successfully, but these errors were encountered: