I am porting some code from MacOS to Windows. MacOS always returns a non-empty local name in advertisement packets while Windows seems to always return an empty local name in an advertisement packet.
I am porting some code from MacOS to Windows. MacOS always returns a non-empty local name in advertisement packets while Windows seems to always return an empty local name in an advertisement packet.
No, having a local name is not a requirement as part of sending out adverts. The requirements for BLE adverts depend on the type of advert, but for the simplest and most common advert type (ADV_IND, a.k.a scannable & connectable advert) the only requirement is the device's public or random address. None of the advert types require the local name to be part of the address. You can read more about this in the Bluetooth Specification v5.2, Vol 6, Part B, Section 2.3.1 (Advertising PDUs) [1].
You can also do a scan with nRF Connect on an Android/iOS device and you'll see that many devices don't have the name as part of advert, instead you get N/A as the device's name:-