By Alexandre Alapetite on 2008-01-24; updated 2012-07-05

Get a mobile phone’s Bluetooth MAC address

français

It is often useful to know the Bluetooth MAC address of a cell phone.

With another computer, it can be discovered.
Furthermore, on some mobile phones, it is possible to type a special code to read this address: *#2820# on some Nokia and Samsung models.

When the above is not sufficient, I propose a mini program to download and run on your handheld device to read its Bluetooth MAC address. There is currently a version for telephones supporting Java (J2ME), and for phones running Android 2.0+.

As I have removed Java from this server, I do not do dynamic signing anymore, and only one user at a time is possible.

Bluetooth MAC address reader

All the steps below are to be done on your mobile phone:

  1. Point the Web browser of your mobile phone to this page, shortcut: http://a80.fr/bt
  2. Download the Bluetooth MAC reader program:
  3. Run the program

Footnotes

The above program is also an example of dynamic JAR file, enabling some session communication between the Java MIDlet and the Web page seen from the mobile phone’s browser.

The Java ME (MIDP-1+/CLDC-1+/Bluetooth-JSR82) code to obtain the Bluetooth address is the following:

LocalDevice localDevice = LocalDevice.getLocalDevice();
String mac = localDevice.getBluetoothAddress();

And the same Java code for Android 2.0+:

BluetoothAdapter bluetoothDefaultAdapter = BluetoothAdapter.getDefaultAdapter();
if ((bluetoothDefaultAdapter != null) && (bluetoothDefaultAdapter.isEnabled()))
	String mac = BluetoothAdapter.getDefaultAdapter().getAddress();
http://alexandre.alapetite.fr

Back