Advanced Wifi

From WebOS Internals
Jump to navigation Jump to search

This page is about advanced Wifi configurations. You should know some Terminal and Linux for this.


Most of you won't need this guide as the pre connects to the usual Wireless networks. This guide is for those of you who know what you are doing. This guide comes as is, I have no resposibility if anything happens during using this guide including impact of meteorites and the return of the dinosaurs.


Our university uses eduroam for wireless lan access. This is a Enterprise WPA(2) network with TTLS as authentication, featuring an anonymous identity and whatever else. As Palm obviously did not think of working on WPA Enterprise authentication, I had to do it myself. BTW, iOS connects flawlessly.


Command line wpa_supplicant

Connection via wpa_supplicant works as follows:

# # kill the running wpa_supplicant
# killall wpa_supplicant
# # start a new one
# wpa_supplicant -i eth0 -D wext -c /tmp/wpa_supplicant.conf
# # obtain IP Adress
# dhclient eth0
# # Some DNS problems may occur, so for testing add google DNS Servers:
# echo nameserver > /etc/resolv.conf

This is everything you need to test connection via wpa_supplicant. For an example configuration read the manpage or check the configuration at the end of this article.

Problem with webOS

Connection via command line works for the system underneath, but you will receive the "No network connection" message when you try to use some webOS internet app without another ( i.e. 3G ) connection.


We need to "inject" the wpa_supplicant configuration while webOS connects to the network. This sounds somewhat crazy but it works. Create a working configuration and a small script. Also you need some debian packages.


Go to and download the wpasupplicant packages. You only need the /sbin/wpa_cli binary from there. Also you need the file Download the arm binaries, as this is the architecture of the pre.


Create a script somewhere with the following contents:

cp .wpa_supplicant.conf /tmp
chmod a-w /tmp/.wpa_supplicant.conf
./wpacli reconfigure

You need to be able to execute it quickly.


Fire up the Palm Wifi Manager. Click the network you want to connect to. As username/password you need to enter anything, as these won't be used anyway. IMMEDIATELY switch to a terminal on your pre and execute the above script. You may need some tries to get the timing. Afterwards your pre should connect to the network AND think he's connected. Congratulations.


While this simple approach may work, it is not an long-run solution. At least on WebOS 2.1.2 process called PmWiFiService injects it's own configuration at random intervals and eventually will mess things up.

So we need a better way to inject our own configuration, and insist on it. Thus I wrote small wrapper wpa_supplicant.wrapper

Installation and usage:

  1. turn off wifi
  2. connect to Your WebOS device and copy original binary file:
    # cp /usr/sbin/wpa_supplicant /usr/sbin/wpa_supplicant.real'
  3. put this file on wpa_supplicant's place and rename it:
    # cp /media/internal/wpa_supplicant.wrapper /usr/sbin/wpa_supplicant
  4. put customized config in /media/internal/.wpa_supplicant.conf or any other convenient place. Remember - passwords are stored in that file.
  5. Update configuration file location in WPA_CONFIG variable
  6. from [1] download package with correct architecture (HP veer uses armel)
  7. extract wpa_cli binary and copy it in place e.g.:
    # cp /media/internal/wpa_cli /usr/sbin
  8. correct permisions:
    # chmod 755 /usr/sbin/wpa_supplicant /usr/sbin/wpa_cli

Instalation is now completed

All networks defined in original wifi application will continue working and can be managed through original interface. Network settings in custom config file will overwrite definitions in built-in application. So for any configuration change in custom networks edit configuration file by Your favorite editor

To use it:

  • first define new network in the configuration file, use any option You wish, use wpa_supplicant config file format:
    • every option on single line,
    • "network={" and "}" and comment also in single line
    best way for now is to export settings from another system
  • then turn on wifi
  • from WiFi Preferences applet select "Join network"
    • enter name of the network You just configured
    • select security type - Open

Enjoy new wifi connection

Sample Configuration