Read the Bluetooth MAC address

Another method that the XBee Java Library provides is getBluetoothMacAddress(), which returns the EUI-48 Bluetooth MAC address of your XBee device in a format such as 00112233AABB.

Reading the Bluetooth MAC address

import com.digi.xbee.api.XBeeDevice;
 
[...]
 
XBeeDevice myXBeeDevice = [...];
myXBeeDevice.open();
 
System.out.println("The Bluetooth MAC address is: " + myXBeeDevice.getBluetoothMacAddress());

The getBluetoothMacAddress method may fail for the following reasons: