What does SetTxPower mean?

There isn't any docs on this. I want to get the maximum transmit power possible (dropped connections are making my app nearly unusable). Measuring signal strength using Bennet shows a pretty low signal - frequently in the -90 range, even when sitting close by with line-of-sight. I'm currently doing:

        var settings = Device.GetModule<ISettings>();
        settings.SetTxPower(4);

Also, I'm having a lot of trouble doing reconnects. My app is an extremely simple Net Core app, running on Win10. Would there be any benefit in connectivity to running this on Linux, or is the underlying hardware the limit? If so, would that still be the case in a VM or would that simply add another layer of indirection? -Should- I expect a successful connection if the scan gives me a BLE device?

Finally, any other suggestions to improve connectivity? YMMV - I know, but I live in a rural area (the only wifi I can see is mine), and I just want the damn thing to work. Would buying a dongle improve connectivity? Is there any such thing as BLE range expander?

Comments

  • We are actually going to stop supporting Windows in 2021 because the Bluetooth is simply too unreliable.
    Moving forward we will only support Linux, iOS, and Android.

    You can try to use a dongle. It might help (it certainly can't hurt).

    SetTxPower changes the antenna strength (power level). You can change it from 0dBm to +4dBm to get increased range.

    Answers to your questions:

    Would there be any benefit in connectivity to running this on Linux, or is the underlying hardware the limit?

    Yes, Linux is much butter.

    If so, would that still be the case in a VM or would that simply add another layer of indirection?

    A VM won't work because you would still be using Windows and their internal Bluetooth libraries underneath it all effectively moot. A dedicated Linux machine is the way to go (Even a raspberryPi or NUC is fine).

    -Should- I expect a successful connection if the scan gives me a BLE device?

    Never, Bluetooth is not expected to successfully connect the first time. You must handle miss-connections, disconnections, and reconnections. Always.

    Finally, any other suggestions to improve connectivity? Don't use Windows!
    Would buying a dongle improve connectivity? Is there any such thing as BLE range expander? A dongle can help, you can google-fu for good ones. There are some pretty fancy antennas out there. Also make sure your BLE drivers are up to date on Windows. Writing your own App instead of using ours is better as well.

  • Thanks for the answers. I'll take a look at porting my app to Linux, (although I kinda wanted to sell this eventually, and requiring Linux isn't very consumer-friendly).

    Sorry, I wasn't clear with the original question (just in case there is a super-easy fix): the SetTxPower takes one of a bunch of discrete values, and I -guess- that passing 4 will give the maximum tx power: is that correct? (It's always possible that the values are not what I think they mean and -60 is actually the highest power rating?) I read somewhere on the forums that this value had been increased recently, is it possible that 4 doesn't represent the highest tx power?

    Also, I have tried googling BLE range extenders but it seemed like everything on amazon was focused on extending audio (eg https://www.amazon.ca/Giveet-Bluetooth-Transmitter-Receiver-Pass-Through/dp/B07M9VP82F/ref=sr_1_16?dchild=1&keywords=bluetooth+extender&qid=1607447510&sr=8-16). Is that something that could be utilized for generic BLE messages or is it too specific? Please keep in mind that some of us hackers are more skilled on the software side of things :-)

    Thanks for the answers

Sign In or Register to comment.