Node Web Bluetooth
adapters/simpleble
Peripheral
Interface Peripheral
SimpleBLE Peripheral.
interface
Peripheral
{
address
:
string
;
addressType
:
AddressType
;
connectable
:
boolean
;
connected
:
boolean
;
identifier
:
string
;
manufacturerData
:
Record
<
string
,
Uint8Array
>
;
mtu
:
number
;
paired
:
boolean
;
rssi
:
number
;
services
:
Service
[]
;
txPower
:
number
;
connect
()
:
boolean
;
disconnect
()
:
boolean
;
indicate
(
service
:
string
,
characteristic
:
string
,
cb
:
(
data
:
Uint8Array
)
=>
void
,
)
:
boolean
;
notify
(
service
:
string
,
characteristic
:
string
,
cb
:
(
data
:
Uint8Array
)
=>
void
,
)
:
boolean
;
read
(
service
:
string
,
characteristic
:
string
)
:
Uint8Array
;
readDescriptor
(
service
:
string
,
characteristic
:
string
,
descriptor
:
string
,
)
:
Uint8Array
;
setCallbackOnConnected
(
cb
:
()
=>
void
)
:
boolean
;
setCallbackOnDisconnected
(
cb
:
()
=>
void
)
:
boolean
;
unpair
()
:
boolean
;
unsubscribe
(
service
:
string
,
characteristic
:
string
)
:
boolean
;
writeCommand
(
service
:
string
,
characteristic
:
string
,
data
:
Uint8Array
,
)
:
boolean
;
writeDescriptor
(
service
:
string
,
characteristic
:
string
,
descriptor
:
string
,
data
:
Uint8Array
,
)
:
boolean
;
writeRequest
(
service
:
string
,
characteristic
:
string
,
data
:
Uint8Array
,
)
:
boolean
;
}
Index
Properties
address
address
Type
connectable
connected
identifier
manufacturer
Data
mtu
paired
rssi
services
tx
Power
Methods
connect
disconnect
indicate
notify
read
read
Descriptor
set
Callback
On
Connected
set
Callback
On
Disconnected
unpair
unsubscribe
write
Command
write
Descriptor
write
Request
Properties
address
address
:
string
address
Type
addressType
:
AddressType
connectable
connectable
:
boolean
connected
connected
:
boolean
identifier
identifier
:
string
manufacturer
Data
manufacturerData
:
Record
<
string
,
Uint8Array
>
mtu
mtu
:
number
paired
paired
:
boolean
rssi
rssi
:
number
services
services
:
Service
[]
tx
Power
txPower
:
number
Methods
connect
connect
()
:
boolean
Returns
boolean
disconnect
disconnect
()
:
boolean
Returns
boolean
indicate
indicate
(
service
:
string
,
characteristic
:
string
,
cb
:
(
data
:
Uint8Array
)
=>
void
,
)
:
boolean
Parameters
service
:
string
characteristic
:
string
cb
:
(
data
:
Uint8Array
)
=>
void
Returns
boolean
notify
notify
(
service
:
string
,
characteristic
:
string
,
cb
:
(
data
:
Uint8Array
)
=>
void
,
)
:
boolean
Parameters
service
:
string
characteristic
:
string
cb
:
(
data
:
Uint8Array
)
=>
void
Returns
boolean
read
read
(
service
:
string
,
characteristic
:
string
)
:
Uint8Array
Parameters
service
:
string
characteristic
:
string
Returns
Uint8Array
read
Descriptor
readDescriptor
(
service
:
string
,
characteristic
:
string
,
descriptor
:
string
,
)
:
Uint8Array
Parameters
service
:
string
characteristic
:
string
descriptor
:
string
Returns
Uint8Array
set
Callback
On
Connected
setCallbackOnConnected
(
cb
:
()
=>
void
)
:
boolean
Parameters
cb
:
()
=>
void
Returns
boolean
set
Callback
On
Disconnected
setCallbackOnDisconnected
(
cb
:
()
=>
void
)
:
boolean
Parameters
cb
:
()
=>
void
Returns
boolean
unpair
unpair
()
:
boolean
Returns
boolean
unsubscribe
unsubscribe
(
service
:
string
,
characteristic
:
string
)
:
boolean
Parameters
service
:
string
characteristic
:
string
Returns
boolean
write
Command
writeCommand
(
service
:
string
,
characteristic
:
string
,
data
:
Uint8Array
)
:
boolean
Parameters
service
:
string
characteristic
:
string
data
:
Uint8Array
Returns
boolean
write
Descriptor
writeDescriptor
(
service
:
string
,
characteristic
:
string
,
descriptor
:
string
,
data
:
Uint8Array
,
)
:
boolean
Parameters
service
:
string
characteristic
:
string
descriptor
:
string
data
:
Uint8Array
Returns
boolean
write
Request
writeRequest
(
service
:
string
,
characteristic
:
string
,
data
:
Uint8Array
)
:
boolean
Parameters
service
:
string
characteristic
:
string
data
:
Uint8Array
Returns
boolean
Settings
Member Visibility
Protected
Inherited
Theme
OS
Light
Dark
On This Page
Properties
address
address
Type
connectable
connected
identifier
manufacturer
Data
mtu
paired
rssi
services
tx
Power
Methods
connect
disconnect
indicate
notify
read
read
Descriptor
set
Callback
On
Connected
set
Callback
On
Disconnected
unpair
unsubscribe
write
Command
write
Descriptor
write
Request
Node Web Bluetooth
adapters
adapter
EVENT_
ENABLED
adapter
noble-
adapter
simpleble
Address
Type
Adapter
Characteristic
Peripheral
Service
Descriptor
get
Adapters
is
Enabled
simpleble-
adapter
bluetooth
Bluetooth
Impl
Bluetooth
Options
get
Adapters
browser
Bluetooth
bluetooth
Bluetooth
UUID
characteristic
Bluetooth
Remote
GATT
Characteristic
Impl
descriptor
Bluetooth
Remote
GATT
Descriptor
Impl
device
Bluetooth
Device
Impl
events
index
bluetooth
Bluetooth
Bluetooth
Options
Bluetooth
UUID
get
Adapters
server
Bluetooth
Remote
GATT
Server
Impl
service
Bluetooth
Remote
GATT
Service
Impl
uuid
Bluetooth
UUID
M
M
N
E
P
V
F
C
I
C
P
M
F
P
C
P
T
T
A
A
A
T
R
SimpleBLE Peripheral.