bluetooth
bluetooth commands are generic commands for all nexgentec™ devices that support Bluetooth. These commands utilize the generic Bluetooth protocol, enabling seamless integration and control across supported devices.
bluetooth.config.set
Change the Bluetooth configuration
Request
Note
The mute function only works if playback is currently active.
Note
The defaults parameter clears all configurations and ignores all other parameters sent with it.
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.config.set |
|
|
|
>=v1.0.16 |
|
name |
string |
Bluetooth Name |
>=v1.0.16 |
|
status |
0,1 |
Power on (1) or off (0) |
>=v1.0.16 |
|
pairing |
0,1 |
activate pairing (1) or deactivate (0) |
>=v1.0.16 |
|
reconnect |
0-15 |
activate and retry reconnect (1-15) or deactivate (0) |
>=v1.0.16 |
|
pairingMode |
0,1 |
Yes/no (1) or auto (0) |
>=v1.0.16 |
|
mute |
0,1 |
Mute (1) or Unmute (0) |
>=v1.0.16 |
|
defaults |
1 |
All Settings to Default (1) |
>=v1.0.16 |
{
"method": "bluetooth.config.set",
"params": {
"pairing": 1,
"status": 1,
"pairingMode": 1,
"name": "MyBTDev",
"reconnect": 1
},
"id": 1,
"jsonrpc": "2.0"
}
Reply
Result |
Comment |
|
null |
null means acknowledged, no error |
|
{"jsonrpc":"2.0","id":1,"result":null}
bluetooth.config.get
Get the Bluetooth configuration
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.config.get |
|
|
|
>=v1.0.16 |
{"jsonrpc":"2.0","id":1,"method":"bluetooth.config.get"}
Reply
Result |
Key |
Comment |
config |
|
|
|
pairing |
1 if pairing is active, 0 if pairing is deactivated |
|
media |
Read only max refresh rate of media info |
|
status |
1 if bluetooth antenna is active, 0 if not active |
|
pairingMode |
1 for Yes/No, 0 for Auto pairing |
|
codecs |
Read only activated codecs |
|
address |
Read only Bluetooth MAC Address |
|
error |
null if there is no error on the channel; otherwise, displays the error message. |
|
profiles |
Read only activated profiles |
|
name |
Bluetooth Name |
|
firmware |
Firmware version of Bluetooth Interface |
|
reconnect |
1-15 if active and retry, 0 no reconnect |
{
"result": {
"pairing": 0,
"media": {
"playProgRate": 5,
"trackID3Info": 1
},
"status": 1,
"pairingMode": 1,
"codecs": {
"sbc": 1,
"aac": 1,
"aptxLL": 1,
"aptxHD": 1,
"aptxAD": 1,
"aptx": 1
},
"defaults": null,
"address": "dc:0d:30:40:73:4a",
"error": null,
"profiles": {
"a2dpSource": 0,
"bisSink": 0,
"cisSink": 1,
"a2dpSink": 1
},
"name": "ngt-btir3-8c1f648a427a",
"mute": null,
"firmware": "V1.1.6",
"reconnect": 5
},
"id": 481,
"jsonrpc": "2.0"
}
bluetooth.config.subscribe
This method enables push notifications for configuration changes of the Bluetooth chip.
The pushed status messages follow the same format as the bluetooth.config.get replies.
Info
Subscribe to receive real-time updates about configuration changes of the Bluetooth chip.
Note
Push messages over HTTP transport are not supported.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.config.subscribe |
|
|
|
>=v1.0.16 |
{"jsonrpc":"2.0","id":1,"method":"bluetooth.config.subscribe"}
Reply
Result |
Comment |
|
null |
null means acknowledged, no error |
|
{"jsonrpc":"2.0","id":1,"result":null}
bluetooth.config.unsubscribe
Unsubscribe all Bluetooth config change push messages
Request
Method |
Param |
Value |
Comment |
Supported Versions |
amplifier.channels.unsubscribe |
|
|
|
>=v1.0.16 |
{"jsonrpc":"2.0","id":1,"method":"bluetooth.config.unsubscribe"}
Reply
Result |
Comment |
|
null |
null means acknowledged, no error |
|
{"jsonrpc":"2.0","id":1,"result":null}
bluetooth.peer.set
Set various aspects of the peer (connected Bluetooth device).
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.peer.set |
volume |
0-15 |
Set the volume. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 1,
"method": "bluetooth.peer.set",
"params": {
"volume": 10
}
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
bluetooth.peer.get
Retrieve all information about the connected peer (connected Bluetooth device).
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.peer.get |
|
|
|
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 1,
"method": "bluetooth.peer.get"
}
Reply
Result |
Key |
Comment |
peer |
|
|
|
mac |
Bluetooth MAC address of the connected device. |
|
media |
All media information, including artist, title, album, elapsed time, and total duration. |
|
connection |
The current connection state: unsupported, standby, connecting, connected, paused, streaming. |
|
volume |
The current volume level of the Bluetooth device. |
|
error |
null if there is no error; otherwise, displays the error message. |
|
node |
The unique identifier of the Bluetooth module. |
|
name |
The name of the connected Bluetooth device. |
|
codec |
The audio codec being used (e.g., AAC, SBC). |
|
pairCode |
The pairing code, if applicable; otherwise, null. |
{
"result": {
"mac": "74:15:f5:ea:05:83",
"media": {
"artist": "Hosini & Jones",
"elapsed": 3754,
"total": 288011,
"title": "Grön",
"state": "playing",
"album": "Cafe del Mar ChillWave 3"
},
"connection": "streaming",
"volume": 11,
"error": null,
"node": "ngt-btir3-8c1f648a427c",
"name": "iPad",
"codec": "AAC",
"pairCode": null
},
"id": 180,
"jsonrpc": "2.0"
}
bluetooth.peer.subscribe
This method enables push notifications for status changes of the connected Bluetooth peer. The pushed status messages follow the same format as the bluetooth.peer.get replies.
Info
Subscribe to receive real-time updates about the connected peer’s status.
Note
Push messages over HTTP transport are not supported.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.peer.subscribe |
|
|
Subscribe to peer status changes. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 1,
"method": "bluetooth.peer.subscribe"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
bluetooth.peer.unsubscribe
Unsubscribe from all status change messages for the connected Bluetooth peer (connected Bluetooth device).
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.peer.unsubscribe |
|
|
Unsubscribe from peer status changes. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 1,
"method": "bluetooth.peer.unsubscribe"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
bluetooth.peer.transport
Control playback and transport actions for the connected Bluetooth device.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.peer.transport |
play |
1 |
Start playback. |
>=v1.0.16 |
bluetooth.peer.transport |
stop |
1 |
Stop playback. |
>=v1.0.16 |
bluetooth.peer.transport |
pause |
1 |
Pause playback. |
>=v1.0.16 |
bluetooth.peer.transport |
skipfwd |
1 |
Skip to the next track. |
>=v1.0.16 |
bluetooth.peer.transport |
skiprev |
1 |
Skip to the previous track. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 1,
"method": "bluetooth.peer.transport",
"params": {
"play": 1
}
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
bluetooth.peer.release
Release the currently connected Bluetooth peer (connected Bluetooth device).
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.peer.release |
|
|
Release the connected Bluetooth peer. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 1,
"method": "bluetooth.peer.release"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
bluetooth.peers.release
Release all currently connected Bluetooth peers (connected Bluetooth devices).
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.peers.release |
|
|
Release all connected Bluetooth peers. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 1,
"method": "bluetooth.peers.release"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 1,
"result": null
}
bluetooth.pairedlist.get
Retrieve a list of all paired Bluetooth devices.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.pairedlist.get |
|
|
Retrieve the list of paired devices. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 68,
"method": "bluetooth.pairedlist.get"
}
Reply
Result |
Key |
Comment |
result |
peers |
A list of paired devices, each containing the following details: |
|
|
index: The index of the paired device. |
|
|
name: The name of the paired Bluetooth device. |
|
|
mac: The MAC address of the paired Bluetooth device. |
|
error |
null if there is no error; otherwise, displays the error message. |
{
"jsonrpc": "2.0",
"id": 68,
"result": {
"node": "ngt-btir3-8c1f648a427c",
"peers": [
{
"index": 1,
"name": "iPad",
"mac": "74:15:f5:ea:05:83"
},
{
"index": 2,
"name": "MyPhone",
"mac": "16:15:f5:44:2a:ab"
}
],
"error": null
}
}
bluetooth.pairedlist.clear
Clear the list of all paired Bluetooth devices.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.pairedlist.clear |
|
|
Clear all paired devices. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 69,
"method": "bluetooth.pairedlist.clear"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 69,
"result": null
}
bluetooth.pairedlist.remove
Remove specific devices from the paired Bluetooth devices list.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.pairedlist.remove |
peers |
Array of paired device objects |
Specify devices to remove by index, name, or MAC address. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 71,
"method": "bluetooth.pairedlist.remove",
"params": {
"peers": [
{
"index": 2
},
]
}
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 71,
"result": null
}
bluetooth.pairedlist.subscribe
Subscribe to push notifications for changes in the paired Bluetooth devices list.
This is useful for receiving real-time updates when devices are added or removed from the paired list.
The pushed status messages follow the same format as the bluetooth.pairedlist.get replies.
Info
Subscribe to receive real-time updates about paired list changes.
Note
Push messages over HTTP transport are not supported.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.pairedlist.subscribe |
|
|
Subscribe to paired list changes. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 232,
"method": "bluetooth.pairedlist.subscribe"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 232,
"result": null
}
bluetooth.pairedlist.unsubscribe
Unsubscribe from push notifications for changes in the paired Bluetooth devices list, stopping any further updates about paired list changes.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.pairedlist.unsubscribe |
|
|
Unsubscribe from paired list changes. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 233,
"method": "bluetooth.pairedlist.unsubscribe"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 233,
"result": null
}
bluetooth.acl.get
Retrieve the current Access Control List (ACL) for Bluetooth devices.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.acl.get |
|
|
Retrieve the current ACL. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 101,
"method": "bluetooth.acl.get"
}
Reply
Result |
Key |
Comment |
result |
rules |
A list of ACL rules, each containing the following details: |
|
|
mac: The MAC address of the device. |
|
|
name: Name of the device. |
|
|
access: 1 for allowed devices, 0 for denied devices. |
|
error |
null if there is no error; otherwise, displays the error message. |
{
"jsonrpc": "2.0",
"id": 101,
"result": {
"rules": [
{
"mac": "90:B1:44:9A:C2:5F",
"name": "MySuperPhone1",
"access": 1
},
{
"mac": "90:B1:44:9A:C2:5E",
"name": "MySuperPhone2",
"access": 0
}
],
"error": null
}
}
bluetooth.acl.clear
Clear all entries from the Access Control List (ACL).
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.acl.clear |
|
|
Clear all ACL entries. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 102,
"method": "bluetooth.acl.clear"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 102,
"result": null
}
bluetooth.acl.add
Add new rules to the Access Control List (ACL).
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.acl.add |
rules |
Array of ACL rule objects |
Specify devices to add by MAC address and access type, name not mandatory |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 103,
"method": "bluetooth.acl.add",
"params": {
"rules": [
{
"mac": "90:B1:44:9A:C2:5F",
"name": "MySuperPhone1",
"access": 1
},
]
}
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 103,
"result": null
}
bluetooth.acl.remove
Remove specific rules from the Access Control List (ACL).
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.acl.remove |
rules |
Array of ACL rule objects |
Specify devices to remove by MAC address or Name |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 104,
"method": "bluetooth.acl.remove",
"params": {
"rules": [
{
"mac": "90:B1:44:9A:C2:5E"
}
]
}
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 104,
"result": null
}
bluetooth.acl.subscribe
Subscribe to push notifications for changes in the Access Control List (ACL).
This is useful for receiving real-time updates about modifications to the ACL, such as adding or removing devices.
The pushed status messages follow the same format as the bluetooth.acl.get replies.
Info
Subscribe to receive real-time updates about ACL changes.
Note
Push messages over HTTP transport are not supported.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.acl.subscribe |
|
|
Subscribe to ACL changes. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 240,
"method": "bluetooth.acl.subscribe"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 240,
"result": null
}
bluetooth.acl.unsubscribe
Unsubscribe from push notifications for changes in the Access Control List (ACL), stopping any further updates about ACL changes.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.acl.unsubscribe |
|
|
Unsubscribe from ACL changes. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 241,
"method": "bluetooth.acl.unsubscribe"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 241,
"result": null
}
bluetooth.acl.config.get
Retrieve the current Access Control List (ACL) configuration.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.acl.config.get |
|
|
Retrieve the ACL configuration. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 119,
"method": "bluetooth.acl.config.get"
}
Reply
Result |
Key |
Comment |
result |
defaultLevel |
1 if new devices are allowed after pairing, 0 if they are rejected. |
|
error |
null if there is no error; otherwise, displays the error message. |
{
"jsonrpc": "2.0",
"id": 119,
"result": {
"defaultLevel": 1,
"error": null
}
}
bluetooth.acl.config.set
Set the default Access Control List (ACL) configuration.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.acl.config.set |
defaultLevel |
1, 0 |
1 to allow new devices after pairing, 0 to reject them. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 105,
"method": "bluetooth.acl.config.set",
"params": {
"defaultLevel": 0
}
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 105,
"result": null
}
Info
If the default level is set to 0, all new paired devices are rejected by default. Ensure to manually add allowed devices to the ACL using the web interface or the API.
Similarly, if the default level is set to 1, all devices are allowed by default. You can later restrict access by modifying the ACL.
bluetooth.acl.config.subscribe
Subscribe to push notifications for changes in the Access Control List (ACL) configuration.
The pushed status messages follow the same format as the bluetooth.acl.config.get replies.
Info
Subscribe to receive real-time updates about ACL configuration changes.
Note
Push messages over HTTP transport are not supported.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.acl.config.subscribe |
|
|
Subscribe to ACL configuration changes. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 236,
"method": "bluetooth.acl.config.subscribe"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 236,
"result": null
}
bluetooth.acl.config.unsubscribe
Unsubscribe from push notifications for changes in the Access Control List (ACL) configuration.
Request
Method |
Param |
Value |
Comment |
Supported Versions |
bluetooth.acl.config.unsubscribe |
|
|
Unsubscribe from ACL configuration changes. |
>=v1.0.16 |
{
"jsonrpc": "2.0",
"id": 237,
"method": "bluetooth.acl.config.unsubscribe"
}
Reply
Result |
Comment |
null |
null means the request was successful, with no errors. |
{
"jsonrpc": "2.0",
"id": 237,
"result": null
}