Help - Search - Members - Calendar
Full Version: Bluetooth Problem On Henntges Oz 3.5.3
OESF Forums > Distros, Development, and Model Specific Forums > Distro Support and Discussion > Angstrom & OpenZaurus
Marty
I have Hentges OZ 3.5.3 and Cardfs up and running on my Z.
Now how do I get bluetooth started on OZ 3.5.3 ?

I have an LSE038 Bluecard which is recognised as soon as I put it into the Z.
However the light never goes on.
The network bnep0 cant be started.
I've tried sdp tool browse but nothing happens.

Card Details

cardctl ident

socket 0:
product info : "WSS" , "LSE039"
manfid: 0x0264, 0x0008
funtion: 6 (network)
Socket 1:
no product info available


I've checked bluetooth.conf - here's the driver for my card.

device "bluecard_cs"
class "bluetooth" module "bluecard_cs"

card "LSE039 Bluetooth PC Card"
version "wss","LSE039"
bind "bluecard_cs"

I assume bluecard_cs is part of the bluetooth module - I dont see it as an opie or oz module -can someone confirm this?

Help please!
Marty
Ok I have my bluecard recognised in hentges oz 3.5.3. biggrin.gif I found an old post which showed me how to download the missing bluetooth driver from the kernel modules.

"Download http://bluez.sourceforge.net/download/zaur...18-mh14_arm.ipk

Rename it to bluez-kernel-2.4.18-mh14_arm.tar.gz and open it with winrar or winzip.
There is a bluecard_cs.o in this file. Copy it to your zaurus (lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/bluetooth) and reboot.

At console use: hciconfig hci0 up"

Installing bluecard_cs.o in the kernel modules means oz now recognises my card.
Note this is obviously missing from oz!!

However I still have problems!
I do sdptool browse and the z sees my motorola phone mac address - but also says it doesnt have permission to connect to this sdp service ???

Anyway undeterred I enter my phones' mac address into rfcomm.conf.
ok I've forgotten what to do next ? (Actually i dont know with oz.!)
(I have also set "automatically bind at start up" in rfcomm)

Still cant start bnep0 service in "networks" ....
Need some help now please!!

Also I find when I tap on the card manager icon and select "eject lse039 bluetooth card the light on the card goes on and stays on and the z hangs.
The only way out is to reboot with the switch at the back. - am I still missing some configuration somewhere???
lardman
QUOTE
Note this is obviously missing from oz!!


Is it not in one of the machine related ipks in the machine feed?


Si
Greg2
QUOTE(Marty @ Aug 28 2005, 07:06 PM)
Installing bluecard_cs.o in the kernel modules means oz now recognises my card.
Note this is obviously missing from oz!!

bluecard_cs.o is in the kernel-module-bluecard-cs_2.4.18-rmk7-pxa3-embedix-r18_collie.ipk in the /machine/collie feed... (as lardman has already suggested) smile.gif

Greg
Marty
Whoops so it is! rolleyes.gif I was looking for a file starting with bluecard_cs.o instead of kernel...

Ok have downloaded and installed driver and re-booted.

At konsole I entered #hciconfig hci0 up

..and the card light flashed on and off..
Now I enter #sdptool browse
and the z sees my motorola phone correctly - mac address and all.

Ok but in the sharp rom I was able to use the network applet to create a bluetooth connection via "/device/rfcomm0" and enter a number to dial up via gprs.

How do I do this with open zaurus?

I have downloaded the bluetooth manager and bluepin applet and after using hciconf hci up at the konsole I have been able to scan and see my motorola phone.

How do I create a dialup - what do I do next??
Marty
Ah I may be ok! I have found a very good description of how to set up bluetooth and setup a GPRS connection to a phone within the opie site.

http://opie.handhelds.org/cgi-bin/moin.cgi/BluetoothGprs

I'll give this a go first!
Marty
Success ! I have configured bluez (rfcomm etc) and I have added a new network connection to "networks" and made a bluetooth GPRS dial up connection to the internet.

Sounds good except:

When I put the card in I have to execute this command from the konsole

/etc/init.d/bluetooth start

because bluetooth isnt being started automatically

Then I can start the network connection I've just made and I can connect to the internet ok.

I can stop the connection ok but if I try and eject the card using cardmanager th elight comes on and it locks up so I have to reboot.

To avoid this I have to enter this command from the konsole

/etc/init.d/bluetooth stop

Hmm seems to me that bluetooth was automatically started and stopped when using bluez with the sharp rom.
How do you do this with OZ?

I have installed the bluetooth applet (it looks dark all the time) I can launch the bluetooth manager from it ok but nothing seems to happen when I try and enable bluetooth.

Nearly there.. a couple of more clues/ suggestions on how to fix this would be most welcome!!!
HeavyWeaponDude
Would you please help me reach your same result?

I've managed to install correctly a Billionton card at kernel level.
It is correctly recognized, and if i use

CODE
setserial /dev/ttyS3 baud_base 921600
modprobe hci_uart
hciattach /dev/ttyS3 billionton
hciconfig hci0 up


the cards go up and running. I've just tried to make some "hcitool scan" with other bt peripherals around, just to test, and everything is fine.

But if i try to run:
/etc/init.d/bluetooth start

I got this error:
Starting Bluetooth subsystem: hcid sdpd Can't open HIDP control socket: No such file or directory
hidd rfcomm.

And nothing works.
I would like to make at least /etc/init.d/bluetooth start (and stop) to work.
Otherwise, being unable to stoppping the service, every time I extract the card I need to reboot the Z to make it work again.

Thanks for any help!
lardman
What's hidp? I assume it's either not installed, or hasn't been created. Either install it, or edit the script to not faiol if it's not available,


Si
Mickeyl
Hidp is the Bluetooth Human Interface Devices Protocol (keyboards, mice, etc.) - I'm not sure if the bluez patch adds this to 2.4.18. It works fine on the Zaurii with 2.4.20 and 2.6.13.
HeavyWeaponDude
Ok, I'm getting some progress smile.gif
Basing upon Lardman suggestion and the information I got here:

http://www.oesf.org/forums/index.php?showtopic=9347&hl=hidp

about the absence of the HIDP support, I edited the script, commenting out
all the references to it.
Now the script start and stop correctly:

CODE
/etc/init.d/bluetooth start
Starting Bluetooth subsystem: hcid sdpd rfcomm

/etc/init.d/bluetooth stop
Stopping Bluetooth subsystem: pand dund rfcomm sdpd hcid


But my device is still unavaiable: "hciconfig -a" gives no output
I've tried to load hci_uart manually (modprobe hci_uart) before running the demon, since that module is required and it's not loaded upon card insertion or by running the bluetooth demon itself.
But still no luck. "hciconfig -a" still giving me a blank output.
uhm...
Marty
The only way I can get a consistent bluetooth connection is if I reboot (flix battery switch to "replace battery then back to normal"
When I come up from a reboot I insert my Bluetooth card and it blinks on and off and I run my dial up script from networks ( I have a little script to check the bluecard_cs module is loaded and also runs /etc/init.d/bluetooth start for good measure in the "execute" tab. The phone ask me for the pin number to pair it and the z and I oblige - I am now connected! I can connect and reconnect many times - no problem. Then I suspend the Z and then resume.
I start the dial up from networks it runs the script the card light flashes but I just keep getting the message that its trying to initialise the modem. When I look at the phone there's no sign of anything trying to connect to it. I then have to cancel.
I can suspend and pull out the card and put it back in again. Lights flash on the card but every time I dial I cant get past the trying to initialisation modem message. Somehow when I suspend the Z something is being altered. I'am pretty sure the bluecard_cs module is loaded ok and bluetooth is being started but it seems something has changed!!
It seem that if I want to use bluetooth I have to reboot the z everytime - suggestions anyone!!
Marty
I have bluetooth working consistently now - even after a suspend and resume.
To do this I have to run a script via the ppp dial up I configured within the networks tab. (The "execute" tab in the ppp dial up account allows you to run a script of your choice.)
My script is as follows - call it whatever you like, but make sure you make it executable

#!/bin/sh
/sbin/rmmod bluecard_cs
/sbin/insmod /lib/modules/2.4.18-rmk7-pxa3-embedix/kernel/drivers/usb/device/bluecard_cs.o
/etc/init.d/bluetooth stop
/etc/init.d/bluetooth start
rfcomm bind all
pand --listen GW
pand --connect <your phones mac address>

First of all I make sure that the bluecard_cs module is properly loaded then I stop and start bluetooth .
I found you had to stop bluetooth when you came out of suspend otherwise bluetooth didnt initialise properly and I could get past the modem initialiastion string in the ppp dial up.
I added rfcomm bind all and the pand commands just for good measure.
Anyway I can now put my bt card in , suspend and resume and make a bluetooth connection to the phone and dial up everytime.
I dont use the card manager icon to remove the card if I want to swap in my wifi card later I just yank my bt card out wait until the message saying "ls039 card has been ejected" and plug my wifi card in. I found that if I try and click on the card manger icon to remove the card the light on my bt card comes on and stays on - worse still the Z hangs and I have to reboot!

I'am sure these problems and the usbdo modules not loading properly after a resume are all due to the suspend and resume problem and will go away when this is fixed. I have flashed to the latest zImage which has got rid of the right key press suspend problem but there's obviously still problems with suspend /resume.

The general setup for bluetooth can be found here:

http://opie.handhelds.org/cgi-bin/moin.cgi/BluetoothGprs

I also found that I had to add the "givepin" script as per the opie bluetooth instructions above.

Hope this helps you get by with your bluetooth until suspend/resume gets fixed.
HeavyWeaponDude
First of all, many thanks for your help. smile.gif

I fear my problem is on a most basic level.
I'm not trying to setup a connection with a phone by now, but just to have the
bluetooth card running smoothly.
What I'm asking for, is if it your /etc/init.d/bluetooth script works well without any tweaking, and if it's sufficient by itself to make the bluetooth card up and running.
As I said in my previous posts, if I try to run it I get an error, and after tweaking the file I don't get the error anymore, but I'm still unable to use the card properly.
But if I use the sequence of 4 commands (setserial, modprobe, hciattach, hciconfig) everything is fine.

So, actually to make the card works you just run the script you posted, that in turns call the /etc/init.d/bluetooth script? No other tweaks?

If this kind of discussion is not of general interest maybe we can move to PM.

Thanks for your help so far!
Marty
The only thing I altered in /etc/initid/bluetoth was that I commented out the references to HIDD which was causing the same sort of error message that you saw appeared on my z when I ran "/etc/init.d/bluetooth start".
Once I did that the error message went away.

I then found that when I came out of a suspend and ran "/etc/etc/init.d/bluetooth start" the light on the card flashed but... my dial up script would'nt work.
However if I ran "/etc/init.d/bluetooth stop" then "/etc/init.d/bluetooth start" then everything would work just fine.

I've tried modprobeing the bluecard_cs driver in the past but didnt see much happening. I found the rmmod insmod of the driver to do something (at least it told me the bluecard_cs driver was already loaded.)
I know your card uses a different driver than mine but it looks like its not being loaded properly
Maybe you should try that approach instead of modprobe. (see script)
Sorry I wish I could be more help but I'am not an expert on bluetooth.
Marty
The only thing I altered in /etc/initid/bluetoth was that I commented out the references to HIDD which was causing the same sort of error message that you saw appeared on my z when I ran "/etc/init.d/bluetooth start".
Once I did that the error message went away.

I then found that when I came out of a suspend and ran "/etc/etc/init.d/bluetooth start" the light on the card flashed but... my dial up script would'nt work.
However if I ran "/etc/init.d/bluetooth stop" then "/etc/init.d/bluetooth start" then everything would work just fine.

I've tried modprobeing the bluecard_cs driver in the past but didnt see much happening. I found the rmmod insmod of the driver to do something (at least it told me the bluecard_cs driver was already loaded.)
I know your card uses a different driver than mine but it looks like its not being loaded properly
Maybe you should try that approach instead of modprobe. (see script)
Sorry I wish I could be more help but I'am not an expert on bluetooth.
HeavyWeaponDude
Uhm...
Following your suggestions I'm going somewhere. smile.gif
It is not much pratical right now, but still it works, more or less.

I've wrote a little script:

CODE
#!/bin/sh
modprobe hci_uart
sleep 1
setserial /dev/ttyS3 baud_base 921600
hciattach /dev/ttyS3 billionton
hciconfig hci0 up
/etc/init.d/bluetooth start


It basically does what /etc/init.d/bluetooth alone didn't do: setup my card and then startup the bluetooth services. Of course I too have commented out the references to HIDD in /etc/init.d/bluetooth.

However, even if when i run it everything seems to work well ("hciconfig -a" shows the device, and "hcitool -scan" gives the proper results), I get the following message just after running it:

BCSP initialization time out

Making some test, I found that is due to the "hciconfig hci0 up" being in the script.
If I remove it from there and run it manually, I don't get the message.
I've tried also to put some sleep time between "hciattach" and "hciconfig" in the script, but still I get the message. Any hint on this?

I can remove the card running /etc/init.d/bluetooth stop. When I re-insert it I should re-run my script. When I suspend, I have to resume the card manually, by "cardctl resume 0".

At least this way, I've to run just one command upon starting/stopping the bluetooth.
Thanks for any help so far.


***little update***

The card is somewhat unreliable. Sometimes, upon insertion, the led doesn't blink.
Even if "cardctl status" shows the card as being active, it is not.
Doing "cardctl suspend 0", waiting a couple of seconds, and then "cardctl resume 0",
makes it up. Then the script works well, and doesn't give that "BCSP initialization time out" error message.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2014 Invision Power Services, Inc.