help needed with rfcomm
hello ppl,=20
i tried to post these doubts under the bluez-users mailing list, but i did'nt have any response, and since it has a programing doubt, i'll try to explain my problem.
i want to buil an aplication that listen on rfcomm bluetooth sockets and the same aplication receives information thru that socket. i kinda have a squeleton of the program as folows:
// cria o socket
if( (sock =3D socket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM))
< 0){
perror("socket");
return(-1);
}
// op=E7=F5es do socket
addr.rc_family =3D AF_BLUETOOTH;
str2ba(argv[1],&addr.rc_bdaddr);
addr.rc_channel =3D htobs(CHANNEL);
alen =3D sizeof(addr);
//regista o socket no SO
if(bind(sock, (struct sockaddr *)&addr, alen) < 0){
perror("bind");
return(-1);
}
//poe o socket =E0 escuta
listen(sock,QUEUE);
printf("Waiting for connections...\n\n");
while (1){
while((client =3D accept(sock, (struct sockaddr *)&addr,
&alen)) !=3D -1){
printf("Got a connection attempt!\n");
memset(buffer, 0, TAM_BUFFER);
if ( (r =3D read(client, buffer, TAM_BUFFER)) < 0
){
perror("Read no server");
}but i can't get the connections to this computer to work. a i don't know wh= y.
another problem that i had was that the SPP profile has not advertized, and i solved that problem by performing a "sdptool add SP".
anyway, with or without my program, i can't get the computer to accept the connection attemps from other computers. these connections are made using rfcomm on channel 1, and i can't change that.
my kernel was all the bluez stuff compiled in, not as modules.=20
any sugestions will be apreciated
so any ideia on how to solve this problem. I lacking time to accomplish this program so i would really aprecciate all the hep that you can give me..
thank you all very much
--=20
Rui Silva
Powered by Gentoo Linux under :
CELERON 1000 - Stage1 install with nptl
Pentium M 1800GHz - Stage1 install with NPTL
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
I also notice now, that I don't have any /dev/rfcomm* or /dev/bluetooth/rfcomm* devices under /dev. I'm using udev as a device manager. anyone?? please
Quoted 45 lines · Rui Silva
hello ppl,
=20
i tried to post these doubts under the bluez-users mailing list, but i did'nt have any response, and since it has a programing doubt, i'll try to explain my problem.
=20
i want to buil an aplication that listen on rfcomm bluetooth sockets and the same aplication receives information thru that socket. i kinda have a squeleton of the program as folows:
=20
=20
// cria o socket
if( (sock =3Dsocket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM))< 0){ perror("socket"); return(-1); } =20 // op=E7=F5es do socket addr.rc_family =3D AF_BLUETOOTH; str2ba(argv[1],&addr.rc_bdaddr); addr.rc_channel =3D htobs(CHANNEL); alen =3D sizeof(addr); =20 //regista o socket no SO if(bind(sock, (struct sockaddr *)&addr, alen) < 0){ perror("bind"); return(-1); } //poe o socket =E0 escuta listen(sock,QUEUE); =20 printf("Waiting for connections...\n\n"); =20 while (1){ while((client =3D accept(sock, (struct sockaddr *)&addr, &alen)) !=3D -1){ printf("Got a connection attempt!\n"); =20 memset(buffer, 0, TAM_BUFFER); =20 if ( (r =3D read(client, buffer, TAM_BUFFER)) < 0 ){ perror("Read no server"); }
Quoted 2 lines
=20
but i can't get the connections to this computer to work. a i don't know =
why.
Quoted 18 lines
=20
another problem that i had was that the SPP profile has not advertized, and i solved that problem by performing a "sdptool add SP".
=20
anyway, with or without my program, i can't get the computer to accept the connection attemps from other computers. these connections are made using rfcomm on channel 1, and i can't change that.
my kernel was all the bluez stuff compiled in, not as modules. =20
any sugestions will be apreciated
=20
so any ideia on how to solve this problem. I lacking time to accomplish this program so i would really aprecciate all the hep that you can give me..
=20
thank you all very much
=20
Quoted 8 lines
--
Rui Silva
Powered by Gentoo Linux under :
CELERON 1000 - Stage1 install with nptl
Pentium M 1800GHz - Stage1 install with NPTL
=20
http://rukinhas.no-ip.org
=20
--=20
Rui Silva
Powered by Gentoo Linux under :
CELERON 1000 - Stage1 install with nptl
Pentium M 1800GHz - Stage1 install with NPTL
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Rui,
Quoted 3 lines
I also notice now, that I don't have any
/dev/rfcomm*or/dev/bluetooth/rfcomm*devices under /dev. I'm using udev as a device manager. anyone?? please
the rfcommX devices are optional. They must be created with a special ioctl() after you established the connection. However most applications don't need a TTY. They work perfect through a socket.
Regards
Marcel
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Rui,
Quoted 11 lines
i tried to post these doubts under the bluez-users mailing list, but i did'nt have any response, and since it has a programing doubt, i'll try to explain my problem.
=20
i want to buil an aplication that listen on rfcomm bluetooth sockets and the same aplication receives information thru that socket. i kinda have a squeleton of the program as folows:
=20
=20
// cria o socket
if( (sock =3Dsocket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)=
)
Quoted 9 lines
< 0){
perror("socket");
return(-1);
}
=20
// op=E7=F5es do socket
addr.rc_family =3D AF_BLUETOOTH;
str2ba(argv[1],&addr.rc_bdaddr);
addr.rc_channel =3D htobs(CHANNEL);the htobs() is wrong here. The channel is uint8 value and thus a endian change is not needed.
Quoted 11 lines
alen =3D sizeof(addr);
=20
//regista o socket no SO
if(bind(sock, (struct sockaddr *)&addr, alen) < 0){
perror("bind");
return(-1);
}
//poe o socket =E0 escuta
listen(sock,QUEUE);
=20
printf("Waiting for connections...\n\n");Quoted 3 lines
=20
while (1){
while((client =3D accept(sock, (struct sockaddr *)&addr=
,
Quoted 6 lines
&alen)) !=3D -1){ printf("Got a connection attempt!\n"); =20 memset(buffer, 0, TAM_BUFFER);=20
if ( (r =3Dread(client, buffer, TAM_BUFFER)) <=
0
Quoted 5 lines
){ perror("Read no server"); }=20
but i can't get the connections to this computer to work. a i don't kno=
w why.
Quoted 7 lines
=20
another problem that i had was that the SPP profile has not advertized, and i solved that problem by performing a "sdptool add SP".
=20
anyway, with or without my program, i can't get the computer to accept the connection attemps from other computers. these connections are
Quoted 8 lines
made using rfcomm on channel 1, and i can't change that. my kernel was all the bluez stuff compiled in, not as modules.=20 =20
any sugestions will be apreciated
=20
so any ideia on how to solve this problem. I lacking time to accomplish this program so i would really aprecciate all the hep that you can give me..
Run "hcidump -X -V" to see what happens. Run "sdptool browse local" to see what channel is advertised for your serial port service.
Regards
Marcel
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Quoted 13 lines · Marcel Holtmann
Hi Rui,
=20Quoted 11 lines
i tried to post these doubts under the bluez-users mailing list, but i did'nt have any response, and since it has a programing doubt, i'll try to explain my problem.
i want to buil an aplication that listen on rfcomm bluetooth sockets and the same aplication receives information thru that socket. i kinda have a squeleton of the program as folows:
// cria o socket
if( (sock =3Dsocket(PF_BLUETOOTH, SOCK_STREAM, BTPROTO_RFCOMM)=
)
Quoted 5 lines
Quoted 5 lines
< 0){ perror("socket"); return(-1); }
Quoted 22 lines
Quoted 4 lines
// op=E7=F5es do socket addr.rc_family =3D AF_BLUETOOTH; str2ba(argv[1],&addr.rc_bdaddr); addr.rc_channel =3D htobs(CHANNEL);=20
thehtobs()is wrong here. The channel is uint8 value and thus a endian change is not needed.
=20Quoted 14 lines
alen =3D sizeof(addr); //regista o socket no SO if(bind(sock, (struct sockaddr *)&addr, alen) < 0){ perror("bind"); return(-1); } //poe o socket =E0 escuta listen(sock,QUEUE); printf("Waiting for connections...\n\n"); while (1){ while((client =3D accept(sock, (struct sockaddr *)&addr=
,
Quoted 6 lines
Quoted 6 lines
&alen)) !=3D -1){ printf("Got a connection attempt!\n"); memset(buffer, 0, TAM_BUFFER); if ( (r =3D read(client, buffer, TAM_BUFFER)) <=
0
Quoted 5 lines
Quoted 5 lines
){ perror("Read no server"); }but i can't get the connections to this computer to work. a i don't kno=
w why.
Quoted 15 lines
Quoted 10 lines
another problem that i had was that the SPP profile has not advertized, and i solved that problem by performing a "sdptool add SP".
anyway, with or without my program, i can't get the computer to accept the connection attemps from other computers. these connections are made using rfcomm on channel 1, and i can't change that.
my kernel was all the bluez stuff compiled in, not as modules.Quoted 5 lines
any sugestions will be apreciated
so any ideia on how to solve this problem. I lacking time to accomplish this program so i would really aprecciate all the hep that you can give me..
Quoted 7 lines
=20
Run "hcidump -X -V" to see what happens. Run "sdptool browse local" to see what channel is advertised for your serial port service. =20
Regards
=20
Marcel
i tried your changes but it didn't help. i thank anyway for your help i solved my problem at least for now. I've changed SOCK_STREAM to SOCK_RAW and the connections were accepted.
--=20
Rui Silva
Powered by Gentoo Linux under :
CELERON 1000 - Stage1 install with nptl
Pentium M 1800GHz - Stage1 install with NPTL
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Rui,
Quoted 3 lines
i tried your changes but it didn't help. i thank anyway for your help i solved my problem at least for now. I've changed
SOCK_STREAMtoSOCK_RAWand the connections were accepted.
this is wrong and if this works it is a bug inside the kernel. Why don't you run "hcidump -X -V" as I told you?
Regards
Marcel
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
this is the output with SOCK_RAW of hcidump
Quoted 1 line
HCI Event: Connect Request (
0x04) plen 10
bdaddr 00:80:5A:20:1B:E9 class 0x3e0100 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 00:80:5A:20:1B:E9 role 0x01
Role: SlaveQuoted 1 line
HCI Event: Command Status (
0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
Quoted 1 line
HCI Event: Connect Complete (
0x03) plen 11
status 0x00 handle 41 bdaddr 00:80:5A:20:1B:E9 type ACL encrypt 0x00
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 41 policy 0x0f
Link policy: RSWITCH HOLD SNIFF PARK
Quoted 1 line
HCI Event: Page Scan Repetition Mode Change (
0x20) plen 7
bdaddr 00:80:5A:20:1B:E9 mode 1
Quoted 1 line
HCI Event: Command Complete (
0x0e) plen 6
Write Link Policy Settings (0x02|0x000d) ncmd 1
status 0x00 handle 41< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
handle 41 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
Quoted 1 line
HCI Event: Max Slots Change (
0x1b) plen 3
handle 41 slots 5
Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4
Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 1
Quoted 1 line
HCI Event: Connection Packet Type Changed (
0x1d) plen 5
status 0x00 handle 41 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 12
L2CAP(s): Connect req: psm 3 scid 0x0040
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successfulQuoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 1024
< ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 1024Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
SuccessQuoted 1 line
ACL data: handle 41 flags
0x02dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
< ACL data: handle 41 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8 dlci 2 frame_type 0 credit_flow 15 pri 7 ack_timer 0 frame_size 1019 max_retrans 0 credits 7
< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8 dlci 2 frame_type 0 credit_flow 14 pri 7 ack_timer 0 frame_size 1019 max_retrans 0 credits 7
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 2 pf 1 ilen 0 fcs 0x59
< ACL data: handle 41 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 2 pf 1 ilen 0 fcs 0x92
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(d): cid 0x0040 len 8 [psm 3]
RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 12
L2CAP(d): cid 0x0040 len 8 [psm 3]
RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(d): cid 0x0040 len 8 [psm 3]
RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0Quoted 1 line
ACL data: handle 41 flags
0x02dlen 12
L2CAP(d): cid 0x0040 len 8 [psm 3]
RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 41 flags 0x02 dlen 9
L2CAP(d): cid 0x0040 len 5 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 2 pf 1 ilen 0 fcs 0x5c credits 33Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 9
L2CAP(d): cid 0x0040 len 5 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 2 pf 1 ilen 0 fcs 0x86 credits 33this is the output wiht SOCK_STREAM
Quoted 1 line
HCI Event: Connect Request (
0x04) plen 10
bdaddr 00:80:5A:20:1B:E9 class 0x3e0100 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7
bdaddr 00:80:5A:20:1B:E9 role 0x01
Role: SlaveQuoted 1 line
HCI Event: Command Status (
0x0f) plen 4
Accept Connection Request (0x01|0x0009) status 0x00 ncmd 1
Quoted 1 line
HCI Event: Connect Complete (
0x03) plen 11
status 0x00 handle 41 bdaddr 00:80:5A:20:1B:E9 type ACL encrypt 0x00
< HCI Command: Write Link Policy Settings (0x02|0x000d) plen 4
handle 41 policy 0x0f
Link policy: RSWITCH HOLD SNIFF PARK
Quoted 1 line
HCI Event: Page Scan Repetition Mode Change (
0x20) plen 7
bdaddr 00:80:5A:20:1B:E9 mode 1
Quoted 1 line
HCI Event: Command Complete (
0x0e) plen 6
Write Link Policy Settings (0x02|0x000d) ncmd 1
status 0x00 handle 41< HCI Command: Change Connection Packet Type (0x01|0x000f) plen 4
handle 41 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
Quoted 1 line
HCI Event: Max Slots Change (
0x1b) plen 3
handle 41 slots 5
Quoted 1 line
HCI Event: Command Status (
0x0f) plen 4
Change Connection Packet Type (0x01|0x000f) status 0x00 ncmd 1
Quoted 1 line
HCI Event: Connection Packet Type Changed (
0x1d) plen 5
status 0x00 handle 41 ptype 0xcc18
Packet type: DM1 DM3 DM5 DH1 DH3 DH5
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 12
L2CAP(s): Connect req: psm 3 scid 0x0040
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Connect rsp: dcid 0x0040 scid 0x0040 result 0 status 0
Connection successfulQuoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 1024
< ACL data: handle 41 flags 0x02 dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
Success
< ACL data: handle 41 flags 0x02 dlen 16
L2CAP(s): Config req: dcid 0x0040 flags 0x00 clen 4
MTU 1024Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 14
L2CAP(s): Config rsp: scid 0x0040 flags 0x00 result 0 clen 0
SuccessQuoted 1 line
ACL data: handle 41 flags
0x02dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 0 pf 1 ilen 0 fcs 0x1c
< ACL data: handle 41 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 0 pf 1 ilen 0 fcs 0xd7Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(s): PN CMD: cr 1 dlci 0 pf 0 ilen 10 fcs 0x70 mcc_len 8 dlci 2 frame_type 0 credit_flow 15 pri 7 ack_timer 0 frame_size 1019 max_retrans 0 credits 7
< ACL data: handle 41 flags 0x02 dlen 18
L2CAP(d): cid 0x0040 len 14 [psm 3]
RFCOMM(s): PN RSP: cr 0 dlci 0 pf 0 ilen 10 fcs 0xaa mcc_len 8 dlci 2 frame_type 0 credit_flow 14 pri 7 ack_timer 0 frame_size 1019 max_retrans 0 credits 7
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): SABM: cr 1 dlci 2 pf 1 ilen 0 fcs 0x59
< ACL data: handle 41 flags 0x02 dlen 8
L2CAP(d): cid 0x0040 len 4 [psm 3]
RFCOMM(s): UA: cr 1 dlci 2 pf 1 ilen 0 fcs 0x92
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(d): cid 0x0040 len 8 [psm 3]
RFCOMM(s): MSC CMD: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 12
L2CAP(d): cid 0x0040 len 8 [psm 3]
RFCOMM(s): MSC CMD: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 41 flags 0x02 dlen 12
L2CAP(d): cid 0x0040 len 8 [psm 3]
RFCOMM(s): MSC RSP: cr 0 dlci 0 pf 0 ilen 4 fcs 0xaa mcc_len 2
dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0Quoted 1 line
ACL data: handle 41 flags
0x02dlen 12
L2CAP(d): cid 0x0040 len 8 [psm 3]
RFCOMM(s): MSC RSP: cr 1 dlci 0 pf 0 ilen 4 fcs 0x70 mcc_len 2
dlci 2 fc 0 rtc 1 rtr 1 ic 0 dv 1 b1 1 b2 1 b3 0 len 0
< ACL data: handle 41 flags 0x02 dlen 9
L2CAP(d): cid 0x0040 len 5 [psm 3]
RFCOMM(d): UIH: cr 0 dlci 2 pf 1 ilen 0 fcs 0x5c credits 33Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
HCI Event: Number of Completed Packets (
0x13) plen 5
handle 41
Quoted 1 line
ACL data: handle 41 flags
0x02dlen 9
L2CAP(d): cid 0x0040 len 5 [psm 3]
RFCOMM(d): UIH: cr 1 dlci 2 pf 1 ilen 0 fcs 0x86 credits 33now it works with SOCK_STREAM, and i havent changed anythig to the program. i realy don't understand how this could be. I'm using kernel 2.6.12-CK and the bluez libs version 2.19?
Quoted 5 lines · Marcel Holtmann
Hi Rui,
=20Quoted 3 lines
i tried your changes but it didn't help. i thank anyway for your help i solved my problem at least for now. I've changed
SOCK_STREAMtoSOCK_RAWand the connections were accepted.
Quoted 14 lines
=20
this is wrong and if this works it is a bug inside the kernel. Why don't you run "hcidump -X -V" as I told you?
=20
Regards
=20
Marcel
=20
=20
=20
=20
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practic=
es
Quoted 1 line
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & Q=
A
Quoted 6 lines
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
=20
--=20
Rui Silva
Powered by Gentoo Linux under :
CELERON 1000 - Stage1 install with nptl
Pentium M 1800GHz - Stage1 install with NPTL
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
is there as way to set a timetout to a socket??=20
what i mean is, if the socket does not read anything for certain time, the = read=20
operation would unlock and the execution of the program continues. is there a way to
accomplish this??
--=20
Rui Silva
Powered by Gentoo Linux under :
CELERON 1000 - Stage1 install with nptl
Pentium M 1800GHz - Stage1 install with NPTL
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
use select() or poll()
See here for an introduction:=20
http://www.ecst.csuchico.edu/~beej/guide/net/html/
-albert
Quoted 2 lines · Rui Silva
is there as way to set a timetout to a socket??
what i mean is, if the socket does not read anything for certain time, th=
e read
Quoted 8 lines
operation would unlock and the execution of the program continues. is there a way to
accomplish this??
=20
--
Rui Silva
Powered by Gentoo Linux under :
CELERON 1000 - Stage1 install with nptl
Quoted 8 lines
Pentium M 1800GHz - Stage1 install with NPTL
=20
http://rukinhas.no-ip.org
=20
=20
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practic=
es
Quoted 1 line
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & Q=
A
Quoted 6 lines
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel
Marcel Holtmann
maintainerHi Rui,
Quoted 3 lines
now it works with
SOCK_STREAM, and i havent changed anythig to the program. i realy don't understand how this could be. I'm using kernel 2.6.12-CK and the bluez libs version 2.19?
this is how it should be. I fixed the kernel code to prevent creating connections with the SOCK_RAW interface.
Regards
Marcel
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel