• Lopy - picking up MAC address from Ibeacon

    LoPy bluetooth ble ibeacon mac lopy
    2
    0 Votes
    2 Posts
    1k Views
    J
    The MAC address printed on your beacons is just a nicely formatted version in hexadecimal of the 6 byte address. What you get from Python are the actual 6 bytes themselves (hence the b' at the start) and when you print them they get turned into the correspond ASCII characters for that value (or \xYY if it's not a printable character) You can use the binascii.hexlify function to turn each of those bytes into hexadecimal and make a string which is closer to what you have. For example your b'FS\xbd\x8c\xd2\x11' >>> import binascii >>> binascii.hexlify(b'FS\xbd\x8c\xd2\x11') b'4653bd8cd211' So this address is 46:53:bd:8c:d2:11 Of course you can split into pairs, add the colons and make all letters uppercase too using standard string manipulation.
  • 0 Votes
    2 Posts
    1k Views
    P
    Did you got any advise / response on creating an iBeacon with the WiPy2.0? Or did you figured it out yourself...?
  • 0 Votes
    123 Posts
    84k Views
    T
    My lopy4 arrived and i tested with it, too, although i was pretty sure it wouldn't make a difference. It didn't, it does the same thing. I left my lopy running since yesterday noon and from 270 readings, 223 were correct. So that's around 17-18% loss.
  • 0 Votes
    4 Posts
    2k Views
    R
    @pwest We've found out how. On iBeacon, when you read the data you get an Array. You need to do int(lastHexValue, 16) and then -256. This results in the set TxPower the BLE Beacon has Edit: this site explains very well how the iBeacon protocoll is built, aswell as to where to find the TxPower: http://www.warski.org/blog/2014/01/how-ibeacons-work/
  • Creating an Eddystone beacon?

    WiPy 2&3 eddystone ibeacon
    17
    0 Votes
    17 Posts
    5k Views
    J
    @zaphodbb I think the issue is that the code uses a long (128 bit) UUID instead of the short 16-bit UUID, so there's a very short limitation on the max URL size. Try replacing the value of uuid with [0xaa, 0xfe] or 0xfeaa, it should give you 14 more bytes for your URL (haven't tried it).