Skip to contentSkip to conversation

Problem with l2test, rctest

Bluez-devel Andrea Carlevato 2 participants 9 messages Sep 15, 2005 – Sep 16, 2005 1 message not in the archive Bluetooth drivers

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi to all,
trying these test program betweem 2 pc of mine i get alway this error on the client side:

Quoted 1 line

./rctest -s 00:10:60:29:XX:XX

rctest[1672]: Can't connect: Function not implemented (38)

what does it means ?

this is my hciconfig:

hci0: Type: USB
BD Address: 00:10:60:A6:XX:XX ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN ISCAN
RX bytes:7991 acl:85 sco:0 events:551 errors:0
TX bytes:3267 acl:69 sco:0 commands:177 errors:0

and this is my lsmod output:

hci_usb 8712 2
af_packet 11464 0
ixp425_eth 15236 0
ixp400 615208 1 ixp425_eth
rfcomm 24572 3
l2cap 14724 9 bnep,rfcomm
bluetooth 30752 8 bnep,hci_usb,rfcomm,l2cap
ipv6 187296 12
ext3 96744 1
jbd 36536 1 ext3
mbcache 5060 1 ext3

Andrea

maintainer
#2 lore raw

Hi Andrea,

Quoted 5 lines

trying these test program betweem 2 pc of mine i get alway this error on the client side:

Quoted 1 line

./rctest -s 00:10:60:29:XX:XX

rctest[1672]: Can't connect: Function not implemented (38)

run "hcidump -X -V".

Regards

Marcel

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#3 lore raw

Hi,
the client is on arm-based embedded linux box, and when i try to compile hcidump i get these errors:

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -Wall -O2 -c test -f ' parser.c' || echo './'parser.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -Wall -O2 -c test -f 'lmp.c' || echo './'lmp.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -Wall -O2 -c test -f 'hci.c' || echo './'hci.c
hci.c: In function `write_ext_inquiry_response_dump':
hci.c:854: error: `write_ext_inquiry_response_cp' undeclared (first use in this function)
hci.c:854: error: (Each undeclared identifier is reported only once hci.c:854: error: for each function it appears in.)
hci.c:854: error: cp' undeclared (first use in this function) hci.c: In function command_dump':
hci.c:1064: error: `OCF_WRITE_EXT_INQUIRY_RESPONSE' undeclared (first use in this function)
hci.c: In function `read_ext_inquiry_response_dump':
hci.c:1379: error: `read_ext_inquiry_response_rp' undeclared (first use in this function)
hci.c:1379: error: rp' undeclared (first use in this function) hci.c: In function cmd_complete_dump':
hci.c:1667: error: `OCF_READ_EXT_INQUIRY_RESPONSE' undeclared (first use in this function)
hci.c:1694: error: `OCF_WRITE_EXT_INQUIRY_RESPONSE' undeclared (first use in this function)
hci.c: In function `extended_inq_result_dump':
hci.c:2229: error: `extended_inquiry_info' undeclared (first use in this function)
hci.c:2229: error: info' undeclared (first use in this function) hci.c:2238: error: EXTENDED_INQUIRY_INFO_SIZE' undeclared (first use in this function)
hci.c: In function `event_dump':
hci.c:2393: error: `EVT_EXTENDED_INQUIRY_RESULT' undeclared (first use in this function)
make[1]: *** [hci.o] Error 1
make[1]: Leaving directory `/root/bluez-hcidump-1.25/parser'
make: *** [install-recursive] Error 1

do you know what i miss ?

Quoted 28 lines · Marcel Holtmann

Hi Andrea,

Quoted 5 lines

trying these test program betweem 2 pc of mine i get alway this error on the client side:

Quoted 1 line

./rctest -s 00:10:60:29:XX:XX

rctest[1672]: Can't connect: Function not implemented (38)

run "hcidump -X -V".

Regards

Marcel

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

maintainer
#4 lore raw

Hi Andrea,

Quoted 43 lines

the client is on arm-based embedded linux box, and when i try to compile hcidump i get these errors:

gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -Wall -O2 -c `test
-f 'parser.c' || echo './'`parser.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -Wall -O2 -c `test
-f 'lmp.c' || echo './'`lmp.c
gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include -Wall -O2 -c `test
-f 'hci.c' || echo './'`hci.c
hci.c: In function `write_ext_inquiry_response_dump':
hci.c:854: error: `write_ext_inquiry_response_cp' undeclared (first use in this function)
hci.c:854: error: (Each undeclared identifier is reported only once hci.c:854: error: for each function it appears in.) hci.c:854: error: cp' undeclared (first use in this function) hci.c: In function command_dump':
hci.c:1064: error: `OCF_WRITE_EXT_INQUIRY_RESPONSE' undeclared (first use in this function)
hci.c: In function `read_ext_inquiry_response_dump':
hci.c:1379: error: `read_ext_inquiry_response_rp' undeclared (first use in this function)
hci.c:1379: error: rp' undeclared (first use in this function) hci.c: In function cmd_complete_dump':
hci.c:1667: error: `OCF_READ_EXT_INQUIRY_RESPONSE' undeclared (first use in this function)
hci.c:1694: error: `OCF_WRITE_EXT_INQUIRY_RESPONSE' undeclared (first use in this function)
hci.c: In function `extended_inq_result_dump':
hci.c:2229: error: `extended_inquiry_info' undeclared (first use in this function)
hci.c:2229: error: info' undeclared (first use in this function) hci.c:2238: error: EXTENDED_INQUIRY_INFO_SIZE' undeclared (first use in this function)
hci.c: In function `event_dump':
hci.c:2393: error: `EVT_EXTENDED_INQUIRY_RESULT' undeclared (first use in this function)
make[1]: *** [hci.o] Error 1
make[1]: Leaving directory `/root/bluez-hcidump-1.25/parser'
make: *** [install-recursive] Error 1

