Author Topic: Cacko: Bluetooth Not Resuming On Resume  (Read 2482 times)

trejkaz

  • Newbie
  • *
  • Posts: 32
    • View Profile
Cacko: Bluetooth Not Resuming On Resume
« on: December 30, 2004, 12:21:16 am »
ROM: Cacko 1.21b
Zaurus: SL-C860
Bluetooth card: D-Link DCF-650BT

Updated /etc/bluetooth/uart with the BlueMonkey line (since this card masquerades as a BlueMonkey card... sigh.)

Card works perfectly on insert, but deactivates on suspend and on resume, it doesn't come back up.

Running "hciconfig hci0 up" straight after makes it work, but it's less than convenient to have to do this every time my device happens to suspend.  Same goes for pulling out the card... that works too, but is a pain.

Taking a look at /etc/apm.d/resume.d/R45bluetooth, it seems that "cardctl eject" and "cardctl insert" are supposed to be getting run on resume.  But obviously neither is actually happening.  When I try running "cardctl eject" from the console, I get this:

Code: [Select]
ioctl(): Device or resource busy
I assume that this is the underlying problem.  Anyone have any ideas on how to solve it?

gizard

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
    • http://
Cacko: Bluetooth Not Resuming On Resume
« Reply #1 on: December 30, 2004, 05:36:29 am »
I have a Socket card and I have to physically pull the card out and the insert it again after a resume - it then works fine.
C860 - With OZ 3.5.4.1/Opie 1.2.1 - CF Socket Bluetooth Rev. G card - Slim Battery.

trejkaz

  • Newbie
  • *
  • Posts: 32
    • View Profile
Cacko: Bluetooth Not Resuming On Resume
« Reply #2 on: December 30, 2004, 05:48:51 am »
So you have exactly the same problem as I have. -sigh-

I found a workaround.  I discovered that the hciattach process was the one preventing "cardctl eject" from taking place.

Add a "killall hciattach" to the resume portion of the /etc/apm.d/bluetooth script, and it now works fine after reset:

Code: [Select]
     killall hciattach
      rfcomm bind all
      cardctl eject
      cardctl insert
      hciconfig hci0 up

It's a bit of a dirty hack, but it makes it work fine through reset.  The "correct" solution would be for hciattach to not be running in the first place.  It isn't running on my Linux desktop which also uses bluez, so it shouldn't need to be running on the Linux handheld. :-)

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Cacko: Bluetooth Not Resuming On Resume
« Reply #3 on: December 31, 2004, 04:17:36 pm »
hciattach is required for your card because it has a UART based interface. hciattach initialises the interface and allows the hci_uart driver to work with the card.
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

trejkaz

  • Newbie
  • *
  • Posts: 32
    • View Profile
Cacko: Bluetooth Not Resuming On Resume
« Reply #4 on: December 31, 2004, 10:30:46 pm »
I guess it really is a bug in Cacko then.  Maybe it will be fixed for 1.22.