-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
chore(gx12): add Bluetooth pin definitions #5876
Conversation
modified: radio/src/targets/taranis/CMakeLists.txt modified: radio/src/targets/taranis/hal.h
…X12" This reverts commit d9773a5. modified: radio/src/targets/taranis/CMakeLists.txt modified: radio/src/targets/taranis/hal.h
modified: radio/src/targets/taranis/CMakeLists.txt modified: radio/src/targets/taranis/hal.h
Something is not quite right yet. A master that is already paired works, but can't pair with new devices. |
Probably better to leave this open for now, but marked as a draft. Can you keep a running log of what its and isn't working so far, so don't need to filter through the chat in discord to see the status of the PR ;) |
What's working: What's not: |
What BT module are you using? As in addition to TX/RX there is usually an enable pin, that soft turns the bluetooth "module" on or off. Nice... making some progress already though :) |
I'm using the Horus para adapter. I've wired it up through a vreg to reduce voltage to 3.3. Only TX/RX plus power are connected. Same adapter worked perfectly on RM Boxer, which only had those pins. When I transplanted the adapter, it preserved the pairings, and I was greeted with a "Trainer Connected" message after setting up the pins for the GX12. Upon updating my config from companion, pairings were cleared, and I can not make a new pairing. |
I'm wondering if this is really BT related, or something else with EdgeTX. Why would the 'Exit/Return' and 'Enter' buttons stop working in the discovery dialog? The radio is not locked, as I can continue to scroll through the slaves even after attempting a selection, but I can never confirm or leave the dialog. |
Possibly... the state machine for bluetooth handling could be getting stuck if the BT module isn't responding the way it expects, and the UI unable to continue (although it seems like it should have some fault tolerance around that)... and it seems like from the looks of that code that PD.8 and PD.9 are correct per the schematic, and the boot pin on that header is linked to PA.06 via a NPN transistor. Might be worth defining
|
Something like, @@ -2829,20 +2829,25 @@
#elif defined(PCBX9LITES)
#define BT_EN_GPIO GPIO_PIN(GPIOD, 14) // PD.14
#elif defined(MANUFACTURER_RADIOMASTER)
- #if defined(RADIO_POCKET)
+ #if defined(RADIO_POCKET) || defined(RADIO_GX12)
#define BT_EN_GPIO GPIO_PIN(GPIOA, 6) // PA.06
#endif
#else
#define BT_EN_GPIO GPIO_PIN(GPIOE, 12) // PE.12
#endif |
Yup, that looks good. No need to duplicate :) |
No joy. I'm sure it's more correct now that the pin is defined, but still no confirm, no exit. |
I managed to get some logging enabled for bluetooth to the internal storage, not really sure what to make of it. I also noted that once I get locked into the discover UI, plugging in a usb cable just makes the radio do a pulsing beep, and the USB mode UI doesn't come up. Only power cycling gets me back to functional. I'll attach a log. There are some successful connections, but those are only after I move the adapter to a boxer, pair and then move it back. |
So whatever the issue is, it's not local to the GX12. I just did a build from the same checkout for the Boxer. It's exhibiting the exact same behavior as the GX12. |
This PR is only what it claims to be, modifications to enable BT on GX12. Mostly pin assignments. However, BT is broken in 2.11, this does not fix that. |
In conjunction with #5918, this looks to give BT to the GX12. |
Summary of changes: