Nordic Semiconductor Asa · OSL:NOD

Nordic Semiconductor Asa — Technical Presentation (September 2020)

73 slides from Nordic Semiconductor Asa's technical presentation, September 2020

  1. Slide 1: Everything you need to know about Bluetooth LE advertising

    Everything you need to know about Bluetooth LE advertising Nordic Tech Webinar Hung Bui / Senior Application Engineer Håkon Helsing / Senior Application Engineer September 2020

  2. Slide 2: Practicalities

    © Nordic Semiconductor Practicalities  Duration: 50-60 min  Questions are encouraged!  Please type questions in the top of the right sidebar  All questions are anonymous  Try to keep them relevant to the topic  I will answer questions towards the end  The chat is not anonymous, and should not

  3. Slide 3: Today's hosts

    © Nordic Semiconductor Today’s hosts Hung Bui Håkon Helsing Senior Application Senior Application Engineer Engineer

  4. Slide 4: Agenda

    © Nordic Semiconductor Agenda  Basics  Advertising Extensions  Advertising types  Advertising data format  nRF Connect SDK API and example walk through  Advertisiment analysis with nRF Sniffer for Bluetooth LE

  5. Slide 5: Basics

    Basics

  6. Slide 6: What is advertising?

    © Nordic Semiconductor What is advertising?  A Broadcaster advertises to broadcast data  Data  RSSI  Direction Finding I/Q data  A Peripheral advertises to broadcast data and/or to make itself discoverable for a connection  Two types of advertising:  Legacy advertising  Extended advertising

  7. Slide 7: GAP roles and Link Layer states

    © Nordic Semiconductor GAP roles and Link Layer states GAP role Link Layer state Broadcaster Advertising Observer Scanning Peripheral Advertising Connection (Slave) Central Scanning Initiating Connection (Master) All roles can also be in the standby state Bluetooth Core Specification 5.2, Vol 3, Par

  8. Slide 8: Roles (GAP)

    © Nordic Semiconductor Roles (GAP) B Broadcaster O Observer O B P Peripheral C Central

  9. Slide 9: Roles (GAP)

    © Nordic Semiconductor Roles (GAP) C B Broadcaster O Observer O B P Peripheral C Central

  10. Slide 10: Roles (GAP)

    © Nordic Semiconductor Roles (GAP) C B Broadcaster O Observer O P B P Peripheral C Central

  11. Slide 11: Roles (GAP)

    © Nordic Semiconductor Roles (GAP) C B Broadcaster O Observer O P B P Peripheral C Central

  12. Slide 12: Roles (GAP)

    © Nordic Semiconductor Roles (GAP) C B Broadcaster O Observer O P B P Peripheral C Central

  13. Slide 13: Advertising and scanning

    © Nordic Semiconductor Advertising and scanning  Advertising interval = 20 ms  0-10 ms random delay 37 38 39  Advertising on channel B 20 ms 25 ms 28 ms 22 ms

  14. Slide 14: Advertising and scanning

    © Nordic Semiconductor Advertising and scanning  Advertising interval = 20 ms  0-10 ms random delay 37 38 39  Advertising on channel B 20 ms 25 ms 28 ms 22 ms

  15. Slide 15: Advertising and scanning

    © Nordic Semiconductor Advertising and scanning  Scan interval = 20 ms  Scan window = 10 ms O 37 38 39 37 38 B 20 ms 25 ms 28 ms 22 ms

  16. Slide 16: Advertising and scanning

    © Nordic Semiconductor Advertising and scanning  Scan interval = 20 ms  Scan window = 10 ms O 37 38 39 37 38 B 20 ms 25 ms 28 ms 22 ms

  17. Slide 17: Advertising and scanning

    © Nordic Semiconductor Advertising and scanning  Scan interval = 20 ms  Scan window = 10 ms O 37 38 39 37 38 B 20 ms 25 ms 28 ms 22 ms

  18. Slide 18: Advertising and scanning

    © Nordic Semiconductor Advertising and scanning  Scan interval = 20 ms  Scan window = 10 ms O 37 38 39 37 38 B 20 ms 25 ms 28 ms 22 ms

  19. Slide 19: Advertising types

    Advertising types

  20. Slide 20: Legacy advertising types

    © Nordic Semiconductor Legacy advertising types Type Scannable Connectable ADV_IND Yes Yes ADV_SCAN_IND Yes ADV_NONCONN_IND ADV_DIRECT_IND Yes Bluetooth Core Specification 5.2, Vol 6, Part B, 2.3.1

  21. Slide 21: Legacy advertising types

    © Nordic Semiconductor Legacy advertising types Type Scannable Connectable ADV_IND Yes Yes ADV_SCAN_IND Yes ADV_NONCONN_IND ADV_DIRECT_IND Yes  Extended advertising types  ADV_EXT_IND  AUX_ADV_IND  AUX_SYNC_IND  AUX_CHAIN_IND Bluetooth Core Specification 5.2, Vol 6, Part B, 2.3.1

  22. Slide 22: GAP roles and advertising types

    © Nordic Semiconductor GAP roles and advertising types GAP role Advertising types Broadcaster ADV_SCAN_IND ADV_NONCONN_IND Peripheral ADV_IND ADV_SCAN_IND ADV_NONCONN_IND ADV_DIRECT_IND Bluetooth Core Specification 5.2, Vol 3, Part C, 2.2.2

  23. Slide 23: Scan request and scan response

    © Nordic Semiconductor Scan request and scan response  ADV_SCAN_IND and ADV_IND are scannable O RX B RX RX TX TX

  24. Slide 24: Scan request and scan response

    © Nordic Semiconductor Scan request and scan response  ADV_SCAN_IND and ADV_IND are scannable O RX B RX RX TX TX TX

  25. Slide 25: Scan request and scan response

    © Nordic Semiconductor Scan request and scan response  ADV_SCAN_IND and ADV_IND are scannable O RX TX Scan request B RX RX RX TX TX TX

  26. Slide 26: Scan request and scan response

    © Nordic Semiconductor Scan request and scan response  ADV_SCAN_IND and ADV_IND are scannable RX RX O TX Scan response B RX RX RX TX TX TX TX

  27. Slide 27: Connection request

    © Nordic Semiconductor Connection request  ADV_IND and ADV_DIRECT_IND are connectable C RX P RX RX TX TX TX

  28. Slide 28: Connection request

    © Nordic Semiconductor Connection request  ADV_IND and ADV_DIRECT_IND are connectable C RX TX Connection request P RX RX RX TX TX TX

  29. Slide 29: Non-connectable advertising

    © Nordic Semiconductor Non-connectable advertising  ADV_NONCONN_IND  Not connectable or scannable  No RX -> Lower power consumption O RX B TX TX TX

  30. Slide 30: Advertising interval

    © Nordic Semiconductor Advertising interval  ADV_NONCONN_IND, ADV_SCAN_IND, ADV_IND  20 ms to 10.24 seconds, in steps of 0.625 ms  0-10 ms random delay  Trade-off between power consumption and device discovery time  Scan interval and scan window  Leverage scanner if possible Bluetooth Core Spe

  31. Slide 31: Advertising interval - ADV_DIRECT_IND

    © Nordic Semiconductor Advertising interval - ADV_DIRECT_IND  Directed advertising  Used to quickly reconnect to a known Central  Two duty cycle options:  Low duty cycle  The time between two advertisements shall be less or equal to 10 ms  High duty cycle  The time between two advertisements

  32. Slide 32: White list

    © Nordic Semiconductor White list  An advertiser can use a white list to filter out unwanted scan requests and/or connection requests  The white list contains device addresses and/or Identity Resolving Keys (IRKs) that the advertiser shall accept scan requests and/or connection requests from, filt

  33. Slide 33: Advertising data

    Advertising data

  34. Slide 34: Advertising PDU

    © Nordic Semiconductor Advertising PDU  Advertising PDU: Header Payload 16 bits (1-255 octets)  Advertising PDU header: PDU type RFU ChSel TXAdd RXAdd Length 4 bits 1 bit 1 bit 1 bit 1 bit 8 bits

  35. Slide 35: Advertising PDU header

    © Nordic Semiconductor Advertising PDU header  Advertising PDU Header: PDU type RFU ChSel TXAdd RXAdd Length 4 bits 1 bit 1 bit 1 bit 1 bit 8 bits PDU type PDU name 0b0000 ADV_IND 0b0001 ADV_DIRECT_IND 0b0010 ADV_NONCONN_IND 0b0110 ADV_SCAN_IND

  36. Slide 36: Advertising PDU header

    © Nordic Semiconductor Advertising PDU header  Advertising PDU header: PDU type RFU ChSel TXAdd RXAdd Length 4 bits 1 bit 1 bit 1 bit 1 bit 8 bits  RFU: Reserved for future use  ChSel: 1 if LE Channel Selection Algorithm #2 is supported  TXAdd: 0 if address is public, 1 if random  RXAdd: 0 if t

  37. Slide 37: Advertising PDU payload

    © Nordic Semiconductor Advertising PDU payload  Advertising PDU: Header Payload 16 bits (1-255 octets) ADV_IND payload ADV_NONCONN_IND payload AdvA AdvData AdvA AdvData (6 octets) (0-31 octets) (6 octets) (0-31 octets) ADV_DIRECT_IND payload ADV_SCAN_IND payload AdvA TargetA AdvA AdvData (6 octets)

  38. Slide 38: AdvA – Advertiser address

    © Nordic Semiconductor AdvA – Advertiser address  Public (TXAdd = 0)  Random (TXAdd = 1)  Unique address that can be recognized  Static  Private  Non-resolvable  Resolvable

  39. Slide 39: Advertising data format

    © Nordic Semiconductor Advertising data format  Advertising PDU: Header Payload 16 bits (1-255 octets) ADV_IND payload ADV_NONCONN_IND payload AdvA AdvData AdvA AdvData (6 octets) (0-31 octets) (6 octets) (0-31 octets) ADV_DIRECT_IND payload ADV_SCAN_IND payload AdvA TargetA AdvA AdvData (6 octets)

  40. Slide 40: Advertising data format

    © Nordic Semiconductor Advertising data format AD structure 1 AD structure 2 ··· AD structure N Length AD type AD data 1 octet n octets Length – n octets  With ADV_IND, ADV_NONCONN_IND and ADV_SCAN_IND the sum of the structures can be maximum 31 bytes, with overhead

  41. Slide 41: Advertising data format – AD type

    © Nordic Semiconductor Advertising data format – AD type  AD type data format is defined in Part A in Bluetooth Core Specification Supplement (CSS)  Most common AD types:  Service UUID  Local Name  Flags  Manufacturer Specific Data

  42. Slide 42: Advertising data format – AD type

    © Nordic Semiconductor Advertising data format – AD type  Service UUID  Typically included in connectable advertisements so that Centrals know supported service(s) without connecting. For example should a Heart Rate Sensor include the Heart Rate Service UUID  Local Name  Typically included in co

  43. Slide 43: Advertising data format – AD type

    © Nordic Semiconductor Advertising data format – AD type  Flags (0x01)  Shall be included when any of the Flag bits are non-zero and the advertising packet is connectable (ADV_IND)  5 bits:  Limited Discoverable Mode  General Discoverable Mode  BR/EDR Not Supported  Simultaneous LE and BR/EDR

  44. Slide 44: Advertising data format – AD type

    © Nordic Semiconductor Advertising data format – AD type  Manufacturer Specific Data (0xFF)  Typically used to include custom data  The two first octets shall contain a company identifier from the company identifier assigned numbers (free to obtain for Bluetooth SIG members)

  45. Slide 45: Advertising Extensions

    Advertising Extensions

  46. Slide 46: Why use Advertising Extensions?

    © Nordic Semiconductor Why use Advertising Extensions?  Increases advertising data length  Allows advertising on data channels  Enables long range connection establishment  Chaining  Periodic advertising

  47. Slide 47: Increases Advertising data length

    © Nordic Semiconductor Increases Advertising data length  Legacy Advertising  2 bytes header  37 bytes payload 37  31 bytes advertising data  Advertising Extensions  2 bytes header  255 bytes payload  254 bytes advertising data 255  0-63 extended header

  48. Slide 48: Advertising on data channels

    © Nordic Semiconductor Advertising on data channels  Legacy Advertising  Complete payload repeated on the advertising channels  Advertising extensions  Header is repeated on the advertising channels  Payload is only transmitted once

  49. Slide 49: Advertising on data channels

    © Nordic Semiconductor Advertising on data channels  Longer packets and coding  Congested advertising channels  Reduces contention and duty cycle 16320 symbols

  50. Slide 50: Chaining

    © Nordic Semiconductor Chaining  Advertisements can be chained together to extend the amount of advertising data 255 255 255

  51. Slide 51: Periodic Advertising

    © Nordic Semiconductor Periodic Advertising  Enables synchronized broadcasting of advertising data  Happens at a deterministic interval allowing true connectionless broadcasting

  52. Slide 52: Periodic Advertising

    © Nordic Semiconductor Periodic Advertising  Connectionless Direction Finding

  53. Slide 53: nRF Connect SDK

    nRF Connect SDK API, example walkthrough and demo

  54. Slide 54: Demo setup

    © Nordic Semiconductor Demo setup

  55. Slide 55: nRF Connect SDK

    © Nordic Semiconductor nRF Connect SDK

  56. Slide 56: SEGGER Embedded Studio

    © Nordic Semiconductor SEGGER Embedded Studio Preparing the network core of nRF5340  nRF 52 series devices may skip this step  Prepare nRF5340 PDK with the hci_rpmsg sample  Select the Network core as shown  Build and run the sample

  57. Slide 57: SEGGER Embedded Studio

    © Nordic Semiconductor SEGGER Embedded Studio Project setup  Locate the scan_adv sample  Select your board directory  Select the Application core  Click ‘Build and run’ to flash the sample

  58. Slide 58: Demo

    © Nordic Semiconductor Demo

  59. Slide 59: nRF Sniffer for Bluetooth LE

    © Nordic Semiconductor nRF Sniffer for Bluetooth LE • Find the downloadvand instructions at nordicsemi.com

  60. Slide 60: Demo

    © Nordic Semiconductor Demo

  61. Slide 61: Examples

    © Nordic Semiconductor Examples  Example 1: scan_adv sample, unmodified from Zephyr Project  Example 2: Static address, name, Company ID  Example 3: Advertising interval, set address  Example 4: Scan response, send more data(128-bit UUID)

  62. Slide 62: Example 1: scan_adv

    Example 1 scan_adv

  63. Slide 63: Example - scan_adv sample

    © Nordic Semiconductor Example 1 - scan_adv sample  [nRF Sniffer for Bluetooth LE window]

  64. Slide 64: Example 2: Static address, name, Company ID

    Example 2 Static address, name, Company ID

  65. Slide 65: Example

    © Nordic Semiconductor Example 2  [SES-window]

  66. Slide 66: Example Filtering

    © Nordic Semiconductor Example 2 Filtering  [Wireshark window] PACKET LIST Extra packet information PACKET DETAILS BLE packet Packet info as: PACKET BYTES - hexadecimal (left) - ASCII (right) Wireshark filter for connection interval btle.connect.interval

  67. Slide 67: Example 3: Advertising interval and set address

    Example 3 Advertising interval and set address

  68. Slide 68: Example

    © Nordic Semiconductor Example 3  [SES-window]

  69. Slide 69: Example

    © Nordic Semiconductor Example 3  [Wireshark window]

  70. Slide 70: Example 4: Scan response, send more data

    Example 4 Scan response, send more data(128-bit UUID)

  71. Slide 71: Example

    © Nordic Semiconductor Example 4  [SES-window]

  72. Slide 72: Example

    © Nordic Semiconductor Example 4  [Wireshark window]

  73. Slide 73: Q&A

    Q&A

Nordic Semiconductor — Technical Presentation (September 2020) on 6ix