public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [Bluez-devel] hci event bug for Nokia 7650
@ 2004-10-29 17:50 radoa
  2004-10-29 18:11 ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: radoa @ 2004-10-29 17:50 UTC (permalink / raw)
  To: bluez-devel

Hi,

I was trying create L2CAP socket and make connection to Nokia 7650 phone, 
but L2CAP always timeouted after about 40 seconds. I started debugging and I 
discovered that bluez kernel during establishing L2CAP connection drops event 
packet 0x1B (Max Slots Change) from 7650 phone, so then after timeout 7650 
phone send Disconnection Complete (0x05) event. I debugged this in function 
hci_event_packet(). Is this bug, or is it something wrong with phone stack, or 
is somethig wrong with stack, if bug, what should I send for rejecting command, 
or better how respond for command? I need establish connection using L2CAP 
sockets.
Thank you very mutch for every help

Best regards

radoa










-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bluez-devel] hci event bug for Nokia 7650
  2004-10-29 17:50 [Bluez-devel] hci event bug for Nokia 7650 radoa
@ 2004-10-29 18:11 ` Marcel Holtmann
  2004-10-29 18:47   ` [Bluez-devel] " radoa
  0 siblings, 1 reply; 4+ messages in thread
From: Marcel Holtmann @ 2004-10-29 18:11 UTC (permalink / raw)
  To: radoa; +Cc: BlueZ Mailing List

Hi Radoa,

> I was trying create L2CAP socket and make connection to Nokia 7650 phone, 
> but L2CAP always timeouted after about 40 seconds. I started debugging and I 
> discovered that bluez kernel during establishing L2CAP connection drops event 
> packet 0x1B (Max Slots Change) from 7650 phone, so then after timeout 7650 
> phone send Disconnection Complete (0x05) event. I debugged this in function 
> hci_event_packet(). Is this bug, or is it something wrong with phone stack, or 
> is somethig wrong with stack, if bug, what should I send for rejecting command, 
> or better how respond for command? I need establish connection using L2CAP 
> sockets.

about what Linux kernel version are we talking? What kind of L2CAP
socket do you try to open?

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bluez-devel] Re: hci event bug for Nokia 7650
  2004-10-29 18:11 ` Marcel Holtmann
@ 2004-10-29 18:47   ` radoa
  2004-10-29 19:03     ` Marcel Holtmann
  0 siblings, 1 reply; 4+ messages in thread
From: radoa @ 2004-10-29 18:47 UTC (permalink / raw)
  To: bluez-devel

Marcel Holtmann <marcel <at> holtmann.org> writes:

> 
> Hi Radoa,
> 
> > I was trying create L2CAP socket and make connection to Nokia 7650 phone, 
> > but L2CAP always timeouted after about 40 seconds. I started debugging and 
I 
> > discovered that bluez kernel during establishing L2CAP connection drops 
event 
> > packet 0x1B (Max Slots Change) from 7650 phone, so then after timeout 7650 
> > phone send Disconnection Complete (0x05) event. I debugged this in function 
> > hci_event_packet(). Is this bug, or is it something wrong with phone stack, 
or 
> > is somethig wrong with stack, if bug, what should I send for rejecting 
command, 
> > or better how respond for command? I need establish connection using L2CAP 
> > sockets.
> 
> about what Linux kernel version are we talking? What kind of L2CAP
> socket do you try to open?
> 
> Regards
> 
> Marcel
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Sybase ASE Linux Express Edition - download now for FREE
> LinuxWorld Reader's Choice Award Winner for best database on Linux.
> http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
> 

Kernel version is 2.6.9 with Bluetooth kernel patch 2.6.9-mh2.
Here is code (dst address is changed):

int test_connect() 
{
  struct sockaddr_l2 sa;
  int fd, ret;
  bdaddr_t *dst = {{0, 1, 2, 3, 4, 5}};

  // success
  fd = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);

  sa.l2_family = AF_BLUETOOTH;
  sa.l2_psm = htobs(SDP_PSM);               // 0x0001
  sa.l2_bdaddr = *dst; 

  // this will fail
  ret = connect(fd, (struct sockaddr *)&sa, sizeof(sa));

  return ret;
}

best regards

radoa





-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Bluez-devel] Re: hci event bug for Nokia 7650
  2004-10-29 18:47   ` [Bluez-devel] " radoa
@ 2004-10-29 19:03     ` Marcel Holtmann
  0 siblings, 0 replies; 4+ messages in thread
From: Marcel Holtmann @ 2004-10-29 19:03 UTC (permalink / raw)
  To: radoa; +Cc: BlueZ Mailing List

Hi Radoa,

> Kernel version is 2.6.9 with Bluetooth kernel patch 2.6.9-mh2.
> Here is code (dst address is changed):
> 
> int test_connect() 
> {
>   struct sockaddr_l2 sa;
>   int fd, ret;
>   bdaddr_t *dst = {{0, 1, 2, 3, 4, 5}};
> 
>   // success
>   fd = socket(PF_BLUETOOTH, SOCK_SEQPACKET, BTPROTO_L2CAP);
> 
>   sa.l2_family = AF_BLUETOOTH;
>   sa.l2_psm = htobs(SDP_PSM);               // 0x0001
>   sa.l2_bdaddr = *dst; 
> 
>   // this will fail
>   ret = connect(fd, (struct sockaddr *)&sa, sizeof(sa));
> 
>   return ret;
> }

actually I don't understand how that should ever work. Do you looked at
the example code? We don't do these nasty BD_ADDR tricks. You should
better use this one:

	str2ba("aa:bb:cc:dd:ee:ff", &sa.l2_bdaddr);

Regards

Marcel




-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_id=5588&alloc_id=12065&op=click
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-10-29 19:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-29 17:50 [Bluez-devel] hci event bug for Nokia 7650 radoa
2004-10-29 18:11 ` Marcel Holtmann
2004-10-29 18:47   ` [Bluez-devel] " radoa
2004-10-29 19:03     ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox