LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 06-22-2009, 01:55 AM   #1
kewl
LQ Newbie
 
Registered: Feb 2009
Posts: 29

Rep: Reputation: 15
Bluez + hcitool not able to scan


Hi,
I have put bluez 2.25 on my device. Since I was not successful in compiling Bluez 3.36 I have considered the older version.
I am able to pair with the device from computer but to be able to communicate through serial port profile I need to scan and ping the computer which i am not able to do.
well, i have attached few stuffs which i tried

Ps: sdpd doesnt seem to work.
should i create a node for the bluetooth device? or is it that the hcid.conf file in which anything is missing?


Code:
mx21# hciconfig -a
hci0:   Type: USB
        BD Address: 11:11:11:11:11:11 ACL MTU: 678:8 SCO MTU: 48:10
        UP RUNNING PSCAN ISCAN
        RX bytes:63 acl:0 sco:0 events:7 errors:0
        TX bytes:27 acl:0 sco:0 commands:7 errors:0
        Features: 0xbf 0xfe 0x8d 0x78 0x08 0x18 0x00 0x00
        Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
        Link policy:
        Link mode: SLAVE ACCEPT
        Name: 'ISSCBTA'
        Class: 0x000000
        Service Classes: Unspecified
        Device Class: Miscellaneous,
        HCI Ver: 1.2 (0x2) HCI Rev: 0x1fe LMP Ver: 1.2 (0x2) LMP Subver: 0x1fe
        Manufacturer: Integrated System Solution Corp. (57)

mx21# sdptool search sp
Inquiring ...
Failed to connect to SDP server on 00:21:FC:FE:86:63: No such file or directory
mx21# hcitool scan
Scanning ...
mx21# l2ping 00:21:FC:FE:86:63
Can't create socket: No such file or directory



mx21# cat /etc/bluetooth/hcid.conf
#
# HCI daemon configuration file.
#

# HCId options
options {
	# Automatically initialize new devices
	autoinit yes;

	# Security Manager mode
	#   none - Security manager disabled
	#   auto - Use local PIN for incoming connections
	#   user - Always ask user for a PIN
	#
	security auto;

	# Pairing mode
	#   none  - Pairing disabled
	#   multi - Allow pairing with already paired devices
	#   once  - Pair once and deny successive attempts
	pairing multi;

	# PIN helper
	# pin_helper /usr/bin/bluepin;
	pin_helper /usr/bluetooth/pin; 

	# D-Bus PIN helper
	#dbus_pin_helper;

	passkey "0000";
}

# Default settings for HCI devices
device {
	# Local device name
	#   %d - device id
	#   %h - host name
	name "IDA-5 (%d)";

	# Local device class
	class 0x3e0100;

	# Default packet type
	#pkt_type DH1,DM1,HV1;

	# Inquiry and Page scan
	iscan enable; pscan enable;

	# Default link mode
	#   none   - no specific policy 
	#   accept - always accept incoming connections
	#   master - become master on incoming connections,
	#            deny role switch on outgoing connections
	lm accept;

	# Default link policy
	#   none    - no specific policy
	#   rswitch - allow role switch
	#   hold    - allow hold mode
	#   sniff   - allow sniff mode
	#   park    - allow park mode
	lp rswitch,hold,sniff,park;

	# Authentication and Encryption (Security Mode 3)
	#auth enable;
	#encrypt enable;
}
mx21#

this was the dmesg output

Code:
 

mx21# dmesg
2] hub.c: port 2, portstatus 100, change 0, 12 Mb/s
[10238.785528] hub.c: port 3, portstatus 100, change 1, 12 Mb/s
[10238.785626] hub.c: port 3 connection change
[10238.785701] hub.c: port 3, portstatus 100, change 1, 12 Mb/s
[10238.788532] usb.c: USB disconnect on device 5
[10238.792582] hub.c: port 4, portstatus 100, change 0, 12 Mb/s
[10238.796612] hub.c: port 5, portstatus 100, change 0, 12 Mb/s
[10238.800643] hub.c: port 6, portstatus 100, change 0, 12 Mb/s
[10238.804679] hub.c: port 7, portstatus 103, change 0, 12 Mb/s
[10238.812754] hub.c: port 1, portstatus 103, change 0, 12 Mb/s
[10238.816861] hub.c: port 2, portstatus 100, change 0, 12 Mb/s
[10238.820830] hub.c: port 3, portstatus 100, change 0, 12 Mb/s
[10238.824866] hub.c: port 4, portstatus 100, change 0, 12 Mb/s
[10238.828910] hub.c: port 5, portstatus 100, change 0, 12 Mb/s
[10238.832943] hub.c: port 6, portstatus 100, change 0, 12 Mb/s
[10238.836985] hub.c: port 7, portstatus 103, change 0, 12 Mb/s
[10454.531924] hub.c: port 1, portstatus 103, change 0, 12 Mb/s
[10454.535935] hub.c: port 2, portstatus 100, change 0, 12 Mb/s
[10454.539971] hub.c: port 3, portstatus 101, change 1, 12 Mb/s
[10454.540066] hub.c: port 3 connection change
[10454.540139] hub.c: port 3, portstatus 101, change 1, 12 Mb/s
[10454.657065] hub.c: port 3, portstatus 101, change 0, 12 Mb/s
[10454.768072] hub.c: port 3, portstatus 101, change 0, 12 Mb/s
[10454.879093] hub.c: port 3, portstatus 101, change 0, 12 Mb/s
[10454.990107] hub.c: port 3, portstatus 101, change 0, 12 Mb/s
[10455.010287] hub.c: port 3, portstatus 103, change 10, 12 Mb/s
[10455.013309] hub.c: USB new device connect on bus1, assigned device number 6
[10455.044594] usb.c: kmalloc IF c02c6920, numif 3
[10455.047629] usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
[10455.051647] usb.c: USB device number 6 default language ID 0x409
[10459.088307] usb_control/bulk_msg: timeout
[10459.192626] Product: ISSCBTA
[10459.195667] usb.c: hci_usb driver claimed interface c02c6938
[10459.195819] usb.c: hci_usb driver claimed interface c02c6920
[10459.195933] usb.c: unhandled interfaces on device
[10459.199864] hub.c: port 4, portstatus 100, change 0, 12 Mb/s
[10459.203754] hub.c: port 5, portstatus 100, change 0, 12 Mb/s
[10459.207760] hub.c: port 6, portstatus 100, change 0, 12 Mb/s
[10459.211804] hub.c: port 7, portstatus 103, change 0, 12 Mb/s
[10459.219879] hub.c: port 1, portstatus 103, change 0, 12 Mb/s
[10459.223905] hub.c: port 2, portstatus 100, change 0, 12 Mb/s
[10459.227943] hub.c: port 3, portstatus 103, change 0, 12 Mb/s
[10459.231987] hub.c: port 4, portstatus 100, change 0, 12 Mb/s
[10459.236019] hub.c: port 5, portstatus 100, change 0, 12 Mb/s
[10459.240065] hub.c: port 6, portstatus 100, change 0, 12 Mb/s
[10459.244092] hub.c: port 7, portstatus 103, change 0, 12 Mb/s
[10628.429367] kmod: failed to exec /sbin/modprobe -s -k bt-proto-0, errno = 2
[10636.792357] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10636.798360] kmod: failed to exec /sbin/modprobe -s -k bt-proto-0, errno = 2
[10636.801546] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10636.802390] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10651.799893] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10651.802653] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10651.805479] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10651.806392] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10651.816580] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10659.321594] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10659.322419] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10659.882766] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10659.887478] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10717.550584] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10724.693920] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10724.699866] kmod: failed to exec /sbin/modprobe -s -k bt-proto-0, errno = 2
[10724.702135] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10724.702975] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10734.229998] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10775.559968] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10861.601917] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10861.602759] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10865.096769] hub.c: port 1, portstatus 103, change 0, 12 Mb/s
[10865.100775] hub.c: port 2, portstatus 100, change 0, 12 Mb/s
[10865.104821] hub.c: port 3, portstatus 100, change 1, 12 Mb/s
[10865.104916] hub.c: port 3 connection change
[10865.104988] hub.c: port 3, portstatus 100, change 1, 12 Mb/s
[10865.107825] usb.c: USB disconnect on device 6
[10865.108881] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10865.111896] hub.c: port 4, portstatus 100, change 0, 12 Mb/s
[10865.115944] hub.c: port 5, portstatus 100, change 0, 12 Mb/s
[10865.119939] hub.c: port 6, portstatus 100, change 0, 12 Mb/s
[10865.123975] hub.c: port 7, portstatus 103, change 0, 12 Mb/s
[10865.132052] hub.c: port 1, portstatus 103, change 0, 12 Mb/s
[10865.136090] hub.c: port 2, portstatus 100, change 0, 12 Mb/s
[10865.140124] hub.c: port 3, portstatus 100, change 0, 12 Mb/s
[10865.144162] hub.c: port 4, portstatus 100, change 0, 12 Mb/s
[10865.148201] hub.c: port 5, portstatus 100, change 0, 12 Mb/s
[10865.152234] hub.c: port 6, portstatus 100, change 0, 12 Mb/s
[10865.156277] hub.c: port 7, portstatus 103, change 0, 12 Mb/s
[10877.514639] hub.c: port 1, portstatus 103, change 0, 12 Mb/s
[10877.518647] hub.c: port 2, portstatus 100, change 0, 12 Mb/s
[10877.522688] hub.c: port 3, portstatus 101, change 1, 12 Mb/s
[10877.522783] hub.c: port 3 connection change
[10877.522857] hub.c: port 3, portstatus 101, change 1, 12 Mb/s
[10877.634728] hub.c: port 3, portstatus 101, change 0, 12 Mb/s
[10877.745748] hub.c: port 3, portstatus 101, change 0, 12 Mb/s
[10877.856760] hub.c: port 3, portstatus 101, change 0, 12 Mb/s
[10877.967775] hub.c: port 3, portstatus 101, change 0, 12 Mb/s
[10877.987942] hub.c: port 3, portstatus 103, change 10, 12 Mb/s
[10877.990975] hub.c: USB new device connect on bus1, assigned device number 7
[10878.022274] usb.c: kmalloc IF c02c6920, numif 3
[10878.025295] usb.c: new device strings: Mfr=1, Product=2, SerialNumber=0
[10878.029318] usb.c: USB device number 7 default language ID 0x409
[10882.065852] usb_control/bulk_msg: timeout
[10882.170296] Product: ISSCBTA
[10882.173336] usb.c: hci_usb driver claimed interface c02c6938
[10882.173508] usb.c: hci_usb driver claimed interface c02c6920
[10882.173624] usb.c: unhandled interfaces on device
[10882.174555] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10882.177407] hub.c: port 4, portstatus 100, change 0, 12 Mb/s
[10882.181436] hub.c: port 5, portstatus 100, change 0, 12 Mb/s
[10882.185433] hub.c: port 6, portstatus 100, change 0, 12 Mb/s
[10882.189516] hub.c: port 7, portstatus 103, change 0, 12 Mb/s
[10882.197280] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10882.197617] hub.c: port 1, portstatus 103, change 0, 12 Mb/s
[10882.201267] kmod: failed to exec /sbin/modprobe -s -k net-pf-1, errno = 2
[10882.201755] hub.c: port 2, portstatus 100, change 0, 12 Mb/s
[10882.205648] hub.c: port 3, portstatus 103, change 0, 12 Mb/s
[10882.209658] hub.c: port 4, portstatus 100, change 0, 12 Mb/s
[10882.213687] hub.c: port 5, portstatus 100, change 0, 12 Mb/s
[10882.217734] hub.c: port 6, portstatus 100, change 0, 12 Mb/s
[10882.221763] hub.c: port 7, portstatus 103, change 0, 12 Mb/s
mx21#
 
Old 06-22-2009, 08:55 PM   #2
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
I am not 100% sure what you are trying to do with those commands, and your dmesg output seems to be indicating a whole lot of problems that may or may not have anything to do with the current issue.

If you are paired up with the device already, does it show the connection when you run "hcitool con"? You don't necessarily need to query the SDP records on the remote device if you already know it is running SPP (and know which RFCOMM channel it is bound to).

Have you tried simply binding an RFCOMM channel to the remote device and seeing that happens?

Code:
rfcomm bind rfcomm0 00:21:FC:FE:86:63
 
Old 06-22-2009, 11:26 PM   #3
kewl
LQ Newbie
 
Registered: Feb 2009
Posts: 29

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by MS3FGX View Post
I am not 100% sure what you are trying to do with those commands, and your dmesg output seems to be indicating a whole lot of problems that may or may not have anything to do with the current issue.

If you are paired up with the device already, does it show the connection when you run "hcitool con"? You don't necessarily need to query the SDP records on the remote device if you already know it is running SPP (and know which RFCOMM channel it is bound to).

Have you tried simply binding an RFCOMM channel to the remote device and seeing that happens?

Code:
rfcomm bind rfcomm0 00:21:FC:FE:86:63

yeah I have tried that earlier
but it gives an error

Code:
mx21# rfcomm bind rfcomm0 00:21:FC:FE:86:63
Can't open RFCOMM control socket: No such file or directory

mx21# sdptool search sp
Inquiring ...
Failed to connect to SDP server on 11:11:11:11:11:11: No such file or directory
mx21# hcitool cc 11:11:11:11:11:11
Can't create connection: Input/output error

Last edited by kewl; 06-23-2009 at 04:34 AM.
 
Old 06-23-2009, 02:40 PM   #4
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
First of all, you need to get the syntax correct for those commands.

For sdptool, you need to give it a Bluetooth MAC to inquire. The way you are trying to run it now isn't going to do what you want. You need to do:

Code:
sdptool search sp 00:21:FC:FE:86:63
But as I said in the last post, the SDP records don't really matter as long as you know the service is running on the other machine.

As for hcitool, again, you need to give it the MAC of the remote device, not the local device like you are trying to do.

Code:
hcitool cc 00:21:FC:FE:86:63
Though if you have already paired from the other side, you don't need to do this again.

As for the RFCOMM error, that means the rfcomm0 device node hasn't been created. Does this device you are working with have UDEV running? You might need to manually create the node:

Code:
mknod -m 666 /dev/rfcomm0 c 216 0
 
  


Reply

Tags
bluez, hcitool, scan


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wammu doesn't find my k800i, hcitool does sloteel Linux - Software 4 07-12-2008 06:00 AM
hcitool scan cant detect my phone harshiloh Linux - Wireless Networking 0 10-28-2007 02:15 AM
bluetooth: 'hcitool scan' problem with debian daniela Linux - Software 8 10-28-2007 01:47 AM
<bluetooth>hcitool scan failed(2.4.20-8) zkeileen Linux - Software 2 05-16-2007 04:32 AM
hcitool cache Josephus Ross Programming 1 03-07-2007 09:37 AM


All times are GMT -5. The time now is 07:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration