Linux bluetooth development
 help / color / mirror / Atom feed
From: Benjamin Adler <benadler@gmx.net>
To: unlisted-recipients:; (no To-header on input)
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: Receiving data in BLE non-connectable undirected advertisements
Date: Fri, 28 Feb 2014 15:38:43 +0000	[thread overview]
Message-ID: <5310AD83.9030208@gmx.net> (raw)
In-Reply-To: <00B030ED-78C3-4C48-B738-4161348CD6E8@warski.org>

Adam,

thanks for your answer!

On 28.02.2014 15:13, Adam Warski wrote:
> If you want to see the raw advertisement packets, run:
> 1st terminal: hcidump -R
> 2nd terminal: hcitool lescan
> The raw dump will contain the advertisement data.

# hcidump -R
HCI sniffer - Bluetooth packet analyzer ver 5.14
device: hci0 snap_len: 1500 filter: 0xffffffffffffffff

### start "hcitool lescan"

< 01 0B 20 07 01 10 00 10 00 00 00
 > 04 0E 04 01 0B 20 00
< 01 0C 20 02 01 01
 > 04 0E 04 01 0C 20 00

### power-on sensortag

 > 04 3E 14 02 01 03 00 7D 8A 0B AF 59 90 08 02 01 04 04 FF 01
   02 03 B7

### power-cycle sensortag

<nothing>

So it seems like hcitool must first tell bluez to listen for 
advertisement packets. Is there documentation/samples on how to do this 
with python or C? Any other programs that do this, so I can read their 
source?

Also, only the first advertisement of the SensorTag is shown. While that 
probably makes sense for traditional advertisements, my use case 
requires that all advertisements are shown, as I'm trying to transmit 
low-rate data from the tag's sensors in the advertisements.

Do you have some hints concerning the easiest way to receive and process 
those advertisements, preferably without the hassle of user-interaction 
and multiple terminals?

Cheers,
ben

  reply	other threads:[~2014-02-28 15:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-28 15:00 Receiving data in BLE non-connectable undirected advertisements Benjamin Adler
2014-02-28 15:13 ` Adam Warski
2014-02-28 15:38   ` Benjamin Adler [this message]
2014-02-28 15:54     ` Adam Warski
2014-02-28 15:46 ` Marcel Holtmann
2014-03-03  9:10   ` Benjamin Adler
2014-03-03 15:28     ` Marcel Holtmann
2014-03-04 22:02       ` Benjamin Adler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5310AD83.9030208@gmx.net \
    --to=benadler@gmx.net \
    --cc=linux-bluetooth@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox