Re: Extracting iBeacon Advertisement Packets

Martin <ma@...>

Sorry, I was copying the wrong code..

int i;

//print adv. packet
for(i=0;i<buf->len;i++) {
printk("%d %02X\n",i, buf->data[i]);

//print major
printk("maj: %d\n",((buf->data[25] & 0xff) * 0x100 + (buf->data[26] & 0xff) ));
Am Mi., 21. Nov. 2018 um 18:12 Uhr schrieb Martin <>:

Well, simple enough.

int i;

for(i=0; i<5; i++) {
printf("i%d\n", i+1);

prints the advertisement packet's bytes in decimals and includes the
UUID acc. to the article. Hope this helps anyone...

Am Mi., 21. Nov. 2018 um 17:56 Uhr schrieb Martin <>:

I am quite new to Zephyr and want to extract iBeacon Advertisement
Packets. I already have access to them as a net_buf_simple structure,
but I want to read the major and minor for example. I realize that I
have to probably read some certain bytes out of net_buf_simple
(according to
Can someone point me to a direction (function) to do this?


Join to automatically receive all group messages.