Hi
I am trying to park one bluetooth device.
First of all i have tried to use the bluez hci.c function hci_park_mode() to
park this device.
I have used the function in following manner
if( hci_park_mode(dd, handle, 0x200, 0x100, 25000) < 0 )
{
printf("\n Unable to park ...\n");
}
I am getting the handle correct here.
These is the concerned part of code.. but I am not getting the device
parked...
then I tried to check whether I can park it using hcitool cmd or not
This is the hciconfig -a output of my Master device
// Master
# hciconfig -a
hci0: Type: UART
BD Address: 00:80:37:2E:4C:C3 ACL MTU: 339:11 SCO MTU: 93:14
UP RUNNING PSCAN ISCAN
RX bytes:152425 acl:2402 sco:0 events:10389 errors:0
TX bytes:87079 acl:2791 sco:0 commands:3526 errors:0
Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: SLAVE ACCEPT
Name: 'LB:[unknown]'
Class: 0x820116
Service Classes: Networking
Device Class: Computer, Palm
HCI Ver: 2.0 (0x3) HCI Rev: 0x62b9 LMP Ver: 2.0 (0x3) LMP Subver:
0x62b9
Manufacturer: Infineon Technologies AG (9)
Slave has the same configuration and its Link policy is also Link policy:
RSWITCH HOLD SNIFF PARK
These is the output of hcitool con
# hcitool con
Connections:
< ACL 11:11:11:11:11:11 handle 512 state 1 lm MASTER
< ACL 00:80:37:2E:45:1E handle 256 state 1 lm MASTER
# hcitool cmd 0x02 0x005 0x0200 0x0090 0x000E
< HCI Command: ogf 0x02, ocf 0x0005, plen 3
00 90 0E
> HCI Event: 0x0f plen 4
12 01 05 08
# hcitool cmd 0x02 0x005 0x0100 0x0090 0x000E
< HCI Command: ogf 0x02, ocf 0x0005, plen 3
00 90 0E
> HCI Event: 0x0f plen 4
12 01 05 08
By searching into mailing list archieve ( link :
http://article.gmane.org/gmane.linux.bluez.devel/269/match=park )
I came to know that may be my parameters are wrong but I am not able to
understand what is wrong ..
One more thing.. hcitool con returns me handle as 256 ( hex 0x100 ).. Now
when I am giving this as first parameter in hcitool cmd the hex_dump
function in
hcitool.c prints only last two digits i.e. 00 . .. so I am a bit confused
that is my handle is passing correctly or not ?
Thnx for any help in advance...
Regards,
Mahin Gupta
-----Original Message-----
> the park mode support is always complicated. I would advise you to not
> support it. Especially with non CSR based chips. However you have to run
> hcidump -X -V to see what is really going on.
I would echo Marcel's comments. Use of Park Mode is generally discouraged
and at some point in the future there's a decent chance that Park Mode will
be deprecated.
Because of this, many of the devices that you might try to connect to may
support Park Mode but not enable it. You are much better off making sure
that Sniff Mode is working -- if your application needs to care.
--- tom
tom allebrandi
[email protected]
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users
Hi Mahin,
> I am trying to park one bluetooth device.
>
> First of all i have tried to use the bluez hci.c function
> hci_park_mode() to park this device.
> I have used the function in following manner
>
>
> if( hci_park_mode(dd, handle, 0x200, 0x100, 25000) < 0 )
> {
> printf("\n Unable to park ...\n");
> }
> I am getting the handle correct here.
>
> These is the concerned part of code.. but I am not getting the device
> parked...
> then I tried to check whether I can park it using hcitool cmd or not
>
> This is the hciconfig -a output of my Master device
>
> // Master
> # hciconfig -a
> hci0: Type: UART
> BD Address: 00:80:37:2E:4C:C3 ACL MTU: 339:11 SCO MTU: 93:14
> UP RUNNING PSCAN ISCAN
> RX bytes:152425 acl:2402 sco:0 events:10389 errors:0
> TX bytes:87079 acl:2791 sco:0 commands:3526 errors:0
> Features: 0xff 0xff 0x8f 0xfe 0x9b 0xf9 0x00 0x80
> Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
> Link policy: RSWITCH HOLD SNIFF PARK
> Link mode: SLAVE ACCEPT
> Name: 'LB:[unknown]'
> Class: 0x820116
> Service Classes: Networking
> Device Class: Computer, Palm
> HCI Ver: 2.0 (0x3) HCI Rev: 0x62b9 LMP Ver: 2.0 (0x3) LMP
> Subver: 0x62b9
> Manufacturer: Infineon Technologies AG (9)
>
> Slave has the same configuration and its Link policy is also Link
> policy: RSWITCH HOLD SNIFF PARK
>
> These is the output of hcitool con
> # hcitool con
> Connections:
> < ACL 11:11:11:11:11:11 handle 512 state 1 lm MASTER
> < ACL 00:80:37:2E:45:1E handle 256 state 1 lm MASTER
>
> # hcitool cmd 0x02 0x005 0x0200 0x0090 0x000E
> < HCI Command: ogf 0x02, ocf 0x0005, plen 3
> 00 90 0E
> > HCI Event: 0x0f plen 4
> 12 01 05 08
>
> # hcitool cmd 0x02 0x005 0x0100 0x0090 0x000E
> < HCI Command: ogf 0x02, ocf 0x0005, plen 3
> 00 90 0E
> > HCI Event: 0x0f plen 4
> 12 01 05 08
>
> By searching into mailing list archieve ( link :
> http://article.gmane.org/gmane.linux.bluez.devel/269/match=park )
> I came to know that may be my parameters are wrong but I am not able
> to understand what is wrong ..
>
> One more thing.. hcitool con returns me handle as 256 ( hex 0x100 )..
> Now when I am giving this as first parameter in hcitool cmd the
> hex_dump function in
> hcitool.c prints only last two digits i.e. 00 . .. so I am a bit
> confused that is my handle is passing correctly or not ?
the park mode support is always complicated. I would advise you to not
support it. Especially with non CSR based chips. However you have to run
hcidump -X -V to see what is really going on.
Regards
Marcel
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Bluez-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-users