This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Regarding scanning interval and dumping time

Other Parts Discussed in Thread: WL1831

Hi Guys,


The scenario is as follows-
I am using bluez-4.01 as my ble stack on linux.


I have ble sesnors and my board (dm-365).Now without making connection when I am using cmd "hcitool lescan" it will scan all the ble sensors and same I can see on the console.Using cmd "hcidump" I can able to dump the data in the human readable form.

Now my question are-

1.) When I am using lescan command does it have some scanning interval or it scans continuously ? If it have some scanning interval, how I can reduce it and how I get to know the current interval.


I gone through the source code and inside bluez->tool->hcitools.c there's one function "static void cmd_lescan(int dev_id, int argc, char **argv)".In that function I got the following initialisation

  uint16_t interval = htobs(0x0010);
        uint16_t window = htobs(0x0010);


What are these interval and windows ?


2.)Secondly I have same query for hcidump comand.Does it dump the data after some interval again and again.If yes from where and how I can reduce this time?

Please throw some light on this


Thanks,
Abhi

  • Hello Abhi,

    Which BLE product are you using?

    Best wishes
  • Hi JXS,

    I am using the DM-365 processor and and ble chip is wl1831 on the board.
    Both TI's product.
    But I think question is more relate to bluez (Ble stack)

    Thanks,
    Abhinav
  • Thanks for clarifying. I've moved the thread to the WiLink forum!

    Best wishes
  • Hi Abhi,

    These questions are not related to wl18xx but related to the BlueZ stack. It is better that you post this on some external BlueZ forums as you will get better answer there

    1. interval/window corresponds to LE_Scan_Interval/LE_Scan_Window in the BT Spec

    ***
    The LE_Scan_Interval and LE_Scan_Window parameters are recommendations from the Host on how long (LE_Scan_Window) and how frequently (LE_Scan_Interval) the Controller should scan (See [Vol 6] Part B, Section 4.5.3). The LE_Scan_Window parameter shall always be set to a value smaller or equal to the value set for the LE_Scan_Interval parameter. If they are set to the same value scanning should be run continuously.
    ***

    2. hcidump will poll on the 'hci0' device. It receives data as soon as something arrives on hci0. There is no delay involved.


    Regards,
    Gigi Joseph.
  • There has been a lot of progress in the linux/bluez BLE area during the last year, I'd recommend you to use a more recent bluez (and linux kernel bluetooth stack).
  • Thanks Joseph for your valuable comments.

    wifijacob,

    The constraint is that I can't change my kernel.The kernel I am using is an old version i.e 2.6.x. So Accordingly I have to choose the other utilities and bluez.
    Right now, a/c to me the latest bluez which is in the market is 5.1 and it supports kernel above 3.0.
    I am trying to find out the solution as upgrading anything is not be possible for me.

    Regards,
    Abhinav