-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support for ELRS Backpack ESP-NOW protocol #80
Comments
Can you share specifications with me. Not SPI, but the backpack? |
All the detailed info from here |
it will be cool! but why SPI? it working wireless via espnow protocol |
Apology, got confused between Backpack Telemetry and Backpack for VRX I also checked the Sentinel AAT procedure, it does not mention for ELRS RX, so its only using esp-now protocol. If you can manage to implement the esp-now protocol it would be perfect. |
Ah, ok, we can do this. But give me a bit of time. I have some other things in the queue :) |
Here we go....... Thank you so much.... |
v2.22.02 ESP_NOW backpack is coded but not tested. Testers would be much appreciated and likely to speed up delivery of the final version. |
Ok, i have happymodel es24tx pro. Already flashed backpack, but how i can bind my tx with esp? There is only option to tun on telemetry. How this will work? |
Like you I'm learning as we move forward. ESP_NOW works on MAC addresses for point-to-point, but it can also broadcast. Since you have a backpack, can you shed some more light on the interface? |
I think we need get one more esp. Like sentinel antenna tracker has additional esp12 bacpack which need to flash with elrs backpack firmware. Source: https://www.expresslrs.org/software/backpack-telemetry |
Maybe this PR will be helpful - its add firmware for MFD crossbow tracker backpack. |
Im not developer but it must be this function: |
This is great feedback, thank you. I understand that they hash the MAC with your binding phrase to create a pseudo MAC. I can't look right now, but tomorrow for sure |
The important parts of this function appear to be:
Six bytes from GroupAddress, stored in EEPROM, are moved to firmwareOptions.uid. (uid == unique identifier). Then the first byte is AND with 0x01, and those 6 bytes are used to set the wifi custom mac. So I assume the hashed mac is already sitting in non-volatile memory, in config / GroupAddress |
GroupAddress is set during binding, with this line in the code snippet below:
|
The ESP_Now callback function is this one, I think:
|
So during the binding phase, the first ESP_NOW packet seems to have the spoofed MAC, and it is stored in NVM. Maybe I can write a some code for you to flash that will print out all ESP_Now packets. Or you could flash backpack with DBG enabled. |
i dont know how to flash backpack with DBG and how read it, but if you point me i can do it |
You need to install VS_Code, and then the ESP-IDE extension from inside VS_Code. https://code.visualstudio.com/docs/setup/setup-overview https://docs.espressif.com/projects/esp-idf/en/v4.2.3/esp32/get-started/vscode-setup.html Assuming you have cloned https://github.com/ExpressLRS/Backpack/tree/master to your local drive, then open the whole "Backpack" folder from VSC (File/Open folder), then click the tick to build, and the right arrow to flash. on the bottom line It might take a while to download and build all the dependencies. There is a fairly steep learning curve, but if you are interested in learning to code it is a good step forward. |
The above might be a bit too much to start with. Maybe I can give you a binary to flash with the ESP Flash Tool. |
uid is generated from passphrase |
i found in betafligh repo nice function to calculate uid from passphrase
and we get the UID :) |
what we need to obtain from it? |
Nice. I will look at this. |
I've been reading here, and think my next step is to setup backpack here for myself. I have a Happymodel ES24TX, so if I flash it with the latest firmware I should be able to do some live testing. |
Hi. I have used the u360gts tracker. Its not in active development, but worked quite ok. Now after i switched to ExpressLRS i can see backpack functionallity. I was able to get the data from the backpack by installing the MFD Crossbow into an ESP32 C3. Link: https://www.expresslrs.org/software/mfd-crossbow/ Now that outputs all data in MavLink v2 protocol, i think that data can be used to get the location by Your tracker. Also the source code should be in github, requires version 3.5.0 and backpack 1.5. Maybe this can help You to integrate the reciever? I can help in testing if wanted as my backpack setup is ready and working (on bench). I use the old FLIP32 board (NAZE32) to control by tracker. I think its time to update it with an ESP32, just interesting if the C3 Super Mini can be enough to drive it? |
Family obligations have kept my occupied this last week, but yesterday I separated out the RX5808 backpack code into a free standing project, built and flashed. I also updated my Happymodel ES24TX Pro firmware to v 3.4.3. So now I have something to work with, and I can see what is required, and can test a solution. pki791 Thank you very much for this steer. It should also be very helpful. It sounds like a nice project, and I understand outputs the mavlink gps messages, and perhaps some others. To reiterate: By including the esp_now backpack "receiver" into the tracker, we want to eliminate having an outboard piggyback/backpack board in between to supply gps, barometric and compass data. Our esp_now receiver must be bound to the backpack in back of the transmitter bay to provide security and eliminate cross-talk with other equipment on site. |
I got onto this again today, only to find that my Happymodel ES24TX Pro is an early model and does not have the ESP8285 backpack chip! I'll see if I can get a newer one. |
Thats shit, if You have something what i can load into ESP32 C3 (i can share You some demo bind code) then i can test if it works getting the ESPNOW messages. |
Ok, please share your demo code and I will do an esp_now version for esp32 c3 |
i send it to Your email |
I should get this done today. |
Whoo Hoo! Progress.. 12:03:51.333 -> These are the CRSF data frames: EA 0C 14 E2 00 64 0C 00 07 02 E7 64 0C 4D 81 |
You can try the above, but just change line 27 to include your (hashed) binding phrase
and line 150
change to
Results look like this:
|
My GPS is indoors, so lat/lon is 0 |
Seems missing terseCRSF.h: No such file or directory |
Please install terseCRSF library in your Arduino IDE. It is in zs6buj github |
Yep, dont know how to install that lib in the arduino 2.3.2 ide, but i copied the files from github and it compiles. Now that ESP32-C3 seems to be in bootloop, maybe i have some settings from the board wrong, need to figure it out. Do we have any other channel of communication to not spam here soo much? I send You email yesterday. |
OK, got it working. I needed to change the LED pin:
Works like it should.
|
Good to see. So here we are manually coding the soft mac. I will move this code into the Tracker next. After that, I will work on binding, so we automatically get the soft mac from the backpack tx. Yes, by all means use my email. |
I think it is okay to enter the hash in the config, there can be many trackers and backpacks on one field, that we do on meetings so autodetecting would be a bad idea, beside it detects the bind once and then saves. Also i see the location looks fine, but sats should not be "0". |
Ok, I'll look at SATs. Noted on the binding issue. You would normally bind at home, one time. |
v2.22.03 on GitHub. Added support for hashed binding phase soft_mac |
I test it and something wrong. My backpack wont bind with tracker. What im need to write in my_hashed_ma? |
Go into configurator, then pretend you want to flash backpack, look for MAC |
Yes, UID |
I just pushed v2.22.03c which prevents mac of 0:0:0:0:0:0. Please clone and rather use it. |
there is bug while compiling when i chose ESP32_VARIANT 1 . |
okey nvm, its compiling when set the Pup and Pdn (was -1)
|
It is true that I still need to accommodate the new pins for stepper and the button library in the other variants I have been testing on my Lilygo T-Display board. I just setup variant1 Devkit in v2.22.04b, and will do the others when I can. I used regular buttons, not touch buttons. |
Any plans to have SPI input connection?
Edit:
Support for ESP-Now protocol
The text was updated successfully, but these errors were encountered: