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

20.4.3 getCharacteristics

table [, error] = service:getCharacteristics()

Returns a table containing the list of characteristics discovered which can be traversed with the help of the ipairs function. An empty table is returned if no characteristics were discovered or if getCharacteristics gets called before the characteristic discovery procedure completes. In case of an error, nil is returned together with an error message. See discoverCharacteristics (subsection 20.4.2).

Parameter

Type

Description

table

out table

A table containing the discovered characteristics otherwise nil if an error occurred.

error

out string (optional)

error out string (optional) If successful nil is returned, an error message otherwise

Introduced in platform.apiLevel = '2.5'