Letux Kernel


You are looking at an old revision of the page Wireless. This revision was created by Christoph Mair.

Table of Content

How to configure wireless interfaces (UMTS, WLAN, Bluetooth)


is configured as SDIO card "mmc1".

Driver: Marvel 8686 (libertas) Firmware: sd8686.bin

Power and Reset

# VDD=2800000
echo "255" >/sys/class/leds/tca6507:6/brightness # activate reset
echo "$VDD" >/sys/devices/platform/reg-virt-consumer.4/max_microvolts
echo "$VDD" >/sys/devices/platform/reg-virt-consumer.4/min_microvolts
echo "normal" >/sys/devices/platform/reg-virt-consumer.4/mode
echo "0" >/sys/class/leds/tca6507:6/brightness # release reset

The voltage range is 2.8 V - 3.15 V

Higher voltage means more TX power but drains the battery faster. Lower voltage means to risk malfunctions of the chip (it is specified for 3.0 V - 3.3 V).

Disable power

echo "255" >/sys/class/leds/tca6507:6/brightness # activate reset
echo "0" >/sys/devices/platform/reg-virt-consumer.4/max_microvolts


The libertas and libertas_sdio kernel modules should be loaded automatically after removing the reset with power enabled.


iwconfig wlan0 
ifconfig wlan0 up  (ifup wlan0 is broken)
iwlist wlan0 scan

Note: the interface name wlan0, wlan1 etc. is tied to the MAC address of the WLAN chip by udev. So if you swap your SD card to a different GTA04 device, the interface name will change as well (wlan0, wlan1, wlan2, ...)!

Create an ad-hoc network

On the phone run:

ifconfig wlan0 up
iwconfig wlan0 mode ad-hoc essid GTA04 enc off channel 6
ifconfig wlan0

On a laptop run:

ifconfig wlan0 up
iwconfig wlan0 mode ad-hoc essid GTA04 enc off
ifconfig wlan0

Now they should be connected. To verify this try to ping each other.

The call to iwconfig will search for a network with the specified essid and join it. If none is found, a new one will be created. You can check if the devices are connected to the same network by comparing the cell address which can be displayed with 'iwconfig wlan0'.

Depending on the chipsets the syntax may be slightly different. Try 'enc none' if 'off' does not work.


is accessed through UART1 (/dev/ttyS0). On newer kernels (2.6.34 or later) there can be a faster OMAP-UART driver which is accessed through /dev/ttyO0 (oh-zero).

Enable power

see section WLAN above (power is shared)

Disable power

see section WLAN above (power is shared)


Attach to UART1 as HCI interface

hciattach -s 115200 /dev/ttyS0 any 115200 flow && sleep 2
hciconfig -a
hciconfig hci0 up; sleep 2
hciconfig hci0 name GTA04
hcitool dev
hcitool scan

If the faster UART driver is used, higher speeds could become possible (up to the 700 kbit/s of Bluetooth). The module initializes itself for 115200 bit/s by default.

Increase data rate to benefit from bluetooth 2.0 EDR

This assumes kernel 3.x as the UART speed of older kernels might be limited to 115200. Also note the slightly different name of the tty.

hciattach -s 115200 /dev/ttyO0 any 115200 flow
hciconfig hci0 up
bccmd -d hci0 psset baudrate 12288
bccmd -d hci0 warmreset
killall hciattach
hciattach -s 3000000 /dev/ttyO0 any 3000000 flow
hciconfig hci0 up

If everything went right (watch your kernel log for tx timeout error messages) you should now get the full bluetooth 2.0 EDR speed.

This change is not permanent and has to be done every time you power up the Wi2Wi module.

To save the new baudrate use the following command, but PLEASE make sure everything worked with these settings. If not you might brick your bluetooth chip!

bccmd -d hci0 psset -s 0x1 baudrate 12288

If you personally don't like such high baudrates you can choose your own using the equation:


where PSKEY_UART_BAUDRATE is the value you need for bccmd (12288 for 3MBaud) and BAUDRATE is the value needed for hciattach.

If you want to know the current baudrate of your chip you could use

bccmd -d hci0 psget -s 0x0 baudrate

The default (power up) baudrate will be shown with

bccmd -d hci0 psget -s 0x1 baudrate


is connected to the internal HS-USB. Use lsusb to identify the modem and the bus.

Operation needs the OPTION HSO-kernel driver modules which load automatically as soon as the device is recognized on the bus.

The AT command interface is usually /dev/ttyHS3 (or ttyHS4 depending on some race condition during initialization).

Enable power

The module powers up automatically. Due to a hardware bug in the GTA04A3 it can not be completely powered down. So it will go to sleep mode (3-10 mA) and drain the battery slowly even if the OMAP system is halted. If there is an incoming call, it will even draw more, trying to wake the CPU.

Voice call

Here are the most important commands:

Command Description
AT+COPS=1 make ATD block until connection set up is sent or rejected
ATDnumber; the semicolon is important to start a voice connection; number allows [0-9]+#*GgIg
AT+CHUP hang up
AT_OPCMENABLE=1 enable the PCM interface
AT+VTS=[0-9A-D]+* send DTMF (if connection is established)

It is possible to set up a (long latency) connection between microphone, speakers and the UMTS voice channel by this command:

arecord -fS16_LE -r8000 | aplay -Dhw:1,0 &
arecord -Dhw:1,0 -fS16_LE -r8000 | aplay &

A real phone software should use pulseaudio instead of these simple pipes and background processes to keep delays low.

Use amixer to control the volume etc. If voice is provided in speakerphone mode or through a (bluetooth) headset, switch to the appropriate filter profile by AT_OPCMPROF