Skip to contentSkip to conversation

Missing BT_POWER option for l2cap sockets in bluetooth.h?

DISCUSSION Mathieu Laurendeau 2 participants 3 messages Dec 2, 2013 – Dec 3, 2013 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hello,

I believe the following defines are missing in the bluetooth.h file:

#define BT_POWER 9

struct bt_power {
        uint8_t force_active;
};

#define BT_POWER_FORCE_ACTIVE_OFF 0
#define BT_POWER_FORCE_ACTIVE_ON 1

Regards,
Mathieu

#1 lore raw

Hi Mathieu,

Quoted 8 lines · Mathieu Laurendeau

I believe the following defines are missing in the bluetooth.h file:

#define BT_POWER 9

struct bt_power {
        uint8_t force_active;
};

#define BT_POWER_FORCE_ACTIVE_OFF 0
#define BT_POWER_FORCE_ACTIVE_ON 1

I think the only user of this has been pre-4.2 Android versions (considering that the feature came from Android developers), which is probably why this never made it to bluez.git. Anyway, I just pushed a patch to add it there.

What are you planning to use this for? Do you have a patch to contribute to our A2DP implementation?

Johan

#2 lore raw
Quoted 1 line · Johan Hedberg

What are you planning to use this for?

I'm working on a software [1] that can make a PC take the identity of a Sixaxis and control a PS3 over bluetooth. It worked fine until kernel 3.1 from which there was a connection issue (a variable latency of at least 4s). I tried tweaking the flush timeout, but it was not concluding. Lately I took a look at the kernel source code and saw the BT_POWER option was introduced in kernel 3.1. I turned it off and the latency disappeared.

Thanks for the patch,

Mathieu

[1] https://github.com/matlo/GIMX