Revision as of 11:08, 16 August 2007

In progress: This article or section documents one or more features whose implementation are in progress.

Bluetooth is one of the core functions of the Neo1973, however it is basically unimplemented on the software side at the moment.
Hardware problems in the P1 phone mean that the CPU has to be active in order to wake on external bluetooth events, which will reduce the battery life to some 2 days at best in standby.

This page details how to use bluetooth from the command line.
We have quite a lot of plans about what exactly Bluetooth should be used for.

hciconfig should print information about the adapter if it powered up properly:

hciconfig

(If you have an older rootfs, you may need to modprobe gta01-pm-bt or even hci_usb but these are built in/loaded automatically currently.)
The devices should show as UP. If not you can use

hciconfig <device> up

Bluetooth Functions

Scanning for bluetooth devices

hcitool scan

This will list the addresses of any discoverable bluetooth devices in the vicinity

passkey agent example

There should be a passkey agent built into openmoko, but for now you can start up the example passkey agent and set the pin code there. This will allow for new pairings to be made when you attempt a connection.

passkey-agent --default 0000 &

HID (Human Input Device)

Being able to use HID devices

We want to be able to use a bluetooth keyboard to type into the various applications of our Neo1973.
To use a Bluetooth Keyboard type: (11:22:33:44:55:66 is the Address of your BT-Keyboard)

hidd --connect 11:22:33:44:55:66

and press "Connect" on your BT-KB

Tested on:

Logitech Dinovo Edge

Nokia SU-8W (User:Holone). Switched on the BT keyboard, scanned for BT address and ran the connect statement above. Works fine.

Acting as HID device

We want to be able to use the Neo1973 as a HID device, being able to use it as controller for presentations.

OBEX

Networking

Bluetooth should behave just like our usbnet and provide full TCP/IP access to the phone. BNEP has to be used.

Locate your Neo, then select the "LAN Access Point" service. If your device is not found, or if this service does not show up, then you will need to troubleshoot and fix that before continuing. Bluetooth is designed for short-range communication, so make sure that the devices are physically close to each other.

Open the Network Preferences page then "Show: Network Port Configurations". Enable the new device that you defined in the previous step and drag it to the bottom of the device list (so that it will not interfere with your other network connections)

Click "Connect". If everything worked, you will end up with a 'ppp0' device on your Mac with a local address of 192.168.2.200 and you will be able to access your Neo at 192.168.2.202.

A2DP

The A2DP codec, SBC, runs pretty well now in 32-bit fixed-point math. It's been successfully tested on a faster ARM but not yet on neo. There is test code in the bluetooth-alsa.sf.net plugz module for using alsa plugins to send A2DP audio out and it's starting to be reimplemented "properly" in the bluez core.

Headset Audio

Bluez has an audio daemon for headset audio that should work to set up the control connection to the headset. It will need hooks in the openmoko gui.

Neo1973_Audio_Subsystem has more detail about what magic needs to happen with the Wolfson codec so system audio can be switched to use the bluetooth audio channel and later back to the speaker/earpiece/wired headset.

There seems to be a proposal for audio scenario management there but no detail about whether that is how things are done currently. How should audio management work when eg plugging in/unplugging the wired headset?

Views

Personal tools

In progress: This article or section documents one or more features whose implementation are in progress.

Bluetooth is one of the core functions of the Neo1973, however it is basically unimplemented on the software side at the moment.
Hardware problems in the P1 phone mean that the CPU has to be active in order to wake on external bluetooth events, which will reduce the battery life to some 2 days at best in standby.

This page details how to use bluetooth from the command line.
We have quite a lot of plans about what exactly Bluetooth should be used for.

hciconfig should print information about the adapter if it powered up properly:

hciconfig

(If you have an older rootfs, you may need to modprobe gta01-pm-bt or even hci_usb but these are built in/loaded automatically currently.)
The devices should show as UP. If not you can use

hciconfig <device> up

Bluetooth Functions

Scanning for bluetooth devices

hcitool scan

This will list the addresses of any discoverable bluetooth devices in the vicinity

passkey agent example

There should be a passkey agent built into openmoko, but for now you can start up the example passkey agent and set the pin code there. This will allow for new pairings to be made when you attempt a connection.

passkey-agent --default 0000 &

HID (Human Input Device)

Being able to use HID devices

We want to be able to use a bluetooth keyboard to type into the various applications of our Neo1973.
To use a Bluetooth Keyboard type: (11:22:33:44:55:66 is the Address of your BT-Keyboard)

hidd --connect 11:22:33:44:55:66

and press "Connect" on your BT-KB

Tested on:

Logitech Dinovo Edge

Nokia SU-8W (User:Holone). Switched on the BT keyboard, scanned for BT address and ran the connect statement above. Works fine.

Acting as HID device

We want to be able to use the Neo1973 as a HID device, being able to use it as controller for presentations.

OBEX

Networking

Bluetooth should behave just like our usbnet and provide full TCP/IP access to the phone. BNEP has to be used.

Locate your Neo, then select the "LAN Access Point" service. If your device is not found, or if this service does not show up, then you will need to troubleshoot and fix that before continuing. Bluetooth is designed for short-range communication, so make sure that the devices are physically close to each other.

Open the Network Preferences page then "Show: Network Port Configurations". Enable the new device that you defined in the previous step and drag it to the bottom of the device list (so that it will not interfere with your other network connections)

Click "Connect". If everything worked, you will end up with a 'ppp0' device on your Mac with a local address of 192.168.2.200 and you will be able to access your Neo at 192.168.2.202.

A2DP

The A2DP codec, SBC, runs pretty well now in 32-bit fixed-point math. It's been successfully tested on a faster ARM but not yet on neo. There is test code in the bluetooth-alsa.sf.net plugz module for using alsa plugins to send A2DP audio out and it's starting to be reimplemented "properly" in the bluez core.

Headset Audio

Bluez has an audio daemon for headset audio that should work to set up the control connection to the headset. It will need hooks in the openmoko gui.

Neo1973_Audio_Subsystem has more detail about what magic needs to happen with the Wolfson codec so system audio can be switched to use the bluetooth audio channel and later back to the speaker/earpiece/wired headset.

There seems to be a proposal for audio scenario management there but no detail about whether that is how things are done currently. How should audio management work when eg plugging in/unplugging the wired headset?