* Re: dund
From: Vladimir Botka @ 2010-09-12 14:37 UTC (permalink / raw)
To: Ivan Baidakou; +Cc: Bastien Nocera, linux-bluetooth@vger.kernel.org
In-Reply-To: <20100912114411.2678ffbe@gmail.com>
On Sun, 12 Sep 2010 11:44:11 +0300
Ivan Baidakou <the.dmol@gmail.com> wrote:
> You haven't real experience, right?
I have.
# pilot-xfer -p bt:00:07:E0:B3:DD:03 -l
Listening for incoming connection on bt:00:07:E0:B3:DD:03... connected!
Reading list of databases in RAM...
AdditDVSData
ADD050SData
AdditSystemSData
<snip>
Cheers,
-vlado
^ permalink raw reply
* Re: dund
From: Ivan Baidakou @ 2010-09-12 8:44 UTC (permalink / raw)
To: Bastien Nocera; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <16C0AC8E-F3CC-41A8-BE7D-C1BCB7F10CCC@hadess.net>
---=== reply ===---
You haven't real experience, right? In any case I don't know how to do
it: in the official pilot-link guide there is need to establish TCP
connection to sync (http://howto.pilot-link.org/bluesync/gb.html), and
to establish it they recommend to launch dund
(http://howto.pilot-link.org/bluesync/ga.html).
That's why I do ask here, what thing in new bluez can replace the
deprecated dund?
Best regards,
Ivan Baidakou
---=== original message ===---
Date: Sun, 12 Sep 2010 00:26:57 +0100
Subj: Re: dund
From: Bastien Nocera <hadess@hadess.net>
To: Ivan Baidakou <the.dmol@gmail.com>
On 11 Sep 2010, at 19:45, Ivan Baidakou <the.dmol@gmail.com> wrote:
> Hi All,
>
> There was DUN daemon in bluez 2.x, but in current version it moved to
> old daemons and considered deprecated. If I understand correctly its
> aim is simple to launch pppd on incoming connection.
>
> Is is possible to reach the same behaviour via current implementation
> without dund? Currently I do need dund to sync my Palm with desktop; I
> performed internet search and found not any solution.
Gnome-pilot and pilot-link both support native Bluetooth connections.
Cheers
^ permalink raw reply
* Re: dund
From: Bastien Nocera @ 2010-09-11 23:26 UTC (permalink / raw)
To: Ivan Baidakou; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <20100911214553.0d8bc6f0@gmail.com>
On 11 Sep 2010, at 19:45, Ivan Baidakou <the.dmol@gmail.com> wrote:
> Hi All,
>
> There was DUN daemon in bluez 2.x, but in current version it moved to
> old daemons and considered deprecated. If I understand correctly its
> aim is simple to launch pppd on incoming connection.
>
> Is is possible to reach the same behaviour via current implementation
> without dund? Currently I do need dund to sync my Palm with desktop; I
> performed internet search and found not any solution.
Gnome-pilot and pilot-link both support native Bluetooth connections.
Cheers
^ permalink raw reply
* dund
From: Ivan Baidakou @ 2010-09-11 18:45 UTC (permalink / raw)
To: linux-bluetooth@vger.kernel.org
Hi All,
There was DUN daemon in bluez 2.x, but in current version it moved to
old daemons and considered deprecated. If I understand correctly its
aim is simple to launch pppd on incoming connection.
Is is possible to reach the same behaviour via current implementation
without dund? Currently I do need dund to sync my Palm with desktop; I
performed internet search and found not any solution.
Thanks for helping.
Best regards,
Ivan Baidakou
^ permalink raw reply
* Re: set LE advertise not working...
From: Pavan Savoy @ 2010-09-10 22:22 UTC (permalink / raw)
To: Mike Tsai
Cc: Claudio Takahasi, Anderson Lizardo, Anderson Briglia,
linux-bluetooth@vger.kernel.org
In-Reply-To: <35B17FE5076C7040809188FBE7913F983F2381E185@SC1EXMB-MBCL.global.atheros.com>
So do these (my) dual mode device has some command where I can put it
in BLE (slave) mode only ?
Is that not part of spec?
PS:
Still trying to get around the spec and its uses.. so please excuse
naive questions...
On Fri, Sep 10, 2010 at 4:35 PM, Mike Tsai <Mike.Tsai@atheros.com> wrote:
>
> -----Original Message-----
> From: linux-bluetooth-owner@vger.kernel.org [mailto:linux-bluetooth-owner@vger.kernel.org] On Behalf Of Claudio Takahasi
> Sent: Friday, September 10, 2010 2:03 PM
> To: Anderson Lizardo
> Cc: Pavan Savoy; Anderson Briglia; linux-bluetooth@vger.kernel.org
> Subject: Re: set LE advertise not working...
>
> On Fri, Sep 10, 2010 at 5:35 PM, Anderson Lizardo
> <anderson.lizardo@openbossa.org> wrote:
>> On Fri, Sep 10, 2010 at 3:01 PM, Pavan Savoy <pavan_savoy@sify.com> wrote:
>>> No, I don't suppose my controller was in a advertising state.. even if
>>> it was why the return 0x0c? (command disallowed ..)
>>>
>>> I wanted to know whether you have some HCI-VS commands which sort of
>>> enable the LE (AMP/radio/controller) ?
>>> Is it only then the leadv command works? Or does it just works right-away.
>>> I have one of those all in 1 chips.. bt/fm-rx-tx/gps so I am wondering
>>> should I do something to enable BLE and is it some sort of un-spoken
>>> standard?
>>
>> Does LE scan work for this same hardware?
>>
>> Do you have some windows software to test this hardware ? if so, you
>> can try putting one device in advertise mode there , then attempt
>> lescan on the other (from linux)... If it works, most probably the
>> hardware might require some initialization...
>>
>> At least some hardware requires firmware upload and vendor specific
>> one-time initialization which (I think) is out of scope for hciconfig.
>>
>> Regards,
>> --
>> Anderson Lizardo
>> OpenBossa Labs - INdT
>> Manaus - Brazil
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
>> Hi All,
>
>> I noticed that some LE hardwares don't allow to enable scanning or
>> advertising when inquiry scan and/or page scan are enabled.
>> Try to disable it using hciconfig or the D-Bus method before to start
>> LE operations.
>
>> Regards,
>> Claudio.
>
> Hello,
>
> Now I remember, dual mode devices (BR/EDR/LE) are not allowed to work as peripheral (or slave) device. The default advertising mode is "connectable indirect advertising mode". When you try to enable the advertising, you are trying to make this dual mode device as a potential slave to other LE masters and that's why the controller rejects the command.
>
> Scan should work though.
>
> I don't think you can ever connect 2 dual mode devices together, you need a single mode device (LE only) as the slave,
>
> Cheers,
>
> Mike
>
>
>
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* RE: set LE advertise not working...
From: Mike Tsai @ 2010-09-10 21:35 UTC (permalink / raw)
To: Claudio Takahasi, Anderson Lizardo
Cc: Pavan Savoy, Anderson Briglia, linux-bluetooth@vger.kernel.org
In-Reply-To: <AANLkTinUCN-MSEffR5mshV7PiB3AW=d+3pA8hXK8-68L@mail.gmail.com>
-----Original Message-----
From: linux-bluetooth-owner@vger.kernel.org [mailto:linux-bluetooth-owner@vger.kernel.org] On Behalf Of Claudio Takahasi
Sent: Friday, September 10, 2010 2:03 PM
To: Anderson Lizardo
Cc: Pavan Savoy; Anderson Briglia; linux-bluetooth@vger.kernel.org
Subject: Re: set LE advertise not working...
On Fri, Sep 10, 2010 at 5:35 PM, Anderson Lizardo
<anderson.lizardo@openbossa.org> wrote:
> On Fri, Sep 10, 2010 at 3:01 PM, Pavan Savoy <pavan_savoy@sify.com> wrote:
>> No, I don't suppose my controller was in a advertising state.. even if
>> it was why the return 0x0c? (command disallowed ..)
>>
>> I wanted to know whether you have some HCI-VS commands which sort of
>> enable the LE (AMP/radio/controller) ?
>> Is it only then the leadv command works? Or does it just works right-away.
>> I have one of those all in 1 chips.. bt/fm-rx-tx/gps so I am wondering
>> should I do something to enable BLE and is it some sort of un-spoken
>> standard?
>
> Does LE scan work for this same hardware?
>
> Do you have some windows software to test this hardware ? if so, you
> can try putting one device in advertise mode there , then attempt
> lescan on the other (from linux)... If it works, most probably the
> hardware might require some initialization...
>
> At least some hardware requires firmware upload and vendor specific
> one-time initialization which (I think) is out of scope for hciconfig.
>
> Regards,
> --
> Anderson Lizardo
> OpenBossa Labs - INdT
> Manaus - Brazil
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
> Hi All,
> I noticed that some LE hardwares don't allow to enable scanning or
> advertising when inquiry scan and/or page scan are enabled.
> Try to disable it using hciconfig or the D-Bus method before to start
> LE operations.
> Regards,
> Claudio.
Hello,
Now I remember, dual mode devices (BR/EDR/LE) are not allowed to work as peripheral (or slave) device. The default advertising mode is "connectable indirect advertising mode". When you try to enable the advertising, you are trying to make this dual mode device as a potential slave to other LE masters and that's why the controller rejects the command.
Scan should work though.
I don't think you can ever connect 2 dual mode devices together, you need a single mode device (LE only) as the slave,
Cheers,
Mike
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: set LE advertise not working...
From: Claudio Takahasi @ 2010-09-10 21:03 UTC (permalink / raw)
To: Anderson Lizardo; +Cc: Pavan Savoy, Anderson Briglia, linux-bluetooth
In-Reply-To: <AANLkTi=8nM_nh_4riZaCj77LLzaqRie0dPjGswqpSFz-@mail.gmail.com>
On Fri, Sep 10, 2010 at 5:35 PM, Anderson Lizardo
<anderson.lizardo@openbossa.org> wrote:
> On Fri, Sep 10, 2010 at 3:01 PM, Pavan Savoy <pavan_savoy@sify.com> wrote:
>> No, I don't suppose my controller was in a advertising state.. even if
>> it was why the return 0x0c? (command disallowed ..)
>>
>> I wanted to know whether you have some HCI-VS commands which sort of
>> enable the LE (AMP/radio/controller) ?
>> Is it only then the leadv command works? Or does it just works right-away.
>> I have one of those all in 1 chips.. bt/fm-rx-tx/gps so I am wondering
>> should I do something to enable BLE and is it some sort of un-spoken
>> standard?
>
> Does LE scan work for this same hardware?
>
> Do you have some windows software to test this hardware ? if so, you
> can try putting one device in advertise mode there , then attempt
> lescan on the other (from linux)... If it works, most probably the
> hardware might require some initialization...
>
> At least some hardware requires firmware upload and vendor specific
> one-time initialization which (I think) is out of scope for hciconfig.
>
> Regards,
> --
> Anderson Lizardo
> OpenBossa Labs - INdT
> Manaus - Brazil
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
Hi All,
I noticed that some LE hardwares don't allow to enable scanning or
advertising when inquiry scan and/or page scan are enabled.
Try to disable it using hciconfig or the D-Bus method before to start
LE operations.
Regards,
Claudio.
^ permalink raw reply
* Re: set LE advertise not working...
From: Anderson Lizardo @ 2010-09-10 20:35 UTC (permalink / raw)
To: Pavan Savoy; +Cc: Anderson Briglia, linux-bluetooth
In-Reply-To: <AANLkTi=v3ZbVv2PkgCnSKxMRBPmbZCM5JA+bBXfDEd5x@mail.gmail.com>
On Fri, Sep 10, 2010 at 3:01 PM, Pavan Savoy <pavan_savoy@sify.com> wrote:
> No, I don't suppose my controller was in a advertising state.. even if
> it was why the return 0x0c? (command disallowed ..)
>
> I wanted to know whether you have some HCI-VS commands which sort of
> enable the LE (AMP/radio/controller) ?
> Is it only then the leadv command works? Or does it just works right-away.
> I have one of those all in 1 chips.. bt/fm-rx-tx/gps so I am wondering
> should I do something to enable BLE and is it some sort of un-spoken
> standard?
Does LE scan work for this same hardware?
Do you have some windows software to test this hardware ? if so, you
can try putting one device in advertise mode there , then attempt
lescan on the other (from linux)... If it works, most probably the
hardware might require some initialization...
At least some hardware requires firmware upload and vendor specific
one-time initialization which (I think) is out of scope for hciconfig.
Regards,
--
Anderson Lizardo
OpenBossa Labs - INdT
Manaus - Brazil
^ permalink raw reply
* Re: Possible regression with skb_clone() in 2.6.36
From: Gustavo F. Padovan @ 2010-09-10 19:45 UTC (permalink / raw)
To: Mat Martineau; +Cc: linux-bluetooth, netdev, linux-kernel, marcel, davem
In-Reply-To: <alpine.DEB.2.00.1009100920270.14322@linux-sea-02>
Hi Mat,
* Mat Martineau <mathewm@codeaurora.org> [2010-09-10 09:53:31 -0700]:
>
> Gustavo -
>
> I'm not sure why the streaming code used to work, but this does not
> look like an skb_clone() problem. Your patch to remove the
> skb_clone() call in l2cap_streaming_send() addresses the root cause of
> this crash.
>
> On Wed, 8 Sep 2010, Gustavo F. Padovan wrote:
>
> > I've been experiencing some problems when running the L2CAP Streaming mode in
> > 2.6.36. The system quickly runs in an Out Of Memory condition and crash. That
> > wasn't happening before, so I think we may have a regression here (I didn't
> > find where yet). The crash log is below.
> >
> > The following patch does not fix the regression, but shows that removing the
> > skb_clone() call from l2cap_streaming_send() we workaround the problem. The
> > patch is good anyway because it saves memory and time.
> >
> > By now I have no idea on how to fix this.
> >
> > <snip>
>
> This has to do with the sk->sk_wmem_alloc accounting that controls the
> amount of write buffer space used on the socket.
>
> When the L2CAP streaming mode socket segments its data, it allocates
> memory using sock_alloc_send_skb() (via bt_skb_send_alloc()). Before
> that allocation call returns, skb_set_owner_w() is called on the new
> skb. This adds to sk->sk_wmem_alloc and sets skb->destructor so that
> sk->sk_wmem_alloc is correctly updated when the skb is freed.
>
> When that skb is cloned, the clone is not "owned" by the write buffer.
> The clone's destructor is set to NULL in __skb_clone(). The version
> of l2cap_streaming_send() that runs out of memory is passing the
> non-owned skb clone down to the HCI layer. The original skb (the one
> that's "owned by w") is immediately freed, which adjusts
> sk->sk_wmem_alloc back down - the socket thinks it has unlimited write
> buffer space. As a result, bt_skb_send_alloc() never blocks waiting
> for buffer space (or returns EAGAIN for nonblocking writes) and the
> HCI send queue keeps growing.
If the problem is what you are saying, add a skb_set_owner_w(skb, sk) on
the cloned skb should solve the problem, but it doesn't. That's exactly
what tcp_transmit_skb() does. Also that just appeared in 2.6.36, is was
working fine before, i.e, we have a regression here.
>
> This isn't a problem for the ERTM sends, because the original skbs are
> kept in the ERTM tx queue until they are acked. Once they're acked,
> the write buffer space is freed and additional skbs can be allocated.
It affects ERTM as well, but in that case the kernel doesn't crash
because ERTM block on sending trying to allocate memory. Then we are not
able to receive any ack (everything stays queued in sk_backlog_queue as
the sk is owned by the user) and ERTM stalls.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: Request for input regarding new driver in MFD for GPS_Bluetooth_FM controller CG2900
From: Pavan Savoy @ 2010-09-10 19:25 UTC (permalink / raw)
To: Alan Cox, linus.walleij, par-gunnar.p.hjalmdahl
Cc: pghatwork, linux-kernel, linux-bluetooth
In-Reply-To: <AANLkTikXFmaZs+XzrOWjWoLPhyUy0CEXfOQMqP=Xp1cO@mail.gmail.com>
ok bit more of information ....
We don;t use the hciattach, instead we have our own daemon which opens
up the UART and installs the line discipline (not N_HCI, but similar
one called N_SHARED) when the hciconfig hci0 up happens or even when
/dev/radio0 (FM V4L2 device) happens or when generic GPS character
device (/dev/tigps) happens...
There is non-mailine driver which gets modified to get into mainline @
http://git.omapzoom.org/?p=kernel/omap.git;a=tree;f=drivers/misc/ti-st;h=028ff4a739d7b59b94d0c613b5ef510ff338b65d;hb=refs/heads/p-android-omap-2.6.32
feel free to have a look at it...
Yes our solution too works with BlueZ and non-exactly a MFD driver but
it is a simple platform device driver .. by looks of things the driver
can run as is for your chip too .. (except for the firmware search and
download part .. may be...).
and note when we would want to support SPI transport for the same, we
plan a SPI-TTY driver ('ala usb-serial) where-in we can install this
N_TI_WL line discipline on that /dev/ttySPI0 device, and the SPI
related stuff to be handled by the spi-tty.c which registers itself as
a tty_device and a tty_driver ....
regards,
Pavan
On Fri, Sep 10, 2010 at 2:07 PM, Pavan Savoy <pavan_savoy@sify.com> wrote:
> Can you directly make use of the ti-st driver which is currently staged?
> It has _EXACTLY_ the same thing.... which is REALLY REALLY surprising !!!
>
> On Fri, Sep 10, 2010 at 8:38 AM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>>> - Is it OK to dynamically use the channels either from Kernel or User space?
>>
>> Quite a few devices do this. In most cases it makes no sense to burden
>> the user with channel management so its only natural that opening the tty
>> or direct interfaces should "just work"
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
^ permalink raw reply
* Re: Request for input regarding new driver in MFD for GPS_Bluetooth_FM controller CG2900
From: Pavan Savoy @ 2010-09-10 19:07 UTC (permalink / raw)
To: Alan Cox
Cc: pghatwork, par-gunnar.p.hjalmdahl, linux-kernel, linux-bluetooth,
linus.walleij
In-Reply-To: <20100910143813.4af0a3ce@lxorguk.ukuu.org.uk>
Can you directly make use of the ti-st driver which is currently staged?
It has _EXACTLY_ the same thing.... which is REALLY REALLY surprising !!!
On Fri, Sep 10, 2010 at 8:38 AM, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
>> - Is it OK to dynamically use the channels either from Kernel or User space?
>
> Quite a few devices do this. In most cases it makes no sense to burden
> the user with channel management so its only natural that opening the tty
> or direct interfaces should "just work"
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: set LE advertise not working...
From: Pavan Savoy @ 2010-09-10 19:01 UTC (permalink / raw)
To: Anderson Briglia; +Cc: linux-bluetooth
In-Reply-To: <4C8A758B.1060708@openbossa.org>
No, I don't suppose my controller was in a advertising state.. even if
it was why the return 0x0c? (command disallowed ..)
I wanted to know whether you have some HCI-VS commands which sort of
enable the LE (AMP/radio/controller) ?
Is it only then the leadv command works? Or does it just works right-away.
I have one of those all in 1 chips.. bt/fm-rx-tx/gps so I am wondering
should I do something to enable BLE and is it some sort of un-spoken
standard?
On Fri, Sep 10, 2010 at 1:14 PM, Anderson Briglia
<anderson.briglia@openbossa.org> wrote:
> On 09/10/2010 12:53 PM, Pavan Savoy wrote:
>>
>> Nope, I haven't applied the kernel patches...
>> But my kernel diff to the latest kernel is only regarding the "block"
>> and "unblock" to black list devices....
>>
>> do I need some patches in kernel for enabling/disabling BLE too ?
>> I thought it just sends out the commands to controller...
>>
>
> You are right. You don't need to have the kernel patches.
> I did some tests here and everything goes ok.
> Check the hcidump output below:
>
> 2010-09-10 14:13:19.032099 < HCI Command: Unknown (0x08|0x000a) plen 1
> 0000: 01 .
> 2010-09-10 14:13:19.070320 > HCI Event: Command Complete (0x0e) plen 4
> Unknown (0x08|0x000a) ncmd 2
> 0000: 00
>
> I just did a hciconfig hci0 leadv
>
> Regards,
>
> Anderson Briglia
>>
>> On Fri, Sep 10, 2010 at 8:40 AM, Anderson Briglia
>> <anderson.briglia@openbossa.org> wrote:
>>
>>>
>>> Hi Pavan,
>>>
>>> Try to make a hciconfig reset before setting leadv.
>>> Are you using that kernel patches I send before, right?
>>>
>>> Regards,
>>>
>>> Anderson Briglia
>>>
>>> On 09/09/2010 03:58 PM, Pavan Savoy wrote:
>>>
>>>>
>>>> I have an LE enabled BT controller, and I happened to send across a
>>>> simple "leadv" from the recently updated hciconfig
>>>> I got back the following data
>>>> "4 e 5 1 a 20 c 3a" and hence
>>>> "Can't set advertise mode on hci0: Success (0)"
>>>> and 0xC I guess by the BT spec means the command is disallowed (for
>>>> reasons unknown?....)
>>>>
>>>> So I'm just wondering, am I supposed to run some HCI-VS commands to
>>>> enable LE? I mean I should ask my vendor I agree, but anyone who has
>>>> got it working.. do they run some VS commands before enabling LE
>>>> advertising?
>>>> --
>>>> To unsubscribe from this list: send the line "unsubscribe
>>>> linux-bluetooth"
>>>> in
>>>> the body of a message to majordomo@vger.kernel.org
>>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>>
>>>>
>>>
>>>
>
>
^ permalink raw reply
* Re: MAP implementation status
From: Luiz Augusto von Dentz @ 2010-09-10 18:26 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: Radoslaw Jablonski, linux-bluetooth@vger.kernel.org
In-Reply-To: <20100910181259.GA19693@vigoh>
Hi,
On Fri, Sep 10, 2010 at 9:12 PM, Gustavo F. Padovan
<padovan@profusion.mobi> wrote:
> Hi Radoslaw,
>
> * Radoslaw Jablonski <ext-jablonski.radoslaw@nokia.com> [2010-09-09 15:46:33 +0300]:
>
>>
>> Hi all,
>> We plan to start implementation of Message Access Profile Server as
>> obexd plugin. Before we start with coding part I need to check if
>> someone else started implementing MAP Server, MNS Server of Map client.
>> If some code is already available, then we could combine our forces to
>> add MAP support for OBEXD.
>
> We had a Google Summer of Code Project on MAP this year. Vinicius was
> the mentor, he can talk about.
iirc it was mainly a MAP client, the other parts that are missing is:
- MAP plugin + drivers
- Backend infrastructure
- Backends
--
Luiz Augusto von Dentz
Computer Engineer
^ permalink raw reply
* Re: [PATCH v2 1/2] Bluetooth: Implement LE Set Advertise Enable cmd
From: Gustavo F. Padovan @ 2010-09-10 18:20 UTC (permalink / raw)
To: Anderson Briglia; +Cc: linux-bluetooth
In-Reply-To: <1284131696-26117-1-git-send-email-anderson.briglia@openbossa.org>
Hi Anderson,
* Anderson Briglia <anderson.briglia@openbossa.org> [2010-09-10 11:14:55 -0400]:
> This patch implements LE Set Advertise Enable command for dual mode and
> Low Energy hci controllers. It also adds new HCI flags in order to
> indicate the Advertising state for userland applications and kernel
> itself.
>
> Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
> ---
> include/net/bluetooth/hci.h | 7 +++++++
> net/bluetooth/hci_event.c | 27 +++++++++++++++++++++++++++
> 2 files changed, 34 insertions(+), 0 deletions(-)
>
> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
> index bcbdd6d..a28e92b 100644
> --- a/include/net/bluetooth/hci.h
> +++ b/include/net/bluetooth/hci.h
> @@ -76,6 +76,8 @@ enum {
> HCI_INQUIRY,
>
> HCI_RAW,
> +
> + HCI_LE_ADV,
> };
>
> /* HCI ioctl defines */
> @@ -593,6 +595,11 @@ struct hci_rp_read_bd_addr {
> bdaddr_t bdaddr;
> } __packed;
>
> +/* --- HCI LE Commands --- */
> +#define HCI_OP_LE_SET_ADVERTISE_ENABLE 0x200a
> + #define ADVERTISE_ENABLED 0x01
> + #define ADVERTISE_DISABLED 0x00
Just make these LE_ADVERTISE_ENABLED and LE_ADVERTISE_DISABLED then we
should be fine with this patch.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* Re: set LE advertise not working...
From: Anderson Briglia @ 2010-09-10 18:14 UTC (permalink / raw)
To: Pavan Savoy; +Cc: linux-bluetooth
In-Reply-To: <AANLkTin02sOL89MuUhWe1_nOg4umytfJKRfc=Z_dhpRq@mail.gmail.com>
On 09/10/2010 12:53 PM, Pavan Savoy wrote:
> Nope, I haven't applied the kernel patches...
> But my kernel diff to the latest kernel is only regarding the "block"
> and "unblock" to black list devices....
>
> do I need some patches in kernel for enabling/disabling BLE too ?
> I thought it just sends out the commands to controller...
>
You are right. You don't need to have the kernel patches.
I did some tests here and everything goes ok.
Check the hcidump output below:
2010-09-10 14:13:19.032099 < HCI Command: Unknown (0x08|0x000a) plen 1
0000: 01 .
2010-09-10 14:13:19.070320 > HCI Event: Command Complete (0x0e) plen 4
Unknown (0x08|0x000a) ncmd 2
0000: 00
I just did a hciconfig hci0 leadv
Regards,
Anderson Briglia
> On Fri, Sep 10, 2010 at 8:40 AM, Anderson Briglia
> <anderson.briglia@openbossa.org> wrote:
>
>> Hi Pavan,
>>
>> Try to make a hciconfig reset before setting leadv.
>> Are you using that kernel patches I send before, right?
>>
>> Regards,
>>
>> Anderson Briglia
>>
>> On 09/09/2010 03:58 PM, Pavan Savoy wrote:
>>
>>> I have an LE enabled BT controller, and I happened to send across a
>>> simple "leadv" from the recently updated hciconfig
>>> I got back the following data
>>> "4 e 5 1 a 20 c 3a" and hence
>>> "Can't set advertise mode on hci0: Success (0)"
>>> and 0xC I guess by the BT spec means the command is disallowed (for
>>> reasons unknown?....)
>>>
>>> So I'm just wondering, am I supposed to run some HCI-VS commands to
>>> enable LE? I mean I should ask my vendor I agree, but anyone who has
>>> got it working.. do they run some VS commands before enabling LE
>>> advertising?
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
>>> in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>>>
>>
>>
^ permalink raw reply
* Re: MAP implementation status
From: Gustavo F. Padovan @ 2010-09-10 18:12 UTC (permalink / raw)
To: Radoslaw Jablonski; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <4C88D729.7050803@nokia.com>
Hi Radoslaw,
* Radoslaw Jablonski <ext-jablonski.radoslaw@nokia.com> [2010-09-09 15:46:33 +0300]:
>
> Hi all,
> We plan to start implementation of Message Access Profile Server as
> obexd plugin. Before we start with coding part I need to check if
> someone else started implementing MAP Server, MNS Server of Map client.
> If some code is already available, then we could combine our forces to
> add MAP support for OBEXD.
We had a Google Summer of Code Project on MAP this year. Vinicius was
the mentor, he can talk about.
--
Gustavo F. Padovan
ProFUSION embedded systems - http://profusion.mobi
^ permalink raw reply
* RE: set LE advertise not working...
From: Mike Tsai @ 2010-09-10 17:49 UTC (permalink / raw)
To: Pavan Savoy, Anderson Briglia; +Cc: linux-bluetooth@vger.kernel.org
In-Reply-To: <AANLkTin02sOL89MuUhWe1_nOg4umytfJKRfc=Z_dhpRq@mail.gmail.com>
Is it possible that BT controller is not in standby state. i.e. it could be already in scanning or advertising sate by default?
Mike
-----Original Message-----
From: linux-bluetooth-owner@vger.kernel.org [mailto:linux-bluetooth-owner@vger.kernel.org] On Behalf Of Pavan Savoy
Sent: Friday, September 10, 2010 9:53 AM
To: Anderson Briglia
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: set LE advertise not working...
Nope, I haven't applied the kernel patches...
But my kernel diff to the latest kernel is only regarding the "block"
and "unblock" to black list devices....
do I need some patches in kernel for enabling/disabling BLE too ?
I thought it just sends out the commands to controller...
On Fri, Sep 10, 2010 at 8:40 AM, Anderson Briglia
<anderson.briglia@openbossa.org> wrote:
> Hi Pavan,
>
> Try to make a hciconfig reset before setting leadv.
> Are you using that kernel patches I send before, right?
>
> Regards,
>
> Anderson Briglia
>
> On 09/09/2010 03:58 PM, Pavan Savoy wrote:
>>
>> I have an LE enabled BT controller, and I happened to send across a
>> simple "leadv" from the recently updated hciconfig
>> I got back the following data
>> "4 e 5 1 a 20 c 3a" and hence
>> "Can't set advertise mode on hci0: Success (0)"
>> and 0xC I guess by the BT spec means the command is disallowed (for
>> reasons unknown?....)
>>
>> So I'm just wondering, am I supposed to run some HCI-VS commands to
>> enable LE? I mean I should ask my vendor I agree, but anyone who has
>> got it working.. do they run some VS commands before enabling LE
>> advertising?
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
>> in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] Removing role field from ORG tag
From: Johan Hedberg @ 2010-09-10 16:55 UTC (permalink / raw)
To: Rafal Michalski; +Cc: linux-bluetooth
In-Reply-To: <1284127974-8230-1-git-send-email-michalski.raf@gmail.com>
Hi Rafal,
On Fri, Sep 10, 2010, Rafal Michalski wrote:
> Previously role field was under ORG tag. Now it's single field under
> ROLE tag.
> ---
> plugins/phonebook-tracker.c | 2 +-
> plugins/vcard.c | 12 ++++++------
> plugins/vcard.h | 2 +-
> 3 files changed, 8 insertions(+), 8 deletions(-)
The patch has been pushed upstream. Thanks.
Johan
^ permalink raw reply
* Re: Possible regression with skb_clone() in 2.6.36
From: Mat Martineau @ 2010-09-10 16:53 UTC (permalink / raw)
To: Gustavo F. Padovan; +Cc: linux-bluetooth, netdev, linux-kernel, marcel, davem
In-Reply-To: <1283988727-1456-1-git-send-email-padovan@profusion.mobi>
Gustavo -
I'm not sure why the streaming code used to work, but this does not
look like an skb_clone() problem. Your patch to remove the
skb_clone() call in l2cap_streaming_send() addresses the root cause of
this crash.
On Wed, 8 Sep 2010, Gustavo F. Padovan wrote:
> I've been experiencing some problems when running the L2CAP Streaming mode in
> 2.6.36. The system quickly runs in an Out Of Memory condition and crash. That
> wasn't happening before, so I think we may have a regression here (I didn't
> find where yet). The crash log is below.
>
> The following patch does not fix the regression, but shows that removing the
> skb_clone() call from l2cap_streaming_send() we workaround the problem. The
> patch is good anyway because it saves memory and time.
>
> By now I have no idea on how to fix this.
>
> <snip>
This has to do with the sk->sk_wmem_alloc accounting that controls the
amount of write buffer space used on the socket.
When the L2CAP streaming mode socket segments its data, it allocates
memory using sock_alloc_send_skb() (via bt_skb_send_alloc()). Before
that allocation call returns, skb_set_owner_w() is called on the new
skb. This adds to sk->sk_wmem_alloc and sets skb->destructor so that
sk->sk_wmem_alloc is correctly updated when the skb is freed.
When that skb is cloned, the clone is not "owned" by the write buffer.
The clone's destructor is set to NULL in __skb_clone(). The version
of l2cap_streaming_send() that runs out of memory is passing the
non-owned skb clone down to the HCI layer. The original skb (the one
that's "owned by w") is immediately freed, which adjusts
sk->sk_wmem_alloc back down - the socket thinks it has unlimited write
buffer space. As a result, bt_skb_send_alloc() never blocks waiting
for buffer space (or returns EAGAIN for nonblocking writes) and the
HCI send queue keeps growing.
This isn't a problem for the ERTM sends, because the original skbs are
kept in the ERTM tx queue until they are acked. Once they're acked,
the write buffer space is freed and additional skbs can be allocated.
Regards,
--
Mat Martineau
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum
^ permalink raw reply
* Re: set LE advertise not working...
From: Pavan Savoy @ 2010-09-10 16:53 UTC (permalink / raw)
To: Anderson Briglia; +Cc: linux-bluetooth
In-Reply-To: <4C8A3537.2010606@openbossa.org>
Nope, I haven't applied the kernel patches...
But my kernel diff to the latest kernel is only regarding the "block"
and "unblock" to black list devices....
do I need some patches in kernel for enabling/disabling BLE too ?
I thought it just sends out the commands to controller...
On Fri, Sep 10, 2010 at 8:40 AM, Anderson Briglia
<anderson.briglia@openbossa.org> wrote:
> Hi Pavan,
>
> Try to make a hciconfig reset before setting leadv.
> Are you using that kernel patches I send before, right?
>
> Regards,
>
> Anderson Briglia
>
> On 09/09/2010 03:58 PM, Pavan Savoy wrote:
>>
>> I have an LE enabled BT controller, and I happened to send across a
>> simple "leadv" from the recently updated hciconfig
>> I got back the following data
>> "4 e 5 1 a 20 c 3a" and hence
>> "Can't set advertise mode on hci0: Success (0)"
>> and 0xC I guess by the BT spec means the command is disallowed (for
>> reasons unknown?....)
>>
>> So I'm just wondering, am I supposed to run some HCI-VS commands to
>> enable LE? I mean I should ask my vendor I agree, but anyone who has
>> got it working.. do they run some VS commands before enabling LE
>> advertising?
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
>> in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
>
^ permalink raw reply
* [PATCH v2 2/2] Bluetooth: Implement LE Set Scan Enable cmd
From: Anderson Briglia @ 2010-09-10 15:14 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Anderson Briglia
In-Reply-To: <1284131696-26117-1-git-send-email-anderson.briglia@openbossa.org>
This patch implements LE Set Scan Enable command for dual
mode and Low Energy hci controllers. It also adds new HCI flags
in order to indicate the LE Scanning state for userland applications
and kernel itself.
Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
---
include/net/bluetooth/hci.h | 5 +++++
net/bluetooth/hci_event.c | 27 +++++++++++++++++++++++++++
2 files changed, 32 insertions(+), 0 deletions(-)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index a28e92b..752c942 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -78,6 +78,7 @@ enum {
HCI_RAW,
HCI_LE_ADV,
+ HCI_LE_SCAN,
};
/* HCI ioctl defines */
@@ -600,6 +601,10 @@ struct hci_rp_read_bd_addr {
#define ADVERTISE_ENABLED 0x01
#define ADVERTISE_DISABLED 0x00
+#define HCI_OP_LE_SET_SCAN_ENABLE 0x200c
+ #define LE_SCAN_ENABLED 0x01
+ #define LE_SCAN_DISABLED 0x00
+
/* ---- HCI Events ---- */
#define HCI_EV_INQUIRY_COMPLETE 0x01
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index 51e2776..c4bfbdc 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -845,6 +845,29 @@ static void hci_cc_le_set_advertise(struct hci_dev *hdev, struct sk_buff *skb)
hci_req_complete(hdev, status);
}
+static void hci_cc_le_set_scan(struct hci_dev *hdev, struct sk_buff *skb)
+{
+ __u8 status = *((__u8 *) skb->data);
+ void *sent;
+
+ BT_DBG("%s status 0x%x", hdev->name, status);
+
+ sent = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_SCAN_ENABLE);
+ if (!sent)
+ return;
+
+ if (!status) {
+ __u8 param = *((__u8 *) sent);
+
+ if (param & LE_SCAN_ENABLED)
+ set_bit(HCI_LE_SCAN, &hdev->flags);
+ else
+ clear_bit(HCI_LE_SCAN, &hdev->flags);
+ }
+
+ hci_req_complete(hdev, status);
+}
+
static inline void hci_inquiry_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
{
__u8 status = *((__u8 *) skb->data);
@@ -1337,6 +1360,10 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk
hci_cc_le_set_advertise(hdev, skb);
break;
+ case HCI_OP_LE_SET_SCAN_ENABLE:
+ hci_cc_le_set_scan(hdev, skb);
+ break;
+
default:
BT_DBG("%s opcode 0x%x", hdev->name, opcode);
break;
--
1.7.0.4
^ permalink raw reply related
* [PATCH v2 1/2] Bluetooth: Implement LE Set Advertise Enable cmd
From: Anderson Briglia @ 2010-09-10 15:14 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Anderson Briglia
This patch implements LE Set Advertise Enable command for dual mode and
Low Energy hci controllers. It also adds new HCI flags in order to
indicate the Advertising state for userland applications and kernel
itself.
Signed-off-by: Anderson Briglia <anderson.briglia@openbossa.org>
---
include/net/bluetooth/hci.h | 7 +++++++
net/bluetooth/hci_event.c | 27 +++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index bcbdd6d..a28e92b 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -76,6 +76,8 @@ enum {
HCI_INQUIRY,
HCI_RAW,
+
+ HCI_LE_ADV,
};
/* HCI ioctl defines */
@@ -593,6 +595,11 @@ struct hci_rp_read_bd_addr {
bdaddr_t bdaddr;
} __packed;
+/* --- HCI LE Commands --- */
+#define HCI_OP_LE_SET_ADVERTISE_ENABLE 0x200a
+ #define ADVERTISE_ENABLED 0x01
+ #define ADVERTISE_DISABLED 0x00
+
/* ---- HCI Events ---- */
#define HCI_EV_INQUIRY_COMPLETE 0x01
diff --git a/net/bluetooth/hci_event.c b/net/bluetooth/hci_event.c
index bfef5ba..51e2776 100644
--- a/net/bluetooth/hci_event.c
+++ b/net/bluetooth/hci_event.c
@@ -822,6 +822,29 @@ static void hci_cs_exit_sniff_mode(struct hci_dev *hdev, __u8 status)
hci_dev_unlock(hdev);
}
+static void hci_cc_le_set_advertise(struct hci_dev *hdev, struct sk_buff *skb)
+{
+ __u8 status = *((__u8 *) skb->data);
+ void *sent;
+
+ BT_DBG("%s status 0x%x", hdev->name, status);
+
+ sent = hci_sent_cmd_data(hdev, HCI_OP_LE_SET_ADVERTISE_ENABLE);
+ if (!sent)
+ return;
+
+ if (!status) {
+ __u8 param = *((__u8 *) sent);
+
+ if (param & ADVERTISE_ENABLED)
+ set_bit(HCI_LE_ADV, &hdev->flags);
+ else
+ clear_bit(HCI_LE_ADV, &hdev->flags);
+ }
+
+ hci_req_complete(hdev, status);
+}
+
static inline void hci_inquiry_complete_evt(struct hci_dev *hdev, struct sk_buff *skb)
{
__u8 status = *((__u8 *) skb->data);
@@ -1310,6 +1333,10 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *sk
hci_cc_read_bd_addr(hdev, skb);
break;
+ case HCI_OP_LE_SET_ADVERTISE_ENABLE:
+ hci_cc_le_set_advertise(hdev, skb);
+ break;
+
default:
BT_DBG("%s opcode 0x%x", hdev->name, opcode);
break;
--
1.7.0.4
^ permalink raw reply related
* [PATCH] Removing role field from ORG tag
From: Rafal Michalski @ 2010-09-10 14:12 UTC (permalink / raw)
To: linux-bluetooth; +Cc: Rafal Michalski
Previously role field was under ORG tag. Now it's single field under
ROLE tag.
---
plugins/phonebook-tracker.c | 2 +-
plugins/vcard.c | 12 ++++++------
plugins/vcard.h | 2 +-
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/plugins/phonebook-tracker.c b/plugins/phonebook-tracker.c
index 41df840..43c2e28 100644
--- a/plugins/phonebook-tracker.c
+++ b/plugins/phonebook-tracker.c
@@ -863,7 +863,7 @@ add_entry:
contact->photo = g_strdup(reply[21]);
contact->company = g_strdup(reply[22]);
contact->department = g_strdup(reply[23]);
- contact->title = g_strdup(reply[24]);
+ contact->role = g_strdup(reply[24]);
contact->uid = g_strdup(reply[32]);
set_call_type(contact, reply[COL_DATE], reply[COL_SENT],
diff --git a/plugins/vcard.c b/plugins/vcard.c
index 4a77eb3..e277ced 100644
--- a/plugins/vcard.c
+++ b/plugins/vcard.c
@@ -357,9 +357,6 @@ static gboolean org_fields_present(struct phonebook_contact *contact)
if (contact->department && strlen(contact->department))
return TRUE;
- if (contact->title && strlen(contact->title))
- return TRUE;
-
return FALSE;
}
@@ -371,8 +368,8 @@ static void vcard_printf_org(GString *vcards,
return;
}
- vcard_printf(vcards, "ORG:%s;%s;%s", contact->company,
- contact->department, contact->title);
+ vcard_printf(vcards, "ORG:%s;%s", contact->company,
+ contact->department);
}
static void vcard_printf_address(GString *vcards, uint8_t format,
@@ -539,6 +536,9 @@ void phonebook_add_contact(GString *vcards, struct phonebook_contact *contact,
if (filter & FILTER_ORG)
vcard_printf_org(vcards, contact);
+ if (filter & FILTER_ROLE)
+ vcard_printf_tag(vcards, format, "ROLE", NULL, contact->role);
+
if (filter & FILTER_X_IRMC_CALL_DATETIME)
vcard_printf_datetime(vcards, contact);
@@ -596,7 +596,7 @@ void phonebook_contact_free(struct phonebook_contact *contact)
g_free(contact->photo);
g_free(contact->company);
g_free(contact->department);
- g_free(contact->title);
+ g_free(contact->role);
g_free(contact->datetime);
g_free(contact);
}
diff --git a/plugins/vcard.h b/plugins/vcard.h
index 4d134c2..0ed51b9 100644
--- a/plugins/vcard.h
+++ b/plugins/vcard.h
@@ -78,7 +78,7 @@ struct phonebook_contact {
char *photo;
char *company;
char *department;
- char *title;
+ char *role;
char *datetime;
int calltype;
};
--
1.6.3.3
^ permalink raw reply related
* Re: set LE advertise not working...
From: Anderson Briglia @ 2010-09-10 13:40 UTC (permalink / raw)
To: Pavan Savoy; +Cc: linux-bluetooth
In-Reply-To: <AANLkTikJFwwjs53_2F6NuBd-e00p1AnYahPMwYNgrveE@mail.gmail.com>
Hi Pavan,
Try to make a hciconfig reset before setting leadv.
Are you using that kernel patches I send before, right?
Regards,
Anderson Briglia
On 09/09/2010 03:58 PM, Pavan Savoy wrote:
> I have an LE enabled BT controller, and I happened to send across a
> simple "leadv" from the recently updated hciconfig
> I got back the following data
> "4 e 5 1 a 20 c 3a" and hence
> "Can't set advertise mode on hci0: Success (0)"
> and 0xC I guess by the BT spec means the command is disallowed (for
> reasons unknown?....)
>
> So I'm just wondering, am I supposed to run some HCI-VS commands to
> enable LE? I mean I should ask my vendor I agree, but anyone who has
> got it working.. do they run some VS commands before enabling LE
> advertising?
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply
* Re: Request for input regarding new driver in MFD for GPS_Bluetooth_FM controller CG2900
From: Alan Cox @ 2010-09-10 13:38 UTC (permalink / raw)
To: pghatwork
Cc: par-gunnar.p.hjalmdahl, linux-kernel, linux-bluetooth,
linus.walleij
In-Reply-To: <AANLkTikTBdr4U1bPtfXWhgLgdvWDMPJrFjBCktPL40dg@mail.gmail.com>
> - Is it OK to dynamically use the channels either from Kernel or User space?
Quite a few devices do this. In most cases it makes no sense to burden
the user with channel management so its only natural that opening the tty
or direct interfaces should "just work"
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox