8 years, 2 months ago.

Access mbed UID

As RZ-AH1 doesn't have device unique ID, i tried to access the mbed UID to generate mac address.

I have defined DEVICE_SEMIHOST to be able to use the method "mbed_interface_uid"

At execution, this method return "257" and array is not modified, this return value is not described in header files.

Is there any specific initialization to run before the call to "mbed_interface_uid" ?

Question relating to:

GR-PEACH is an Mbed enabled platform which combines the advantages of the Mbed ecosystem and Arduino UNO form factor.

Joffrey Coffineau, Which environment are you running in mbed5.2 OS or legacy mbed3.0

Search Results mbed | mbed https://developer.mbed.org/users/mbed.../mbed/.../mbed__interface_8h_source.html Aug 19, 2016 - ... interface mac address 00024 * if MBED_MAC_ADD_x are zero, interface uid sets mac address, 00025 * otherwise MAC_ADD_x are used. Uniquely Identify An Mbed? | mbed https://developer.mbed.org/forum/helloworld/topic/2048/ Nov 9, 2012 - 25 posts - ‎11 authors extern "C" mbed_mac_address(char *); int main() { uint64_t uid = 0; char ..... the MAC is extracted) using a semihost call to the mbed interface. Ethernet (MAC) address? 24 posts Jul 8, 2015 セミホスティングの無効化 6 posts Jun 26, 2014 mbed JTAG mechanism 12 posts Aug 25, 2011 More results from developer.mbed.org mbed_interface.h https://developer.mbed.org/users/mbed_official/code/mbed/file/.../mbed_interface.h ... Mbed interface mac address * if MBED_MAC_ADD_x are zero, interface uid ... int mbed_interface_connected(void); / Instruct the mbed interface to reset, ... Beta - Handbook | mbed https://developer.mbed.org/handbook/Beta Functions to control the mbed interface debug connection and power state: ... get the 6-byte unique mac address, that is part of the mbed interface UID. mbed_interface.h https://developer.mbed.org/users/screamer/code/mbed/file/.../mbed_interface.h Oct 24, 2012 - Functions to control the mbed interface * * mbed Microcontrollers have ... based on the interface UID * If the interface is not present, it returns a ... mbed-os/mbed_interface.h at master · ARMmbed/mbed-os · GitHub https://github.com/mbedmicro/mbed/blob/master/hal/api/mbed_interface.h

  1. include "device.h". /* Mbed interface mac address. * if MBED_MAC_ADD_x are zero, interface uid sets mac address,. * otherwise MAC_ADD_x are used. */. mbed-drivers/mbed_interface.h Source File https://docs.mbed.com/docs/mbed...api/.../drivers_2mbed__interface_8h_source.html Apr 25, 2016 - 22 /* Mbed interface mac address. 23 * if MBED_MAC_ADD_x are zero, interface uid sets mac address,. 24 * otherwise MAC_ADD_x are used. hal/api/mbed_interface.h Source File - mbed Documentation https://docs.mbed.com/docs/mbedmicro-api/en/.../mbed__interface_8h_source.html 24 * if MBED_MAC_ADD_x are zero, interface uid sets mac address, ... 50 / Determine whether the mbed interface is connected, based on whether debug is ... mbed_interface.h in Smoothie/gcc4mbed/external/mbed – Zi.iS https://zi.is/p/browser/Smoothie/gcc4mbed/external/mbed/mbed_interface.h?rev... 4, * mbed Microcontrollers have a built-in interface to provide functionality ... 57, * This returns a string containing the 32-character UID of the mbed interface. mbed-ls 1.2.4 : Python Package Index https://pypi.python.org/pypi/mbed-ls/1.2.4 Python Oct 3, 2016 - mbed-ls is a Python module that detects and lists mbed-enabled devices ... mbed-enabled device with host computer using USB interface.
posted by XtrmDesignsLLC GRPeach 27 Oct 2016

2 Answers

8 years, 1 month ago.

I will hazard a guess and say you are an advanced mbed5.2 OS user so this may be your answer:

mbed https://developer.mbed.org/users/mbed.../mbed/.../mbed__interface_8h_source.html Aug 19, 2016 - ... interface mac address 00024 * if MBED_MAC_ADD_x are zero, interface uid sets mac address, 00025 * otherwise MAC_ADD_x are used. Uniquely Identify An Mbed? | mbed.

I am trying to use the "int mbed_interface_uid(char *uid)" method of the file you are pointing, but the return value doesn't match the header description. It return "257".

I am using e2studio 5.1 and a Segger Jlink debbuger to load binaries. I tried to disconnect the debugger and reset the board, i have the same return value.

Regarding the other answer by Daiki Kate, i suppose that the Mbed ship has to be the debugger in order to respond to semihost commands. Is there a procedure to set the mbed ship as debugger once binaries are flashed ?

posted by Joffrey Coffineau 27 Oct 2016
8 years, 1 month ago.

When using the Semihosting it must be connected to the debugger.
Please see below for more information.
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0376d/Bgbjjgij.html

If you connect to the global network, please set the correct MAC address.