|
Re: Re: hci event bug for Nokia 7650: msg#00118linux.bluez.devel
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 |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: hci event bug for Nokia 7650: 00118, radoa |
|---|---|
| Next by Date: | RE: Service level security for RFCOMM: 00118, Marcel Holtmann |
| Previous by Thread: | Re: hci event bug for Nokia 7650i: 00118, radoa |
| Next by Thread: | RFCOMM service level security testing: 00118, Marcel Holtmann |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |