Skip to content

Bugfix/ndef btle oob pairing#92

Merged
finger563 merged 3 commits intomainfrom
bugfix/ndef-btle-oob-pairing
Jul 14, 2023
Merged

Bugfix/ndef btle oob pairing#92
finger563 merged 3 commits intomainfrom
bugfix/ndef-btle-oob-pairing

Conversation

@finger563
Copy link
Contributor

Description

  • Remove the extra byte (which seemed to be needed but was incorrect) in the BLE address EIR field, since it prevented readers from parsing it as a correct NDEF record.
  • Fix NDEF BT and BLE OOB pairing records to send the MAC address bytes in reverse order so that readers will be able to assemble them into the correct addresss according to spec.
  • Update NDEF BLE OOB pairing record to have the long local name be first in the record, which ensures that the name shows up in the popup when android phones read the NDEF record.
  • Rebuild docs

Motivation and Context

The existing code could create valid NDEF records for BT devices, but the mac address it sent was incorrect. The existing code would create an invalid MAC address EIR for BLE devices, which would prevent readers such as Android phones from parsing the NDEF record appropriately. Removing this extra byte and updating the ordering of the mac address to be in reverse order enables successful OOB pairing with Android devices. Moving the BLE name EIR field to be first ensures that Android devices show the name (instead of an empty string) when showing the popup for NFC OOB pairing.

How has this been tested?

Building and running within another project.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2023-07-14 at 12 17 21

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Fix NDEF BT and BLE OOB pairing records to send the MAC address bytes in reverse order so that readers will be able to assemble them into the correct addresss according to spec.
* Update NDEF BLE OOB pairing record to have the long local name be first in the record, which ensures that the name shows up in the popup when android phones read the NDEF record.
* Fix NDEF BT and BLE OOB pairing records to send the MAC address bytes in reverse order so that readers will be able to assemble them into the correct addresss according to spec.
* Update NDEF BLE OOB pairing record to have the long local name be first in the record, which ensures that the name shows up in the popup when android phones read the NDEF record.
@finger563 finger563 added bug Something isn't working nfc labels Jul 14, 2023
@finger563 finger563 merged commit 264b2a9 into main Jul 14, 2023
@finger563 finger563 deleted the bugfix/ndef-btle-oob-pairing branch July 14, 2023 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working nfc

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant