Blog Forum Wiki Links Contact Us NetbookUser
RunCore Pro IV SSD Transforms your ASUS EEE PC by increasing 
performance 5-40X. Your satistfaction guaranteed RunCore Pro 70mm SATA Mini PCI-e SSD
RunCore Pro IV 70mm SATA II Mini PCI-e SSD
RunCore Pro IV 2.5 Inch SATA II SSD

You are not logged in.

#1 2008-07-31 7:12:30 am

marceee
New member
Registered: 2008-07-30
Posts: 8

Bluetooth problem, hciconfig "Can't open HCI socket"

I am trying to get bluetooth working on my 900, but I keep getting the following message:

  Can't open HCI socket.: Address family not supported by protocol

Together with my eee 900/Linux I purchased an Asus USB-BT21 Bluetooth dongle, assuming that this
would work with my eee. The packaging of the dongle even shows an EEE PC. However, I have been
trying to set up a bluetooth connection to a cellphone, so far without luck. For 2 weeks I have been
reading each and every forum, wiki etc. on this topic but it still will not work.

The main issue appears to be the fact that hciconfig command is not found:

/home/user> hciconfig
bash: hciconfig: command not found

when i try:
/home/user> sudo hciconfig
Can't open HCI socket.: Address family not supported by protocol

Based on info in several wikki's, I have installed the following packages:

bluez-utils
libbluetootht
bluesoleil
3egprs

I did get bluesoleil to work, but only briefly. I did not recognize all devices I want to pair, and when I
got a gprs connection running. bluesoleil turned out to be extremely slow. I would like to use 3egprs
instead, but the issues with the hciconfig command prevent me from using it.

I assume there are 900 users on this forum managed to get an USB bluetooth dongle to work,
please let me know how you did this. Thanks!

Offline

 

#2 2008-07-31 8:08:20 am

scrapheap
Member
Registered: 2008-05-07
Posts: 32

Re: Bluetooth problem, hciconfig "Can't open HCI socket"

Do you have the hci modules running?

I think you need to add the following to your /etc/modules file.

Code:

hci_usb
rfcomm

Offline

 

#3 2008-07-31 9:00:12 am

marceee
New member
Registered: 2008-07-30
Posts: 8

Re: Bluetooth problem, hciconfig "Can't open HCI socket"

scrapheap wrote:

Do you have the hci modules running?

I think you need to add the following to your /etc/modules file.

Code:

hci_usb
rfcomm

Thanks for your reply. I don't now too much about Linux, so could you please be more specific on
how and where i need to add this code? Thanks in advance!

Offline

 

#4 2008-07-31 9:06:48 am

scrapheap
Member
Registered: 2008-05-07
Posts: 32

Re: Bluetooth problem, hciconfig "Can't open HCI socket"

Disclaimer this could cause problems if you mess the file up so be very careful.

In easy mode press Ctrl+Alt+T to get a terminal window up then type

Code:

sudo nano /etc/modules

Which should bring up a text editor with the modules file loaded.  Then add the following two line to the bottom of the file

Code:

hci_usb
rfcomm

Press Ctrl+x to exit and save the file (say yes when prompted if you want to save and accept the suggested filename)

restart your eee and then give it a go.

Offline

 

#5 2008-07-31 4:13:11 pm

marceee
New member
Registered: 2008-07-30
Posts: 8

Re: Bluetooth problem, hciconfig "Can't open HCI socket"

scrapheap wrote:

Disclaimer this could cause problems if you mess the file up so be very careful.

In easy mode press Ctrl+Alt+T to get a terminal window up then type

Code:

sudo nano /etc/modules

Which should bring up a text editor with the modules file loaded.  Then add the following two line to the bottom of the file

Code:

hci_usb
rfcomm

Press Ctrl+x to exit and save the file (say yes when prompted if you want to save and accept the suggested filename)

restart your eee and then give it a go.

I tried exactly what you suggested, unfortunately without any results. I saved both lines to the
/etc/modules file and restarted the eee.

when i give the command sudo hciconfig i get the exact same message as before:
Can't open HCI socket. Address family not supported by protocol

Any other suggestions?

Offline

 

#6 2008-08-20 8:10:06 am

manxices
Member
Registered: 2008-06-04
Posts: 14

Re: Bluetooth problem, hciconfig "Can't open HCI socket"

marceee

I have the same problems with hciconfig on an eeepc 900 - very frustrating!

If BlueSoleil is installed, 3ehobbyst in the forum ".. Index » Hacks and Modifications » Bluetooth on Xandros .."
   (sorry not sure how to link directly to it but search on 'bluesoleil' and 'hciconfig' should find)
has some suggestions on which I have sought further comment. With luck, he may be able to help us out!

Please let us know if you have made any other progress meanwhile ....


manxices
eeePC 900 linux - advanced mode
experience level - beginner

Offline

 

#7 2008-08-20 8:13:36 am

manxices
Member
Registered: 2008-06-04
Posts: 14

Re: Bluetooth problem, hciconfig "Can't open HCI socket"

marcee

(follow up to ealier post today) - the forum link is
http://forum.eeeuser.com/viewtopic.php?id=27958


manxices
eeePC 900 linux - advanced mode
experience level - beginner

Offline

 

#8 2008-08-24 11:37:49 am

olgs
New member
Registered: 2008-08-22
Posts: 1

Re: Bluetooth problem, hciconfig "Can't open HCI socket"

marceee wrote:

scrapheap wrote:

Disclaimer this could cause problems if you mess the file up so be very careful.

In easy mode press Ctrl+Alt+T to get a terminal window up then type

Code:

sudo nano /etc/modules

Which should bring up a text editor with the modules file loaded.  Then add the following two line to the bottom of the file

Code:

hci_usb
rfcomm

Press Ctrl+x to exit and save the file (say yes when prompted if you want to save and accept the suggested filename)

restart your eee and then give it a go.

I tried exactly what you suggested, unfortunately without any results. I saved both lines to the
/etc/modules file and restarted the eee.

when i give the command sudo hciconfig i get the exact same message as before:
Can't open HCI socket. Address family not supported by protocol

Any other suggestions?

I'll put in my 2 cents worth.

After fiddling with my new 900A for the last 2 days, and following various threads on this board. I finally overcame the Address Family not supported error.

There seems to be two problems:

For the record, I installed the bluez-utils and kdebluetooth packages.

First, the 900A does not have built in bluetooth, and the default installation does not start dbus and bluetooth services properly.

To fix this, I modified/created /etc/fastservices and appended two lines (careful, order is important)

dbus
bluetooth

Second, for some reason, when my 900A is booting, it is unable to find two key kernel modules:

/lib/modules/${DKERNEL_VERSION}/kernel/net/bluetooth/bluetooth.ko
/lib/modules/${DKERNEL_VERSION}/kernel/drivers/bluetooth/hci_usb.ko

to see if you have a similar problem, I suggest running 'sudo lsmod' and check to see if bluetooth and hci_usb are booth loaded properly.

In my case, they were named incorrectly as bluetooth.2.6.21.4.ko and hci_usb.2.6.21.4.ko instead of the shorter names. I created symlinks to fix the problem and ran depmod -a to update the dependencies.

After rebooting, the system should load the bluetooth.ko and hci_usb.ko modules properly.

Then I followed the instructions on the wiki to complete the setup.

Hope this helps.

Offline

 

#9 2008-08-26 2:54:43 pm

manxices
Member
Registered: 2008-06-04
Posts: 14

Re: Bluetooth problem, hciconfig "Can't open HCI socket"

Perhaps the following might help those struggling with hciconfig problems – I can’t guarantee the steps will work for everyone but, looking at various forum postings, I became very confused to know if the solutions people seemed to be suggesting would work on my eeePC 900 or whether, for example, they had worked on a 700 but would go wrong if tried on a 900. Many novice users seem as confused as me, so please treat this post as a case of ‘the blind leading the blind’ (but with much appreciated help along the way from other forum posters):

I am putting this post into a couple of forum threads which cover the same areas of difficulty, but cross reference the different threads along the way. Sorry its so long, but if you’re as confused as I was, a bit of reading may help to calm the nerves!


Background:
I have been attempting to install and run SeaClear navigation software under Wine. I was able to get the software running Ok but could not receive a data feed from by Bluetooth GPS unit which SeaClear was looking for on serial port Com1


Problems with hciconfig and hci tools:

Initially, I installed BlueSoleil’s eeePC version of its software and, whilst this managed to pair successfully with Bluetooth phones, etc, and appeared to pair with my GPS unit, I still could not figure how to redirect the data feed to com1 for SeaClear.

Reading various postings, I realised that I needed to redirect Bluetooth input from rfcomm0 to com1 and that I needed hci tools to do that. Every time I tried running hciconfig I got either nothing or, having reloaded bluez-utils (through Synaptic) the error message “Can't open HCI socket. Address family not supported by protocol

3ehobbyst’s posting on http://forum.eeeuser.com/viewtopic.php?id=27958 (post #7) made me think BlueSoleil might be creating problems with the bluez files so I reinstalled the two kernel modules he referred to and then ran the command depmod –a in the terminal window. (Olgs’ posting #8 on http://forum.eeeuser.com/viewtopic.php? … 76#p359476 deals with this very clearly too.)

This gave me back the hci tools on rebooting - so now I could go to the next stage and look at how to deal with the redirection from rfcomm0 to com1 for SeaClear.


Setting up Wine

Initially, I edited ~/.wine/dosdevices/system.reg so that the serial port com1 was set to rfcomm0. This can be done either in the terminal window (“.. sudo nano ……” or by double clicking the file under File Manager and editing).

Scroll down in the file until you find the entry
“.. [Hardware\\DEVICEMAP\\SERIALCOMM] …” (followed by a number)
and on the next line replace @=”” with:
    "com1"="rfcomm0"
(Note the quotation marks must be included). Re-save the file under its original name.

Note: I have carried out this step on my eeePC 900 but Notle (see below) who is running a 701 (with a beta version of Wine 9.25) has no ‘com1’ entry in his system.reg file – in my case the running SeaClear under Wine doesn’t work without the modification in system.reg but, depending on your eeePC model, you can perhaps experiment. It should be pretty obvious if your system.reg file needs the serialcomm setting to be input. I have Wine version 0.9.25 on my machine.



Running SeaClear under Wine:

Notle has posted a thread at http://forum.eeeuser.com/viewtopic.php?pid=344594 giving some code to connect his eeePC 701 with his GPS Bluetooth dongle.

Using hcitool scan I obtained the unit id for my GPS and was able to follow Notle’s given code but only up to the last line. At this point, I ran “.. sudo cat /dev/rfcomm0 ..” and received screenfulls of very encouraging looking GPS data streaming in from my Bluetooth GPS!

I changed the last line of Notle’s code to give the correct location path to the version of SeaClear_2.exe on my computer but still received an error message (“.. Cannot find com1 ..”) when I tried running SeaClear. Changing to other com ports didn’t help either – it all seemed ‘so near, yet still so far’!

Olgs’ posting (mentioned above) suggested creating (or modifying) the file /etc/fastservices and appending the two lines (which must be in the correct order):
dbus
bluetooth

so I did this.

I then decided that there must be some way to avoid manually starting up my Bluetooth connection after each reboot which is what Notle’s code seemed to make me do, so I delved into what appeared to be a highly complicated wiki entry (http://wiki.eeeuser.com/bluetooth_gps) but which is, in fact, fairly straightforward if you follow it through carefully – some things which I did, though, and which might help others:

(i)    Make sure to start udevmonitor in your terminal window before you plug in your GPS – not after as I did! (It monitors the GPS as it is plugged in!)
(ii)    I did all my work in my directory /home/user so don’t be put off by the reference in the wiki to vesta:/root>
(iii)    I did not install gpsd as suggested in the wiki – using sudo cat /dev/rfcomm0 was an easy way to check GPS data was feeding in. (Remember, at this stage, my Bluetooth was connected and I could see data on rfcomm0 but couldn’t get SeaClear to see it under com1)
(iv)    Instead of the file /etc/udev/gpsd.rules referred to in the wiki, I created a new file /etc/udev/gps.rules and changed all references to “gpsd” in the given code to “gps”. My new executable file, as you follow the wiki on, accordingly became /lib/udev/gps.rfcomm
(v)    I modified /etc/bluetooth/rfcomm.conf and, finally, edited /etc/modules as suggested.

With some trepidation, I then rebooted, plugged in my GPS, checked for data input (cat /dev/rfcomm0) and in came the data feed – when I turned the GPS off, it stopped, and when I pulled the dongle out and put it back in, it started up again automatically.

Furthermore, when I loaded up SeaClear under Wine, communication was established with com1 (which I had set as the communication port under Tools>Preferences in SeaClear) and – hey presto! – my chart now shows me where I am!!

With hindsight, it all seems so simple, but for those of us who are pretty new to Linux, the ‘getting there’ may not seem easy at all.

Good luck if you’re still struggling with Bluetooth - I hope this ‘case study’ might help and, in particular, I’m very grateful to those posters I refer to who helped me to get my problem resolved.


PS.
I have not re-installed BlueSoleil in case it causes me kernel problems again. I can’t comment on whether or not it originally caused any conflict in my system but as I only want a Bluetooth connection for GPS input to SeaClear I don’t need BlueSoleil at the moment.

Last edited by manxices (2008-09-02 5:41:11 pm)


manxices
eeePC 900 linux - advanced mode
experience level - beginner

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson