Hi everyone!
I’m new to the forum, but I’ve been a programmer for more than a couple decades.
I am however having a difficult time getting many of the samples working since things seem to change so drastically between major (and sometimes minor) versions.
Most recently, I have discovered that none of the samples for getAddress()
will work on Mbed 6. The samples available seem to only support v2 or v5. I’ve searched both the Mbed site and the internet to no avail.
What does NOT work…
BLEProtocol::AddressType_t addr_type; // mbed v2?
nor
Gap::AddressType_t addr_type; // mbed v5?
However…
This sort of worked (i.e. declarations didn’t immediately choke compiler):
ble::own_address_type_t addr_type;
ble::address_t address;
_ble.gap().getAddress(&addr_type, address);
But getAddress()
resulted in the following error:
Error: Non-const lvalue reference to type 'ble::own_address_type_t' cannot bind to a temporary of type 'ble::own_address_type_t *' ...
So…
Does anyone have code that works on v6 you’d be willing to share? Any help would be much appreciated!
references:
v6 - Mbed OS Reference | Gap.h Source File
v5 - Mbed OS Reference | BLE.h Source File