-
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 can't look in detail right now, but did you move away from the home position more than 4 metres. The standard settings also expect a minimum altitude above field of 4 m, but you can change that to 0 in config.h |
yes distance is more than 4 meters but altitude not. i try with zeros than |
cant find this in config. How it can be named? |
Ok i found it in globals. I set both to 0 and test again and same results... :( i have no idea what is wrong |
Ok, I got to looks at this at home now. Can I ask you to please try v2.22.12. I fixed an issue for someone else that can be related. Unfortunately these beta revisions are moving forward quite quickly. |
sorry for long time no answer but i was sick. Today i have some free time to test and i have same problem - tracker wont track.
|
Can changes be made when altitude is 0 or below then the azimuth servo will work? |
Hello, yes this was done in v2.22.13
|
this was the version 2.22.13 - it set minAltAg to 0, but if altitude go to 0m then gpsGood flag is false, and tracker not work. How i can change it? |
Ah, ok, let me check this |
Ok, I have removed minAltAg completely as IRL it hampers testing. Please try V2.22.14. |
Awww :/ still the same. Eric tell me please function moveMotors and poinMotors work both for servos? |
In testMotors() function which runing on start there is moveMotors function and it worked, but at the end of the main file where is the logic(?) is used pointMotors... it should work for me? |
ok, now i see the moveMotors run inside pointMotors. |
gpsGood is jumping when change to 0m becouse of condition i found: |
Hello, I will look at this as soon as I can |
I make changes what i wrote but after it app crash i dont know why |
hello again, sorry for the delay. You have done a great job identifying two problems with the crsf code for backpack. Now I set all flags good when number of sats >= 5, like this:
Also telemGood is now set for ESP_Now / Backpack. Thank you for the great detective work! v2.22.15 contains the fixes |
ok, its better now but still i got problem with new_GPS_data flag. Its all time is false even when coordinates changed. |
Could you please try again after activating these debug macros:
The Arduino version of 2.22.15 is updated in v2.22.15b |
why FRSKY? im using CRSF |
This is log from today with this macros
|
Can you please try v2.22.15 |
this is 2.22.15 but from PIO - PATCH_LEVEL is not changed ;) |
ok. |
Sorry about Frsky reference, I'm with family and using my phone,lol. I can't find an identifier called new_GPS_data? |
in main.cpp there is condition before pointMotors:
i think it need be edited in crsf.cpp:
now:
i will test it tomorrow |
Yes, I believe you are right. I'm working from memory, but your change should work. Very good! Just add semicolon of course
|
ok we got it 😄 on log it working. Next i will test with servo on field, but it must be good now :)
|
Yeah, this looks better. I'll wait to hear how it works in the field. |
Any plans to have SPI input connection?
Edit:
Support for ESP-Now protocol
The text was updated successfully, but these errors were encountered: