You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mynewt.apache.org by Jitesh Shah <ji...@liveathos.com> on 2017/11/14 08:30:02 UTC

[BLE central] Getting mfg data from advertisement packets

Hey guys,
I have a peripheral running Nordic softdevice (BLE 4.0 protocol). Central
is running nimBLE stack 1.0 (0db6321a75deda126943aa187842da6b977cd1c1).

The peripheral advertises manufacturing data. I am trying to get to it from
the central. I never get the mfg data though. The advertisement packet
looks like this at the central:

> (gdb) p/x *fields
> $1 = {flags = 0x6, uuids16 = 0x0, num_uuids16 = 0x0, uuids16_is_complete =
> 0x0, uuids32 = 0x0, num_uuids32 = 0x0, uuids32_is_complete = 0x0,
>   uuids128 = 0x20006750, num_uuids128 = 0x1, uuids128_is_complete = 0x1,
> name = 0x0, name_len = 0x0, name_is_complete = 0x0, tx_pwr_lvl = 0x0,
>   tx_pwr_lvl_is_present = 0x0, slave_itvl_range = 0x0, svc_data_uuid16 =
> 0x0, svc_data_uuid16_len = 0x0, public_tgt_addr = 0x0,
>   num_public_tgt_addrs = 0x0, appearance = 0x0, appearance_is_present =
> 0x0, adv_itvl = 0x0, adv_itvl_is_present = 0x0, svc_data_uuid32 = 0x0,
>   svc_data_uuid32_len = 0x0, svc_data_uuid128 = 0x0, svc_data_uuid128_len
> = 0x0, uri = 0x0, uri_len = 0x0, mfg_data = 0x0, mfg_data_len = 0x0}


Everything else adds up, except no mfg data. Worth noting that I can see
the mfg data if I use another BLE central to scan.

My discovery parameters are as follows:
disc_params.filter_duplicates = 1;
disc_params.passive = 0; // active scan
/* Use defaults for the rest of the parameters. */
disc_params.itvl = 0;
disc_params.window = 0;
disc_params.filter_policy = 0;
disc_params.limited = 0;

Any ideas or hints as to how I can debug?

Jitesh

-- 
This email including attachments contains Mad Apparel, Inc. DBA Athos 
privileged, confidential, and proprietary information solely for the use 
for the addressed recipients. If you are not the intended recipient, please 
be aware that any review, disclosure, copying, distribution, or use of the 
contents of this message is strictly prohibited. If you have received this 
in error, please delete it immediately and notify the sender. All rights 
reserved by Mad Apparel, Inc. 2012. The information contained herein is the 
exclusive property of Mad Apparel, Inc. and should not be used, 
distributed, reproduced, or disclosed in whole or in part without prior 
written permission of Mad Apparel, Inc.

Re: [BLE central] Getting mfg data from advertisement packets

Posted by Jitesh Shah <ji...@liveathos.com>.
Thanks Lukasz,

I cherry-picked that commit and things seem to work as expected now!

Jitesh

On Tue, Nov 14, 2017 at 12:59 PM, Łukasz Rymanowski <
lukasz.rymanowski@codecoup.pl> wrote:

> Hi again,
>
> On 14 November 2017 at 21:53, Łukasz Rymanowski
> <lu...@codecoup.pl> wrote:
> > Hi Jitesh,
> >
> > On 14 November 2017 at 20:42, Jitesh Shah <ji...@liveathos.com> wrote:
> >>
> >> Hi Andrej,
> >>
> >> >
> >> > Are you sure that you parse data from packet which has mfg data? With
> >> > active scan and scannable packets you will have ADV_IND and SCAN_RSP
> >> > as separate events so mfg data may be in the other one - you need to
> >> > parse both.
> >> >
> >>
> >> Thank you for the response. I am parsing both ADV_IND and SCAN_RSP
> packets.
> >> I believe I made some headway though.
> >>
> >> filter_duplicates seems to do something strange. When filter_duplicates
> is
> >> turned on, I don't get SCAN_RSP packets. Execution won't even
> >> reach ble_ll_hci_send_adv_report:ble_ll_scan.c.
> >>
> >> With filter_duplicates turned off, I can get SCAN_RSP packets up to the
> >> application layer and manuf data seems alright.
> >>
> >> Is it possible that filter_duplicate is filtering out SCAN_RSP packet
> >> thinking its a dup?
> >
> >
> > Indeed in Mynewt version you refer to it is broken. Not sure when it
> > was fixed but master should works fine.
>
> Ah this is actually something what Andrzej fixed in patch:
>
> commit 7ea097f3e1944c51e17a9d2a9f89b4c845652711
> Author: Andrzej Kaczmarek <an...@codecoup.pl>
> Date:   Wed Sep 6 10:55:47 2017 +0200
>
>     nimble/ll: Fix duplicates filtering in scanner
>
>     With duplicates filtering enabled, we will filter out scan response
>     from advertiser if we already sent advertising report for the same
>     device. However, Core specification (Vol 6, Part B, section 4.4.3.5)
>     states:
>
>     "For each non-duplicate advertising or scan response PDU from an
>     advertiser, the Link Layer shall send an advertising report to the
>     Host."
>
>     This patch fixes this by tracking advertising reports and scan
>     responses separately for duplicates filtering.
>
>
> >
> >
> >>
> >> Jitesh
> >>
> >>
> >>
> >> > If this is not the problem, can you share raw data from advertising
> >> > and scan response packets to see what could go wrong parsing them?
> >> >
> >> > > Jitesh
> >> >
> >> > Best regards,
> >> > Andrzej
> >> >
> >> >
> >> > > On Tue, Nov 14, 2017 at 12:30 AM, Jitesh Shah <jitesh@liveathos.com
> >
> >> > wrote:
> >> > >
> >> > >> Hey guys,
> >> > >> I have a peripheral running Nordic softdevice (BLE 4.0 protocol).
> >> > Central
> >> > >> is running nimBLE stack 1.0 (0db6321a75deda126943aa187842da
> 6b977cd1c1).
> >> > >>
> >> > >> The peripheral advertises manufacturing data. I am trying to get
> to it
> >> > >> from the central. I never get the mfg data though. The
> advertisement
> >> > packet
> >> > >> looks like this at the central:
> >> > >>
> >> > >>> (gdb) p/x *fields
> >> > >>> $1 = {flags = 0x6, uuids16 = 0x0, num_uuids16 = 0x0,
> >> > uuids16_is_complete
> >> > >>> = 0x0, uuids32 = 0x0, num_uuids32 = 0x0, uuids32_is_complete =
> 0x0,
> >> > >>>   uuids128 = 0x20006750, num_uuids128 = 0x1, uuids128_is_complete
> =
> >> > 0x1,
> >> > >>> name = 0x0, name_len = 0x0, name_is_complete = 0x0, tx_pwr_lvl =
> 0x0,
> >> > >>>   tx_pwr_lvl_is_present = 0x0, slave_itvl_range = 0x0,
> svc_data_uuid16
> >> > =
> >> > >>> 0x0, svc_data_uuid16_len = 0x0, public_tgt_addr = 0x0,
> >> > >>>   num_public_tgt_addrs = 0x0, appearance = 0x0,
> appearance_is_present =
> >> > >>> 0x0, adv_itvl = 0x0, adv_itvl_is_present = 0x0, svc_data_uuid32 =
> 0x0,
> >> > >>>   svc_data_uuid32_len = 0x0, svc_data_uuid128 = 0x0,
> >> > svc_data_uuid128_len
> >> > >>> = 0x0, uri = 0x0, uri_len = 0x0, mfg_data = 0x0, mfg_data_len =
> 0x0}
> >> > >>
> >> > >>
> >> > >> Everything else adds up, except no mfg data. Worth noting that I
> can see
> >> > >> the mfg data if I use another BLE central to scan.
> >> > >>
> >> > >> My discovery parameters are as follows:
> >> > >> disc_params.filter_duplicates = 1;
> >> > >> disc_params.passive = 0; // active scan
> >> > >> /* Use defaults for the rest of the parameters. */
> >> > >> disc_params.itvl = 0;
> >> > >> disc_params.window = 0;
> >> > >> disc_params.filter_policy = 0;
> >> > >> disc_params.limited = 0;
> >> > >>
> >> > >> Any ideas or hints as to how I can debug?
> >> > >>
> >> > >> Jitesh
> >> > >>
> >> > >
> >> > > --
> >> > > This email including attachments contains Mad Apparel, Inc. DBA
> Athos
> >> > > privileged, confidential, and proprietary information solely for
> the use
> >> > > for the addressed recipients. If you are not the intended recipient,
> >> > please
> >> > > be aware that any review, disclosure, copying, distribution, or use
> of
> >> > the
> >> > > contents of this message is strictly prohibited. If you have
> received
> >> > this
> >> > > in error, please delete it immediately and notify the sender. All
> rights
> >> > > reserved by Mad Apparel, Inc. 2012. The information contained
> herein is
> >> > the
> >> > > exclusive property of Mad Apparel, Inc. and should not be used,
> >> > > distributed, reproduced, or disclosed in whole or in part without
> prior
> >> > > written permission of Mad Apparel, Inc.
> >> >
> >>
> >> --
> >> This email including attachments contains Mad Apparel, Inc. DBA Athos
> >> privileged, confidential, and proprietary information solely for the use
> >> for the addressed recipients. If you are not the intended recipient,
> please
> >> be aware that any review, disclosure, copying, distribution, or use of
> the
> >> contents of this message is strictly prohibited. If you have received
> this
> >> in error, please delete it immediately and notify the sender. All rights
> >> reserved by Mad Apparel, Inc. 2012. The information contained herein is
> the
> >> exclusive property of Mad Apparel, Inc. and should not be used,
> >> distributed, reproduced, or disclosed in whole or in part without prior
> >> written permission of Mad Apparel, Inc.
> >
> >
> >
> > Best
> > Łukasz
>

-- 
This email including attachments contains Mad Apparel, Inc. DBA Athos 
privileged, confidential, and proprietary information solely for the use 
for the addressed recipients. If you are not the intended recipient, please 
be aware that any review, disclosure, copying, distribution, or use of the 
contents of this message is strictly prohibited. If you have received this 
in error, please delete it immediately and notify the sender. All rights 
reserved by Mad Apparel, Inc. 2012. The information contained herein is the 
exclusive property of Mad Apparel, Inc. and should not be used, 
distributed, reproduced, or disclosed in whole or in part without prior 
written permission of Mad Apparel, Inc.

Re: [BLE central] Getting mfg data from advertisement packets

Posted by Łukasz Rymanowski <lu...@codecoup.pl>.
Hi again,

On 14 November 2017 at 21:53, Łukasz Rymanowski
<lu...@codecoup.pl> wrote:
> Hi Jitesh,
>
> On 14 November 2017 at 20:42, Jitesh Shah <ji...@liveathos.com> wrote:
>>
>> Hi Andrej,
>>
>> >
>> > Are you sure that you parse data from packet which has mfg data? With
>> > active scan and scannable packets you will have ADV_IND and SCAN_RSP
>> > as separate events so mfg data may be in the other one - you need to
>> > parse both.
>> >
>>
>> Thank you for the response. I am parsing both ADV_IND and SCAN_RSP packets.
>> I believe I made some headway though.
>>
>> filter_duplicates seems to do something strange. When filter_duplicates is
>> turned on, I don't get SCAN_RSP packets. Execution won't even
>> reach ble_ll_hci_send_adv_report:ble_ll_scan.c.
>>
>> With filter_duplicates turned off, I can get SCAN_RSP packets up to the
>> application layer and manuf data seems alright.
>>
>> Is it possible that filter_duplicate is filtering out SCAN_RSP packet
>> thinking its a dup?
>
>
> Indeed in Mynewt version you refer to it is broken. Not sure when it
> was fixed but master should works fine.

Ah this is actually something what Andrzej fixed in patch:

commit 7ea097f3e1944c51e17a9d2a9f89b4c845652711
Author: Andrzej Kaczmarek <an...@codecoup.pl>
Date:   Wed Sep 6 10:55:47 2017 +0200

    nimble/ll: Fix duplicates filtering in scanner

    With duplicates filtering enabled, we will filter out scan response
    from advertiser if we already sent advertising report for the same
    device. However, Core specification (Vol 6, Part B, section 4.4.3.5)
    states:

    "For each non-duplicate advertising or scan response PDU from an
    advertiser, the Link Layer shall send an advertising report to the
    Host."

    This patch fixes this by tracking advertising reports and scan
    responses separately for duplicates filtering.


>
>
>>
>> Jitesh
>>
>>
>>
>> > If this is not the problem, can you share raw data from advertising
>> > and scan response packets to see what could go wrong parsing them?
>> >
>> > > Jitesh
>> >
>> > Best regards,
>> > Andrzej
>> >
>> >
>> > > On Tue, Nov 14, 2017 at 12:30 AM, Jitesh Shah <ji...@liveathos.com>
>> > wrote:
>> > >
>> > >> Hey guys,
>> > >> I have a peripheral running Nordic softdevice (BLE 4.0 protocol).
>> > Central
>> > >> is running nimBLE stack 1.0 (0db6321a75deda126943aa187842da6b977cd1c1).
>> > >>
>> > >> The peripheral advertises manufacturing data. I am trying to get to it
>> > >> from the central. I never get the mfg data though. The advertisement
>> > packet
>> > >> looks like this at the central:
>> > >>
>> > >>> (gdb) p/x *fields
>> > >>> $1 = {flags = 0x6, uuids16 = 0x0, num_uuids16 = 0x0,
>> > uuids16_is_complete
>> > >>> = 0x0, uuids32 = 0x0, num_uuids32 = 0x0, uuids32_is_complete = 0x0,
>> > >>>   uuids128 = 0x20006750, num_uuids128 = 0x1, uuids128_is_complete =
>> > 0x1,
>> > >>> name = 0x0, name_len = 0x0, name_is_complete = 0x0, tx_pwr_lvl = 0x0,
>> > >>>   tx_pwr_lvl_is_present = 0x0, slave_itvl_range = 0x0, svc_data_uuid16
>> > =
>> > >>> 0x0, svc_data_uuid16_len = 0x0, public_tgt_addr = 0x0,
>> > >>>   num_public_tgt_addrs = 0x0, appearance = 0x0, appearance_is_present =
>> > >>> 0x0, adv_itvl = 0x0, adv_itvl_is_present = 0x0, svc_data_uuid32 = 0x0,
>> > >>>   svc_data_uuid32_len = 0x0, svc_data_uuid128 = 0x0,
>> > svc_data_uuid128_len
>> > >>> = 0x0, uri = 0x0, uri_len = 0x0, mfg_data = 0x0, mfg_data_len = 0x0}
>> > >>
>> > >>
>> > >> Everything else adds up, except no mfg data. Worth noting that I can see
>> > >> the mfg data if I use another BLE central to scan.
>> > >>
>> > >> My discovery parameters are as follows:
>> > >> disc_params.filter_duplicates = 1;
>> > >> disc_params.passive = 0; // active scan
>> > >> /* Use defaults for the rest of the parameters. */
>> > >> disc_params.itvl = 0;
>> > >> disc_params.window = 0;
>> > >> disc_params.filter_policy = 0;
>> > >> disc_params.limited = 0;
>> > >>
>> > >> Any ideas or hints as to how I can debug?
>> > >>
>> > >> Jitesh
>> > >>
>> > >
>> > > --
>> > > This email including attachments contains Mad Apparel, Inc. DBA Athos
>> > > privileged, confidential, and proprietary information solely for the use
>> > > for the addressed recipients. If you are not the intended recipient,
>> > please
>> > > be aware that any review, disclosure, copying, distribution, or use of
>> > the
>> > > contents of this message is strictly prohibited. If you have received
>> > this
>> > > in error, please delete it immediately and notify the sender. All rights
>> > > reserved by Mad Apparel, Inc. 2012. The information contained herein is
>> > the
>> > > exclusive property of Mad Apparel, Inc. and should not be used,
>> > > distributed, reproduced, or disclosed in whole or in part without prior
>> > > written permission of Mad Apparel, Inc.
>> >
>>
>> --
>> This email including attachments contains Mad Apparel, Inc. DBA Athos
>> privileged, confidential, and proprietary information solely for the use
>> for the addressed recipients. If you are not the intended recipient, please
>> be aware that any review, disclosure, copying, distribution, or use of the
>> contents of this message is strictly prohibited. If you have received this
>> in error, please delete it immediately and notify the sender. All rights
>> reserved by Mad Apparel, Inc. 2012. The information contained herein is the
>> exclusive property of Mad Apparel, Inc. and should not be used,
>> distributed, reproduced, or disclosed in whole or in part without prior
>> written permission of Mad Apparel, Inc.
>
>
>
> Best
> Łukasz

Re: [BLE central] Getting mfg data from advertisement packets

Posted by Łukasz Rymanowski <lu...@codecoup.pl>.
Hi Jitesh,

On 14 November 2017 at 20:42, Jitesh Shah <ji...@liveathos.com> wrote:
>
> Hi Andrej,
>
> >
> > Are you sure that you parse data from packet which has mfg data? With
> > active scan and scannable packets you will have ADV_IND and SCAN_RSP
> > as separate events so mfg data may be in the other one - you need to
> > parse both.
> >
>
> Thank you for the response. I am parsing both ADV_IND and SCAN_RSP packets.
> I believe I made some headway though.
>
> filter_duplicates seems to do something strange. When filter_duplicates is
> turned on, I don't get SCAN_RSP packets. Execution won't even
> reach ble_ll_hci_send_adv_report:ble_ll_scan.c.
>
> With filter_duplicates turned off, I can get SCAN_RSP packets up to the
> application layer and manuf data seems alright.
>
> Is it possible that filter_duplicate is filtering out SCAN_RSP packet
> thinking its a dup?


Indeed in Mynewt version you refer to it is broken. Not sure when it
was fixed but master should works fine.


>
> Jitesh
>
>
>
> > If this is not the problem, can you share raw data from advertising
> > and scan response packets to see what could go wrong parsing them?
> >
> > > Jitesh
> >
> > Best regards,
> > Andrzej
> >
> >
> > > On Tue, Nov 14, 2017 at 12:30 AM, Jitesh Shah <ji...@liveathos.com>
> > wrote:
> > >
> > >> Hey guys,
> > >> I have a peripheral running Nordic softdevice (BLE 4.0 protocol).
> > Central
> > >> is running nimBLE stack 1.0 (0db6321a75deda126943aa187842da6b977cd1c1).
> > >>
> > >> The peripheral advertises manufacturing data. I am trying to get to it
> > >> from the central. I never get the mfg data though. The advertisement
> > packet
> > >> looks like this at the central:
> > >>
> > >>> (gdb) p/x *fields
> > >>> $1 = {flags = 0x6, uuids16 = 0x0, num_uuids16 = 0x0,
> > uuids16_is_complete
> > >>> = 0x0, uuids32 = 0x0, num_uuids32 = 0x0, uuids32_is_complete = 0x0,
> > >>>   uuids128 = 0x20006750, num_uuids128 = 0x1, uuids128_is_complete =
> > 0x1,
> > >>> name = 0x0, name_len = 0x0, name_is_complete = 0x0, tx_pwr_lvl = 0x0,
> > >>>   tx_pwr_lvl_is_present = 0x0, slave_itvl_range = 0x0, svc_data_uuid16
> > =
> > >>> 0x0, svc_data_uuid16_len = 0x0, public_tgt_addr = 0x0,
> > >>>   num_public_tgt_addrs = 0x0, appearance = 0x0, appearance_is_present =
> > >>> 0x0, adv_itvl = 0x0, adv_itvl_is_present = 0x0, svc_data_uuid32 = 0x0,
> > >>>   svc_data_uuid32_len = 0x0, svc_data_uuid128 = 0x0,
> > svc_data_uuid128_len
> > >>> = 0x0, uri = 0x0, uri_len = 0x0, mfg_data = 0x0, mfg_data_len = 0x0}
> > >>
> > >>
> > >> Everything else adds up, except no mfg data. Worth noting that I can see
> > >> the mfg data if I use another BLE central to scan.
> > >>
> > >> My discovery parameters are as follows:
> > >> disc_params.filter_duplicates = 1;
> > >> disc_params.passive = 0; // active scan
> > >> /* Use defaults for the rest of the parameters. */
> > >> disc_params.itvl = 0;
> > >> disc_params.window = 0;
> > >> disc_params.filter_policy = 0;
> > >> disc_params.limited = 0;
> > >>
> > >> Any ideas or hints as to how I can debug?
> > >>
> > >> Jitesh
> > >>
> > >
> > > --
> > > This email including attachments contains Mad Apparel, Inc. DBA Athos
> > > privileged, confidential, and proprietary information solely for the use
> > > for the addressed recipients. If you are not the intended recipient,
> > please
> > > be aware that any review, disclosure, copying, distribution, or use of
> > the
> > > contents of this message is strictly prohibited. If you have received
> > this
> > > in error, please delete it immediately and notify the sender. All rights
> > > reserved by Mad Apparel, Inc. 2012. The information contained herein is
> > the
> > > exclusive property of Mad Apparel, Inc. and should not be used,
> > > distributed, reproduced, or disclosed in whole or in part without prior
> > > written permission of Mad Apparel, Inc.
> >
>
> --
> This email including attachments contains Mad Apparel, Inc. DBA Athos
> privileged, confidential, and proprietary information solely for the use
> for the addressed recipients. If you are not the intended recipient, please
> be aware that any review, disclosure, copying, distribution, or use of the
> contents of this message is strictly prohibited. If you have received this
> in error, please delete it immediately and notify the sender. All rights
> reserved by Mad Apparel, Inc. 2012. The information contained herein is the
> exclusive property of Mad Apparel, Inc. and should not be used,
> distributed, reproduced, or disclosed in whole or in part without prior
> written permission of Mad Apparel, Inc.



Best
Łukasz

Re: [BLE central] Getting mfg data from advertisement packets

Posted by Jitesh Shah <ji...@liveathos.com>.
Hi Andrej,

>
> Are you sure that you parse data from packet which has mfg data? With
> active scan and scannable packets you will have ADV_IND and SCAN_RSP
> as separate events so mfg data may be in the other one - you need to
> parse both.
>

Thank you for the response. I am parsing both ADV_IND and SCAN_RSP packets.
I believe I made some headway though.

filter_duplicates seems to do something strange. When filter_duplicates is
turned on, I don't get SCAN_RSP packets. Execution won't even
reach ble_ll_hci_send_adv_report:ble_ll_scan.c.

With filter_duplicates turned off, I can get SCAN_RSP packets up to the
application layer and manuf data seems alright.

Is it possible that filter_duplicate is filtering out SCAN_RSP packet
thinking its a dup?

Jitesh


> If this is not the problem, can you share raw data from advertising
> and scan response packets to see what could go wrong parsing them?
>
> > Jitesh
>
> Best regards,
> Andrzej
>
>
> > On Tue, Nov 14, 2017 at 12:30 AM, Jitesh Shah <ji...@liveathos.com>
> wrote:
> >
> >> Hey guys,
> >> I have a peripheral running Nordic softdevice (BLE 4.0 protocol).
> Central
> >> is running nimBLE stack 1.0 (0db6321a75deda126943aa187842da6b977cd1c1).
> >>
> >> The peripheral advertises manufacturing data. I am trying to get to it
> >> from the central. I never get the mfg data though. The advertisement
> packet
> >> looks like this at the central:
> >>
> >>> (gdb) p/x *fields
> >>> $1 = {flags = 0x6, uuids16 = 0x0, num_uuids16 = 0x0,
> uuids16_is_complete
> >>> = 0x0, uuids32 = 0x0, num_uuids32 = 0x0, uuids32_is_complete = 0x0,
> >>>   uuids128 = 0x20006750, num_uuids128 = 0x1, uuids128_is_complete =
> 0x1,
> >>> name = 0x0, name_len = 0x0, name_is_complete = 0x0, tx_pwr_lvl = 0x0,
> >>>   tx_pwr_lvl_is_present = 0x0, slave_itvl_range = 0x0, svc_data_uuid16
> =
> >>> 0x0, svc_data_uuid16_len = 0x0, public_tgt_addr = 0x0,
> >>>   num_public_tgt_addrs = 0x0, appearance = 0x0, appearance_is_present =
> >>> 0x0, adv_itvl = 0x0, adv_itvl_is_present = 0x0, svc_data_uuid32 = 0x0,
> >>>   svc_data_uuid32_len = 0x0, svc_data_uuid128 = 0x0,
> svc_data_uuid128_len
> >>> = 0x0, uri = 0x0, uri_len = 0x0, mfg_data = 0x0, mfg_data_len = 0x0}
> >>
> >>
> >> Everything else adds up, except no mfg data. Worth noting that I can see
> >> the mfg data if I use another BLE central to scan.
> >>
> >> My discovery parameters are as follows:
> >> disc_params.filter_duplicates = 1;
> >> disc_params.passive = 0; // active scan
> >> /* Use defaults for the rest of the parameters. */
> >> disc_params.itvl = 0;
> >> disc_params.window = 0;
> >> disc_params.filter_policy = 0;
> >> disc_params.limited = 0;
> >>
> >> Any ideas or hints as to how I can debug?
> >>
> >> Jitesh
> >>
> >
> > --
> > This email including attachments contains Mad Apparel, Inc. DBA Athos
> > privileged, confidential, and proprietary information solely for the use
> > for the addressed recipients. If you are not the intended recipient,
> please
> > be aware that any review, disclosure, copying, distribution, or use of
> the
> > contents of this message is strictly prohibited. If you have received
> this
> > in error, please delete it immediately and notify the sender. All rights
> > reserved by Mad Apparel, Inc. 2012. The information contained herein is
> the
> > exclusive property of Mad Apparel, Inc. and should not be used,
> > distributed, reproduced, or disclosed in whole or in part without prior
> > written permission of Mad Apparel, Inc.
>

-- 
This email including attachments contains Mad Apparel, Inc. DBA Athos 
privileged, confidential, and proprietary information solely for the use 
for the addressed recipients. If you are not the intended recipient, please 
be aware that any review, disclosure, copying, distribution, or use of the 
contents of this message is strictly prohibited. If you have received this 
in error, please delete it immediately and notify the sender. All rights 
reserved by Mad Apparel, Inc. 2012. The information contained herein is the 
exclusive property of Mad Apparel, Inc. and should not be used, 
distributed, reproduced, or disclosed in whole or in part without prior 
written permission of Mad Apparel, Inc.

Re: [BLE central] Getting mfg data from advertisement packets

Posted by Andrzej Kaczmarek <an...@codecoup.pl>.
Hi Jitesh,

On Tue, Nov 14, 2017 at 9:39 AM, Jitesh Shah <ji...@liveathos.com> wrote:
> Few more details:
> These are general connectable and scannable advertisement packets.
>
> advertising interval is ~200ms

Are you sure that you parse data from packet which has mfg data? With
active scan and scannable packets you will have ADV_IND and SCAN_RSP
as separate events so mfg data may be in the other one - you need to
parse both.
If this is not the problem, can you share raw data from advertising
and scan response packets to see what could go wrong parsing them?

> Jitesh

Best regards,
Andrzej


> On Tue, Nov 14, 2017 at 12:30 AM, Jitesh Shah <ji...@liveathos.com> wrote:
>
>> Hey guys,
>> I have a peripheral running Nordic softdevice (BLE 4.0 protocol). Central
>> is running nimBLE stack 1.0 (0db6321a75deda126943aa187842da6b977cd1c1).
>>
>> The peripheral advertises manufacturing data. I am trying to get to it
>> from the central. I never get the mfg data though. The advertisement packet
>> looks like this at the central:
>>
>>> (gdb) p/x *fields
>>> $1 = {flags = 0x6, uuids16 = 0x0, num_uuids16 = 0x0, uuids16_is_complete
>>> = 0x0, uuids32 = 0x0, num_uuids32 = 0x0, uuids32_is_complete = 0x0,
>>>   uuids128 = 0x20006750, num_uuids128 = 0x1, uuids128_is_complete = 0x1,
>>> name = 0x0, name_len = 0x0, name_is_complete = 0x0, tx_pwr_lvl = 0x0,
>>>   tx_pwr_lvl_is_present = 0x0, slave_itvl_range = 0x0, svc_data_uuid16 =
>>> 0x0, svc_data_uuid16_len = 0x0, public_tgt_addr = 0x0,
>>>   num_public_tgt_addrs = 0x0, appearance = 0x0, appearance_is_present =
>>> 0x0, adv_itvl = 0x0, adv_itvl_is_present = 0x0, svc_data_uuid32 = 0x0,
>>>   svc_data_uuid32_len = 0x0, svc_data_uuid128 = 0x0, svc_data_uuid128_len
>>> = 0x0, uri = 0x0, uri_len = 0x0, mfg_data = 0x0, mfg_data_len = 0x0}
>>
>>
>> Everything else adds up, except no mfg data. Worth noting that I can see
>> the mfg data if I use another BLE central to scan.
>>
>> My discovery parameters are as follows:
>> disc_params.filter_duplicates = 1;
>> disc_params.passive = 0; // active scan
>> /* Use defaults for the rest of the parameters. */
>> disc_params.itvl = 0;
>> disc_params.window = 0;
>> disc_params.filter_policy = 0;
>> disc_params.limited = 0;
>>
>> Any ideas or hints as to how I can debug?
>>
>> Jitesh
>>
>
> --
> This email including attachments contains Mad Apparel, Inc. DBA Athos
> privileged, confidential, and proprietary information solely for the use
> for the addressed recipients. If you are not the intended recipient, please
> be aware that any review, disclosure, copying, distribution, or use of the
> contents of this message is strictly prohibited. If you have received this
> in error, please delete it immediately and notify the sender. All rights
> reserved by Mad Apparel, Inc. 2012. The information contained herein is the
> exclusive property of Mad Apparel, Inc. and should not be used,
> distributed, reproduced, or disclosed in whole or in part without prior
> written permission of Mad Apparel, Inc.

Re: [BLE central] Getting mfg data from advertisement packets

Posted by Jitesh Shah <ji...@liveathos.com>.
Few more details:
These are general connectable and scannable advertisement packets.

advertising interval is ~200ms

Jitesh

On Tue, Nov 14, 2017 at 12:30 AM, Jitesh Shah <ji...@liveathos.com> wrote:

> Hey guys,
> I have a peripheral running Nordic softdevice (BLE 4.0 protocol). Central
> is running nimBLE stack 1.0 (0db6321a75deda126943aa187842da6b977cd1c1).
>
> The peripheral advertises manufacturing data. I am trying to get to it
> from the central. I never get the mfg data though. The advertisement packet
> looks like this at the central:
>
>> (gdb) p/x *fields
>> $1 = {flags = 0x6, uuids16 = 0x0, num_uuids16 = 0x0, uuids16_is_complete
>> = 0x0, uuids32 = 0x0, num_uuids32 = 0x0, uuids32_is_complete = 0x0,
>>   uuids128 = 0x20006750, num_uuids128 = 0x1, uuids128_is_complete = 0x1,
>> name = 0x0, name_len = 0x0, name_is_complete = 0x0, tx_pwr_lvl = 0x0,
>>   tx_pwr_lvl_is_present = 0x0, slave_itvl_range = 0x0, svc_data_uuid16 =
>> 0x0, svc_data_uuid16_len = 0x0, public_tgt_addr = 0x0,
>>   num_public_tgt_addrs = 0x0, appearance = 0x0, appearance_is_present =
>> 0x0, adv_itvl = 0x0, adv_itvl_is_present = 0x0, svc_data_uuid32 = 0x0,
>>   svc_data_uuid32_len = 0x0, svc_data_uuid128 = 0x0, svc_data_uuid128_len
>> = 0x0, uri = 0x0, uri_len = 0x0, mfg_data = 0x0, mfg_data_len = 0x0}
>
>
> Everything else adds up, except no mfg data. Worth noting that I can see
> the mfg data if I use another BLE central to scan.
>
> My discovery parameters are as follows:
> disc_params.filter_duplicates = 1;
> disc_params.passive = 0; // active scan
> /* Use defaults for the rest of the parameters. */
> disc_params.itvl = 0;
> disc_params.window = 0;
> disc_params.filter_policy = 0;
> disc_params.limited = 0;
>
> Any ideas or hints as to how I can debug?
>
> Jitesh
>

-- 
This email including attachments contains Mad Apparel, Inc. DBA Athos 
privileged, confidential, and proprietary information solely for the use 
for the addressed recipients. If you are not the intended recipient, please 
be aware that any review, disclosure, copying, distribution, or use of the 
contents of this message is strictly prohibited. If you have received this 
in error, please delete it immediately and notify the sender. All rights 
reserved by Mad Apparel, Inc. 2012. The information contained herein is the 
exclusive property of Mad Apparel, Inc. and should not be used, 
distributed, reproduced, or disclosed in whole or in part without prior 
written permission of Mad Apparel, Inc.