Identify espruino hardware. by MAC address?

Posted on
  • I want to identify models of hardware running espruino. For instance the bangle.js devices.
    Should i use the MAC address(NRF.getAddress())?
    Other method?

    Assuming that MAC has not been changed. Are the first 11 characters of the MAC common to all bangle.js devices ?

  • I'm afraid I don't think you can rely on the MAC to be similar between different devices - while once batch might be the same, another batch will probably be entirely different.

    You're trying to identify them externally? Eg by Bluetooth, not from code running on the device itself?

    If so I think your only bet is to look at the advertised name

  • I just edited my question, as it was not well focused.
    The identification is internal, and i supposed that all bangle or puck devices have some digits of MAC in common. But maybe there are other hw data that can be used to identify the device model.

  • can you use process.env.BOARD ?

  • can you use process.env.BOARD

    That's what I'd recommend!

  • I tried and it works well :)
    Also I see that I can find the full list of models and more details in files at Espruino/boards/xxxxxx.py

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Identify espruino hardware. by MAC address?

Posted by Avatar for dapgo @dapgo

Actions