Bluetooth Research

From WebOS Internals

Jump to: navigation, search

Testing tools

There are several bluetooth related programs in the stock webOS /usr/bin directory

root@castle:/usr/bin# ls *Bt*
PmBtAtCmdSniff    PmBtEngine        PmBtTestApi       PmBtTestScript
PmBtCallStress    PmBtHfgCiev       PmBtTestContacts  PmBtTestStack
PmBtContacts      PmBtStack         PmBtTestJson
PmBtEcNr          PmBtStart         PmBtTestPair

PmBtTestApi

This appears to be a general bluetooth diagnostic tool

root@castle:/usr/bin# ./PmBtTestApi
Registered for Bluetooth server status
 
1. find: Finds nearby devices Devices
2. pair: Pairs with a selected device
3. remotepair: Remote pairing
4. GetTrustedDevices: Lists all trusted devices
5. radio:  Turn on or off radio and check status
6. setscan: Turn on or off discoverablity and connectability
7. isvisible: Check if device is visible
8. getremotename: Gets the name of remote device
9. setremotenickname: Sets a nick name for a remote device
a. setlocalname: Sets the local device's name
b. getlocalname: Displays local device's name
c. profconnect: Connect a profile
d. profdisconnect: Disconnect a profile
e. profassociate: Associate a profile with a BT address
f. profdisassociate: Disassociate a profile
j. profstate: profile connection status
R. remtrusteddev: Removes a trusted device
--------------- Hands free----------------------
H. Hfg Test Commands
--------------- Utilities----------------------
r. getlocaladdress: Get the local device's BT Address
o. setpagetimeout: Sets the page timeout
k. setlinksupervisiontimeout: Sets the Link Supervision timeout
i. Find device names of all found devices
l. Set Debug logging Level
z. Set state of Debug zone
0/q/Q. Exits the app
 
Type 'h' for help> Bluetooth server is up

Status

Type 'h' for help> 5
Enter Radio[ON/OFF/STATUS]:STATUS
 
[PmBtLib]: Waiting for event (0  luna://com.palm.bluetooth/gap/isradioon )
[PmBtLib]: Signalling parent a response was received for 0: err = 0x0  {"returnValue":true,"radioon":false}
[PmBtLib]: Waiting satisifed (0)  ipcRsp.err = 0x0
BtRadio status = OFF
Api took 0.000006592 secs
 
 
Type 'h' for help> 5
Enter Radio[ON/OFF/STATUS]:ON
 
[PmBtLib]: Waiting for event (1  luna://com.palm.bluetooth/gap/radioon {"visible":true,"connectable":true})
[PmBtLib]: Signalling parent a response was received for 1: err = 0x0  {"returnValue":true}
 Received notification : notifnradioon","error":0} [PmBtLib]: Waiting satisifed (1)  ipcRsp.err = 0x0
Api took 0.000851593 secs
 
Type 'h' for help> 5
Enter Radio[ON/OFF/STATUS]:STATUS
 
[PmBtLib]: Waiting for event (2  luna://com.palm.bluetooth/gap/isradioon )
[PmBtLib]: Signalling parent a response was received for 2: err = 0x0  {"returnValue":true,"radioon":true}
[PmBtLib]: Waiting satisifed (2)  ipcRsp.err = 0x0
BtRadio status = ON
Api took 0.000005341 secs

There are also some logs on this site Bluetooth logs

Personal tools
Google AdSense