January 25, 2014

So HP printer support in Linux typically excellent, and the P1102w is no exception. However, if you want to use it via wifi rather than USB you’re gonna have a bad time (unless you use Windows to perform the wireless setup, but who wants to do that?). I had hoped the hp-setup tool would be able to set up the printer’s wireless similar to the way the Windows tool does it. It has an option that seems to indicate that it could: wireless (option 3). Unfortunately, when I ran the utility it said that it could not detect a supported printer. I wasted a lot of time trying to figure out why it wasn’t working, then I found a better way.

(These instructions assume you’re using Ubuntu 12.04. If you’re not using Ubuntu you should be able to run hp-setup and it should detect your network printer after getting the wireless working.) Plug your printer into the computer. Ubuntu detects and configures it automatically as a USB printer. Next, you need this small python program: www.jspenguin.org/software/ewsgateway. Make sure python-usb and python-tk are installed on your system for this program to run. Launch the program. It will detect your printer. Select it from the list and click the start button. Afterward, click “Launch browser” to open up your printer’s web interface. Here you can configure all of the printers settings including wireless networks! When you’re done, close the webpage and click the stop button in the python program and close it. Your program should now be connected to your wireless network. You can disconnect the USB cable (and you might need to power cycle the printer for wireless to connect).

In your Ubuntu printer settings, you can delete the USB printer that was automatically configured. Then, click the add button. Expand the network printer list and you should see “HP LaserJet…” after a few moments. Select it and click forward. Accepting all of the default settings should be fine. Now, you have your wireless printer setup for Linux without having to resort to Windows.

September 13, 2011

This guide demonstrates how to enable Wifi AP mode for a Gumstix Overo, running Linux Kerenel 3.0.3 and Ubuntu 10.04. Setting up AP mode has very little documentation, so I hope this helps to bridge the gap.

Driver set-up

To get the Libertas SDIO thin-firmware driver working, you need to build the modules for your kernel. If you’re using a script to build your kernel see the note below first.

Copy the directory libertas_tf in drivers/net/wireless/ from the driver source tree into your own kernel source tree. You must patch the file drivers/net/wireless/Kconfig to include the following after the “config LIBERTAS_THINFIRM_USB” section.

config LIBERTAS_THINFIRM_SDIO
tristate "Marvell Libertas 8686 SDIO 802.11b/g cards with thin firmware"
depends on LIBERTAS_THINFIRM && MMC
---help---
A driver for Marvell Libertas 8686 SDIO devices and those that include
the 88W8686 core, such as the Wi2Wi devices. Special SDIO specific
firmware is required to use this driver, see the OLPC site for details:
<http://wiki.laptop.org/go/Thinfirm_1.5>

Prepare to build the kernel with the new modules. In menuconfig navigate to: Device Drivers—>Network device support—>Wireless LAN.

Select the following to build as modules.

Marvell 8xxx Libertas WLAN driver support with thin firmware

Marvell Libertas 8686 SDIO 802.11b/g cards with thin firmware

You should also ensure that Networking support—>Wireless—>Generic IEEE 802.11 Networking Stack (mac80211) is selected. I also took out the regular Marvell Libertas driver since I didn’t need its functionality. You may want to do the same.

NOTE: If you’re using a script to build your kernel, make sure it doesn’t replace the files you added to the source tree.

If you’re using this guide to build your kernel/filesystem. You will need to perform the following steps to get it working.

In build_kernel.sh comment out a few lines near the bottom of the file.

Firmware set-up

The thin-firmware and firmare helper must be placed in the /lib/firmware/ directory on the filesystem. Simply copy sd8686tf.bin and sd8686_helper.bin to /lib/firmware/ on the Gumstix filesystem.

hostapd set-up

The wireless interface cannot be manually set into AP mode, thus the hostapd software must be used. This involves natively compiling hostapd on the Gumstix Overo, so gcc and related tools are required to be installed. Cross-compilation has not been tested.

Copy the hostapd tarball to a suitable location on your Gumstix, extract it and navigate to the directory. Next, create the .config file.

$ cd hostapd
$ cp defconfig .config

Edit the file by by uncommenting the line “#CONFIG_DRIVER_NL80211=y”, i.e. removing the #. Then, build the program and then install it (as root).

$ make
# make install

Next you’ll want to set-up a configuration file for hostapd. In the directory that you just compiled hostapd, there is a sample hostapd.conf file you can use. Alternatively, here is a link to a basic hostapd.conf file that will get the wireless up and running with no encryption and the SSID set to “gumstix”. You can learn more about configuration here.

Loose-ends

You probably want your wireless card to be put into AP mode when the Gumstix boots. Below is an example of how to do that. (This is not the only way to do this.)

Create/edit the file /etc/network/interfaces to look like below. The wireless part is what is important so if you have some custom configuration already done in this file just edit/copy the wireless part (wlan0).

The example also assigns a static IP address to the wireless card. If you don’t do this, the network won’t work. Wireless clients also must have static IP addresses assigned unless you run a DHCP server on the Gumstix to automatically assign clients IP addresses. In Ubuntu the package dhcp3-server will provide that functionality. Here is an example .conf file for a dhcp3 server.