-
-
Notifications
You must be signed in to change notification settings - Fork 312
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
Fix BT power level #4019
Fix BT power level #4019
Conversation
Custom settings in GUI would be nice. |
Nice find! :) It's been that way since OpenTX 2.3.0 from the looks of it... opentx/opentx@9189e43 ... prior to that it seems like it was incorrectly set (not since day one as the commit suggest, seemingly a few months earlier) opentx/opentx@b7ab0e9 ... and prior to that it was If we make it configurable, that would resolve the testing requirement, however unlikely the impact. Any idea what values are valid for |
@pfeerick Unfortunately FrSky grinds off the chip markings so I am not sure what chip it exactly is. Based on the time frame it was released and the AT Commands available I Assume its a CC2540 or a CC2541. Based on the HM-10 specs with the same chip Power levels can be from 0 to 3 while they are by default on 2. I did some dBm range testing with a BTLE Radar app and with power level 2 it has much higher dBm readings at a given distance than a HM-10 module already. Might be because I have a 2.4GHz receiver antenna installed to it while the HM10 is just a PCB trace. I think 6dB might be too much if someone does not attach an antenna to it (if its a mod) and could fry it. I think 0-2 adjustable should be fine and 1mW gives plenty of range. EDIT: Maybe a power level configuration is not actually necessary. Let me do some noise checks with the multi module spectrum analyzer and also with a second radio on power level 1 and 2. Not sure if the internal BT Module power can be switched off/on. If not maybe just change the power level to 0 if Bluetooth is not set as trainer/telemetry at all and switch to level 1 or 2 if its actually enabled. I thought about switching power up as soon as another device binds but as with the HM-10, AT commands are blocked as soon as a connection is established. |
@pfeerick I just did some spectrum testing. Spectrum analyzer directly touching the side of the TX16S while Bluetooth is sending active telemetry to the tracker. The data pulses are barely visible. Even my 5m distant wifi rounter causes way higher peaks and activity in the 2.4GHz band and when enabling the internal MPM of the TX16S it had signal spikes all over the place above the scale. So with barely any visible signal noise on the spectrum analyzer I think the 0dBm setting is totally fine. additionally bluetooth uses channel hopping anyway so it should never interfere with other 2.4GHz systems. More likely the opposite at high RC Link power. might need testing on FrSky radios with bluetooth from factory. I will put a build on my X-Lite Pro and check |
This is awesome. I always get Bluetooth annoying disconnects with my Bluetooth head tracker on T16smk2 & T16. |
A topic I raised at the time in OpenTX, I also opened an issue on the blatant problem in trainer mode, which exists but is virtually unusable. |
The wireless trainer under OpenTX only ever worked in one direction with my X-Lite Pro. So I always only could have the X-Lite as the Master/Trainer Radio and the TX16S as a slave. Not the other direction. I never got movement. But I have not tried that yet with EdgeTX. |
Shame on the x-lite. Years ago when I added the Bluetooth I quickly found out the Bluetooth was not reliable for a trainer so I just my 4in1 or use radiomaster Wt101 Dongle for my trainer. |
@Helipro Interesting that in the pictures for the MK1 (that's how I installed mine) your module has no U.FL connector. Mine has one where I conencted a old FlySky whip antenna. I ordered some flexible sticker antennas for it from Ali. Seems like it is the Para module? |
There are 2 versions from horusrc, you have the CC2540 chip which is the older Bluetooth, the newer para module doesnt have an antenna connector as the antenna is built in and you get better range. You dont have to install your Bluetooth to the board as you did but very nice soldering, all you need is ground 3.3V tx and rx. The tx and rx pad are at the top of the mark 1 board. I would be happy test the new Bluetooth setting. I have both the CC2540 chip in my Tx16s and the CC2650 chip in my jumper T16. |
@Helipro I can send you my TX16S 2.9 build if you want. but in case I will use more planes with P&T on other planes, is there a way to install your tracker module in the second VRX Bay or is the board too big? 1mW BT Build: EdgeTX-2.9-TX16S-BT-highPL.zip |
+1 |
Thanks b14ckyy for the 1mw build. Installed and I get about 3 times more range on this 1mw Bluetooth power. Awesome.
|
Guys I have a question. I still have telemetry reliability issues. But ONLY with R9 ACCESS on the external module. The Telemetry rate is just 0-1Hz and I constantly get transmission errors. I tested the same thing today with a 2.4GHz ACCST Receiver with the internal MPM and it worked flawlessly. Locked 4Hz update rate, no errors, no delay. Looking in the code I see that the baud rate for bluetooth is fixed at 115200kbit. I remember back when I had the X9D with a bluetooth mod and a HC-05 pair to the tracker I did not have these issues but the X9D was running at 57600 baud. SmartPort Telemetry also is by default on 57600 baud. Could it be that the module sends telemetry to the radio at 57600 and the Radio then forwarding that at 115200 to the bluetooth module causes packet corruption? I will try to change the baud to 57600 and see if that changes anything. If this is the case we might need to do a dynamic baud rate change based on the used protocol. |
This is something @rotorman may be able to investigate with you, as I don't use Bluetooth (yet) for anything. But for now, I'll merge this PR as is, as configuration options can wait until someone wants to implement it, and it's easy enough to revert this if it is a problem. |
I have only used FrSky CC2540 Bluetooth module in combinaton with Arduino Nano 33 BLE Headtracker https://headtracker.gitbook.io/head-tracker-v2.2/ |
@rotorman yes I have parts and PCbs on my way to build SmartPort inverters as I need a few anyway. I will test with a cable connection. If the problem is the same issue appears when taking telemetry right out of the SmartPort wire of the R9 module, there is nothing I can do about it. If it is stable there, I try to mess with the code as far as I can or open a issue ticket. I know a HC-05 worked well on my X9Ds telemetry mirror port but as 2.4GHz ACCST in the MPM also works with the CC2540 works perfectly fine, I see no point to use an external BT module before investigating where the problem is. |
@b14ckyy I flew this weekend with r9 external access mod, head tracking bluetooth on the para module with chip CC2650 and had no disconnects during the whole flight. I would say much improved. I am interested to know what you find out with the baud rate in conjunction with the r9 access mod. |
Summary of changes:
For years I had trouble with bluetooth range and reliability on my modded TX16S with X10S module until I now finally discovered that EdgeTX sets the BT transmission power to -23dBm by default. This did not allow any connection with more than 2-3m range and even then it is unreliable with the slightest interference. I changed the power level to the CC2540/CC2541 default power level 2 (0dBm) and now I have perfect range and a reliable connection that goes through 2 rooms of my apartment.
1mW power should not interfere with any RC link but might need testing. Maybe add a option to configure the power in the GUI.