Skip to content

Bluetooth

Get and set Bluetooth settings


Start Bluetooth device scan

GET
/startbtdiscovery:{n}

Args: 3 (Not sure what this argument means, I've only seen the app use the value 3 for it. Works with other integers and successfully starts a BT scan. Maybe a max list size?)

Parameters

Path Parameters

n*

Not sure what this argument means, I've only seen the app use the value 3 for it. Works with other integers and successfully starts a BT scan. Maybe a max list size?

Type
integer
Required

Responses

Successful response

text/html
JSON
"OK"

Playground

Variables
Key
Value

Samples


Get Bluetooth device scan result

GET
/getbtdiscoveryresult

First do a startbtdiscovery:3: to start the scan, then use this to get the result.

Output (JSON):
num: Number of found devices
scan_status: BT scan step
0: Not started
1: Initializing
2: ??? (never seen it)
3: Scanning
4: Finished scanning
list: List of found devices

Already paired devices may be listed as well.

Responses

Successful response

text/html
JSON
{
  
"num": 1,
  
"scan_status": 4,
  
"list": [
  
  
{
  
  
  
"name": "My Device",
  
  
  
"ad": "00:11:22:33:44:55",
  
  
  
"ct": 0,
  
  
  
"role": "Audio Source"
  
  
}
  
]
}

Playground

Samples


Clear Bluetooth device scan result

GET
/clearbtdiscoveryresult

Clears the Bluetooth device scan results

Responses

Successful response

text/html
JSON
"OK"

Playground

Samples


Get paired Bluetooth devices

GET
/getbthistory

Output (JSON):

num: Number of found devices
scan_status: BT scan step
1: Initializing
2: ??? (never seen it)
3: Scanning
4: Finished scanning
list: List of found devices

Responses

Successful response

text/html
JSON
{
  
"num": 1,
  
"scan_status": 4,
  
"list": [
  
  
{
  
  
  
"name": "My Device",
  
  
  
"ad": "00:11:22:33:44:55",
  
  
  
"ct": 0,
  
  
  
"role": "Audio Source"
  
  
}
  
]
}

Playground

Samples


Connect to a Bluetooth device

GET
/connectbta2dpsynk:{BT_MAC_ADDRESS}

Example: https://192.168.1.100/httpapi.asp?command=connectbta2dpsynk:9c:2a:be:2e:ce:f1

Output:
Success: OK
Error: Failed

Observations: The device should be an Audio Sink (e.g. speaker, A/V reciever). The audio output will be changed to the device.

Parameters

Path Parameters

BT_MAC_ADDRESS*

The Bluetooth MAC address of the device you want to connect to or disconnect from

Type
string
Required
Example"9c:2a:be:2e:ce:f1"

Responses

Successful response

text/html
JSON
"OK"

Playground

Variables
Key
Value

Samples


Disconnect from a Bluetooth device

GET
/disconnectbta2dpsynk:{BT_MAC_ADDRESS}

Example: https://192.168.1.100/httpapi.asp?command=disconnectbta2dpsynk:9c:2a:be:2e:ce:f1

Parameters

Path Parameters

BT_MAC_ADDRESS*

The Bluetooth MAC address of the device you want to connect to or disconnect from

Type
string
Required
Example"9c:2a:be:2e:ce:f1"

Responses

Successful response

text/html
JSON
"OK"

Playground

Variables
Key
Value

Samples


Get Bluetooth pairing status

GET
/getbtpairstatus

Example: https://192.168.1.100/httpapi.asp?command=getbtpairstatus

Output (JSON):
result: Pair status
0: Not paired
1: Disconnected
2: Connecting (assumption, never seen it)
3: Connected

Responses

Successful response

text/html
JSON
{
  
"result": 1
}

Playground

Samples


Connect to a Bluetooth source device

GET
/connectbta2dpsource:{str}

...

Parameters

Path Parameters

str*

Unknown

Type
string
Required

Responses

Successful response

Playground

Variables
Key
Value

Samples


Delete Bluetooth history

GET
/delbthistory:{str}

...

Parameters

Path Parameters

str*

Unknown

Type
string
Required

Responses

Successful response

Playground

Variables
Key
Value

Samples


Disconnect all Bluetooth devices

GET
/btdisconnectall

...

Responses

Successful response

Playground

Samples


Get Bluetooth pair device status

GET
/getbtPairDevStat

...

Responses

Successful response

Playground

Samples


Get Bluetooth status

GET
/getbtstatus

...

Responses

Successful response

Playground

Samples


Start Bluetooth server

GET
/startbtserver

...

Responses

Successful response

Playground

Samples


Start getting Bluetooth pair device status

GET
/startgetbtPairDevStat

...

Responses

Successful response

Playground

Samples


Stop Bluetooth discovery

GET
/stopbtdiscovery

...

Responses

Successful response

Playground

Samples


Stop Bluetooth server

GET
/stopbtserver:{n}

...

Parameters

Path Parameters

n*

Unknown

Type
integer
Required

Responses

Successful response

Playground

Variables
Key
Value

Samples


Enter Bluetooth pairing mode

GET
/btavkenterpair

...

Responses

Successful response

Playground

Samples


Pair with a BLE HID device

GET
/blehidpair:{str}

...

Parameters

Path Parameters

str*

Unknown

Type
string
Required

Responses

Successful response

Playground

Variables
Key
Value

Samples


Remove all paired BLE HID devices

GET
/blehidremoveall

...

Responses

Successful response

Playground

Samples


Recovery Bluetooth

GET
/btrecovery

...

Responses

Successful response

Playground

Samples


Get BLE HID status

GET
/getblehidstatus

...

Responses

Successful response

Playground

Samples


Start BLE scan

GET
/startblescan:{n}

...

Parameters

Path Parameters

n*

Unknown

Type
integer
Required

Responses

Successful response

Playground

Variables
Key
Value

Samples


Get BLE discovery result

GET
/getblediscoveryresult

...

Responses

Successful response

Playground

Samples


Powered by VitePress OpenAPI