Thread: Moses SmartQ 5
View Single Post
Posts: 13 | Thanked: 6 times | Joined on Oct 2008 @ England
#314
Originally Posted by imaredr View Post
Hi, I am new at all this and I was wondering if you could explain this a bit more. I can't get my BT to work. Thanks
Ok, I'll try, I am assuming you are able to get to a command prompt via ssh?

On the Q5, the bluetooth chip is connected internally via USB.
By default the Q5 is configured as a USB device rather than a USB host. This means that as far as the kernel is concerned there is no USB host available and therefore no USB devices can be attached to it. As the bluetooth chip is a USB device, it cannot be found by the kernel at startup and therefore is not available.

To solve this you need to tell the Q5 USB to be a host. This is archived by entering the following two commands:

echo 1 > /sys/devices/platform/hhtech_gpio/usbhostpwr_en
echo 1 > /sys/devices/platform/hhtech_gpio/usbotgdrv_en

By echoing the number 1 to these two virtual files, you are telling the kernel to enable the usb host. If you were to send 0 you would be telling the kernel to disable host mode.

Once the device is disabled, you need to load in the appropriate kernel module, this would normally happen at boot, but because the USB host did not exist at boot, the module did not get loaded.

To load the module you just need to enter

modprobe ohci-hcd

This loads the ochi-hcd module into the kernel, which will, then register any attached USB devices it finds (i.e the bluetooth chip)

The dmsg command just shows the kernel log, it is not required to make bluetooth work, it just shows what has happened. If you are still having problems, post the last part of dmsg having performed the previous commands, it may give me some indication of what is happening on your system.

The hciconfig command just displaying the bluetooth device information, again, it is not required other than to show it is working.

Once the blue tooth is available, the normal bluetooth commands can be used to manage connection.