This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

recommended tricks for bluetooth debugging

To the kind attention of Nordic support team,

1) I was wondering if it could make sense to connect two nRF52840 boards (transmitting normal bluetooth RF signals) directly
using a special (attenuated?) coaxial cable, so to measure current with a current clump and have a pattern
of bluetooth connections in ideal environment to detect strange activities triggered by an improper usage of your ble softdevice -
for example - like keeping antennas engaged for more than it is useful.


2) Another useful practice could be to measure currents of two nRF52840 development boards indipendently (during bluetooth connections)
and then superimpose the revealed patterns;
the pattern coming from the device target board - the device whose firmware we are building -
and the other one from the board working as a master dongle attached to the pc using the zephyr project.


3) Is there some instrumentation not too expensive that you could recommend in order to
measure if power transmitted from the board is the power we expect and set by firmware?
What about an nRF power meter?

4) It would be very much appreciated if you could resume based on your experience some
tricks that could be useful in better understanding everything about bluetooth debugging other than the usage of your wonderful nRF51 sniffer,

for higher level debugging and protocol decoding.

Thank you for your kind attention, best regards

  • Hello,

    1) I am not sure I understand this approach correctly. It is not something I have heard of before.

    2) This may work, but it is still a new approach for me.

    3) Do you mean the power transmitted, as in TX power, or the current consumption during the radio activity?

    4) Sorry, not exactly sure what you refer to here either.

    So, If you want to study the current consumption on the nRF52, which is what I suspect that you want to do, then I recommend you to check out the Power Profiler Kit. This, together with the Online Power Profiler will give you some indications on whether or not the measured current is in line with what you can expect.

    The key to getting a low current consumption on an application is to allow the nRF to go to sleep as often as possible. Typical mistakes are being stuck in a while loop while waiting for another event to occur, instead of going to sleep and then resume the task after this event occurs:

    volatile bool my_check_variable = false;
    
    // Callback for do_operation1().
    void my_callback(void)
    {
        my_check_variable = true;
    }
    
    int main(void)
    {
        init();
        
        for (;;)
        {
            do_operation1();
            while (my_check_variable == false)
            {
                //do nothing
            }
            my_check_variable = false;
            do_operation2();
            
            sd_app_evt_wait(); // Sleep.
        }
    }

    Could be changed to:

    volatile bool my_check_variable = true;
    
    // Callback for do_operation1().
    void my_callback(void)
    {
        do_operation2();
        my_check_variable = true;
    }
    
    int main(void)
    {
        init();
        
        for (;;)
        {
            if (my_check_variable == true);
            {
                my_check_variable = false;
                do_operation1();
            }
            sd_app_evt_wait(); // Sleep.
        }
    }

    Allowing the chip to go to sleep in between "operation1" and "operation2".

    Sorry that this is a bit vague, and maybe completely off, but I believe that the power profiler is probably something more like what you are looking for. If not, can you specify what you mean by: "like keeping antennas engaged for more than it is useful"?

    Best regards,

    Edvin

  • Hi Edvin, thanks for you replying us and for your work. Your recommendations are really helpful. Regarding point 1) I was imagining something like in the enclosed picture to record a pattern of what is going on in the RF channel. But not being an RF expert I would like to know more about the microwave coaxial cable. Have you tried something like that?

  • Hello. No. I have never seen it. But if you want to see what's going on over the air, you can take a look at the nRF Sniffer. That would be suitable, at least if you want to see what messages are sent. If it is for current measurements, then I suggest you just use the Power Profiler Kit. You will clearly see the spikes when the radio is used.

    Best regards,

    Edvin

Related