[riot-devel] [BLE] Random 48-bit address generation
brettswann at gmail.com
Wed Jun 15 15:36:32 CEST 2016
A random BD_ADDR is "okay" for testing, but just be aware of the
requirement for an OUI as discussed in BLE Core specification, volume 2,
section 1.2 . Also, steer clear of the reserved range mentioned in
On Wed, Jun 15, 2016 at 3:27 PM Martine Lenders <mail at martine-lenders.eu>
> alternatively, instead of truncating you can just "fold" the remaining
> bytes over using XOR this way you keep some of the variance introduced
> by the longer hash.
> Best regards,
> 2016-06-15 15:12 GMT+02:00 Jose Alamos <jialamos at uc.cl>:
> > Hello,
> > I don't know exactly how the BD_ADDR works, but you might try generate a
> > hash (maybe SHA256? ) from CPU ID (function cpuid_get ).
> > Then you can truncate to 48 bits and manually set/fix required bytes. Of
> > course the truncation makes the hash weaker in terms of the chances of
> > having 2 same BD_ADDR, but I think that's very unlikely.
> > Best regards.
> >  http://riot-os.org/api/sha256_8h.html
> > 
> > _______________________________________________
> > devel mailing list
> > devel at riot-os.org
> > https://lists.riot-os.org/mailman/listinfo/devel
> devel mailing list
> devel at riot-os.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the devel