Quoted 1 line

do you know what i miss ?

read the ChangeLog file.

Regards

Marcel

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#5 lore raw

Hi Marcel, i compiled correctly hcidump.

So, when from my client i call i get:
./l2test -n 00:10:60:29:3B:9A
l2test[1349]: Can't connect: Function not implemented (38)

and the dump is:

HCI sniffer - Bluetooth packet analyzer ver 1.23
device: hci0 snap_len: 1028 filter: 0xffffffff
< HCI Command: Create Connection (0x01|0x0005) plen 13 bdaddr 00:10:60:29:3B:9A ptype 0xcc18 rswitch 0x00 clkoffset 0x0000 Packet type: DM1 DM3 DM5 DH1 DH3 DH5

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

Create Connection (0x01|0x0005) status 0x00 ncmd 1

Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

status 0x21 handle 41 bdaddr 00:10:60:29:3B:9A type ACL encrypt 0x00
Error: Role Change Not Allowed

On my server-side, i call:

Quoted 2 lines

./l2test
l2test[3280]: Waiting for connection on psm 10 ...

and nothing happens.

The dump of the server is:

Quoted 1 line

HCI Event: Connect Request (0x04) plen 10

bdaddr 00:10:60:A5:81:68 class 0x820100 type ACL
< HCI Command: Accept Connection Request (0x01|0x0009) plen 7 bdaddr 00:10:60:A5:81:68 role 0x00
Role: Master

Quoted 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 0x21 handle 40 bdaddr 00:10:60:A5:81:68 type ACL encrypt 0x00
Error: Role Change Not Allowed

some ideas ?

maintainer
#6 lore raw

Hi Andrea,

Quoted 10 lines

So, when from my client i call i get:
./l2test -n 00:10:60:29:3B:9A
l2test[1349]: Can't connect: Function not implemented (38)

and the dump is:

HCI sniffer - Bluetooth packet analyzer ver 1.23
device: hci0 snap_len: 1028 filter: 0xffffffff < HCI Command: Create Connection (0x01|0x0005) plen 13

    bdaddr 00:10:60:29:3B:9A ptype 0xcc18 rswitch 0x00 clkoffset
Quoted 8 lines

0x0000
Packet type: DM1 DM3 DM5 DH1 DH3 DH5

Quoted 1 line

HCI Event: Command Status (0x0f) plen 4

    Create Connection (0x01|0x0005) status 0x00 ncmd 1
Quoted 1 line

HCI Event: Connect Complete (0x03) plen 11

    status 0x21 handle 41 bdaddr 00:10:60:29:3B:9A type ACL encrypt

0x00
Error: Role Change Not Allowed

so we have to fix this problem. Show me the output of "hciconfig -a" from both sides.

Regards

Marcel

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel

#7 lore raw

Ok,
hciconfig - of my client is:

hci0: Type: USB
BD Address: 00:10:60:A5:81:68 ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN ISCAN
RX bytes:254 acl:0 sco:0 events:28 errors:0
TX bytes:379 acl:0 sco:0 commands:20 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: ACCEPT MASTER
Name: 'EnviCartello'
Class: 0x820100
Service Classes: Networking
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x20d LMP Ver: 1.1 (0x1) LMP Subver: 0x20d
Manufacturer: Cambridge Silicon Radio (10)

And the hciconfig of my server is :

hci0: Type: USB
BD Address: 00:10:60:29:3B:9A ACL MTU: 192:8 SCO MTU: 64:8 UP RUNNING PSCAN ISCAN
RX bytes:241 acl:0 sco:0 events:28 errors:0
TX bytes:373 acl:0 sco:0 commands:20 errors:0
Features: 0xff 0xff 0x0f 0x00 0x00 0x00 0x00 0x00
Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
Link policy: RSWITCH HOLD SNIFF PARK
Link mode: ACCEPT MASTER
Name: 'PROMOPC'
Class: 0x820100
Service Classes: Networking
Device Class: Computer, Uncategorized
HCI Ver: 1.1 (0x1) HCI Rev: 0x175 LMP Ver: 1.1 (0x1) LMP Subver: 0x175
Manufacturer: Cambridge Silicon Radio (10)

maintainer
#9 lore raw

Hi Andrea,

Quoted 3 lines

i think i ve solved the problem
i ve set "hciconfig hciconfig hci0 lm ACCEPT" on my server side and the connection seems to go fine

this is what I expected, because it is not possible that both sides are the master and thus the role switch fails. Don't change default values when you don't know what they mean ;)

Regards

Marcel

-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel