You are here: Lua Scripting Resources eGuide > Lua Scripting API Reference Guide > Bluetooth® Smart Library > getName

20.3.1 getName

name = peripheral:getName()

Returns the name of the peripheral as a string. The peripheral name is what an Application would typically show to the user. There is no guarantee that two different devices have different names. On the contrary two devices of the same kind and vendor could show the same name until changed by the user. If no name is available at the point of time nil will be returned. Changing the name for Bluetooth® LE device could be device specific.

Introduced in platform.apiLevel = '2.5'