On maemo device, connection can be easily configured by using Maemo PC Connectivity applets. It is possible to configure the following interfaces:
Network - sets a Usb network over TCP/IP between maemo device and host
PC
Mass storage - host PC can access maemo device as memory card
PC Suite - maemo device can be accessed by Nokia applications like
Nokia PC Suite. Diablo does not support PC Suite mode
Host - allows you to connect USB devices (external hard drives,
digital cameras, card readers, input devices, etc.) to your maemo device just
like a regular PC. Due to a hardware limitation, Fremantle does not
support Host mode
On host PC side (Linux, Windows and Mac OS), it is also provided some tools to make easier connection configuration. Next, it will be described how to establish connection between maemo device and host PC through Usb, Bluetooth and Wlan.
On Diablo, the Usb connection of a maemo device is configured to ``Mass storage'' by default. That is, when connected to a host PC, the maemo device will be visible as a memory card. On Fremantle, when maemo device is connected to host PC through Usb, it shows a pop-up where the Usb mode can be selected, ``Mass storage'' or ``PC Suite''. You should just click outside the pop-up to keep the mode previously set by Maemo PC Connectivity. With Maemo PC Connectivity, the Usb connection can be used in different ways beyond ``Mass storage'' and ``PC Suite'':
The description how to setup a Usb connection to ``Mass storage'', ``PC Suite'' and ``Host'' modes will be skipped since the configuration is just select and apply the desired mode on maemo device by using Maemo PC Connectivity. Next, it will be explained how to configure a Usb network over TCP/IP between maemo device and host PC through Maemo PC Connectivity. Before that, you have to install maemo-pc-connectivity meta package on maemo device and host-pc-connectivity package on host PC (Linux, Windows and Mac OS).
In order to setup a Usb network on maemo device, you should follow the steps bellow:
Once you have configured your Usb network through PC Connectivity Manager applet, you can enable or disable it by using Connection Switcher applet from status bar.
If you want, you can follow the steps bellow to configure Usb network manually on maemo device (Diablo):
auto usb0
iface usb0 inet static
address 192.168.2.15
netmask 255.255.255.0
To disable Usb network manually on maemo device (Diablo), follow the steps:
If you install host-pc-connectivity package, your Linux host PC is ready to Usb network.
Otherwise, you can configure your Linux host PC manually following the steps bellow:
SUBSYSTEM=="net", DRIVERS=="?*", GOTO="net_start"
to this line:
SUBSYSTEM=="net", GOTO="net_start"
If this workaround is not done, the usb0 interface will not get its IP address back when you unplug and plug back the maemo device to host PC. So, you should restart the network manually with the command ``/etc/init.d/networking restart'' to get usb0 IP address back. This is a known issue on Ubuntu (see related bug report here). On Debian, this workaround is not needed.
auto usb0 allow-hotplug usb0 mapping hotplug script grep map usb0 iface usb0 inet dhcp up iptables -t nat -A POSTROUTING -s 192.168.2.15 -j MASQUERADE up echo 1 > /proc/sys/net/ipv4/ip_forward down iptables -t nat -D POSTROUTING -s 192.168.2.15 -j MASQUERADE down echo 0 > /proc/sys/net/ipv4/ip_forward
With this configuration, you ensure that ifup usb0 command will setup the IP address correctly on host PC since it is using DHCP. Also, it allows maemo device to access Internet from host PC through usb0 interface.
If this results in a lot of ``Failed to bring up usb0'' errors, try again a few times. There can be a delay between host PC and maemo device become aware of each other. If it does not succeed with no error message, you can unplug and plug back the Usb cable. After, reconfigure Usb network on maemo device.
In order to get a Usb network between a Windows host PC and a Diablo maemo device, you should replace the original Diablo kernel by a new one that fixes some Usb issues. To replace the kernel, follow the next steps:
flasher-3.5 -k diablo_kernel_usbnet_windows/zImage -f -R
On Fremantle, the kernel is already fixed.
If you install host-pc-connectivity package, your Windows host PC is ready to Usb network. That is, the Windows will detect and configure the maemo device automatically when you plug it. Remember to activate Usb network on maemo device before plug it on Windows host PC.
If you did not choose DHCP option on maemo device, you need to configure the Usb network address through the application available at Start - Programs - Pc-Connectivity - UsbNetworking.
If you do not install host-pc-connectivity package, you have to configure the Usb network manually on your Windows host PC. For that, you should follow the steps bellow:
You have to follow the next steps to get a Usb network on Mac OS:
By using Maemo PC Connectivity, you can configure a Bluetooth network between maemo device and host PC, that is, you can setup connection attributes like IP address, network mask, etc. For that, you have to install maemo-pc-connectivity meta package on maemo device and host-pc-connectivity package on host PC (Linux, Windows and Mac OS).
In order to setup a Bluetooth network on maemo device, you should follow the steps bellow:
Once you have configured your Bluetooth network through PC Connectivity Manager applet, you can enable or disable it by using Connection Switcher applet from status bar.
If you install host-pc-connectivity package, your Linux host PC is ready to Bluetooth network.
Otherwise, you can configure your Linux host PC manually following the steps bellow:
auto bnep0 iface bnep0 inet dhcp up iptables -t nat -A POSTROUTING -s 192.168.3.15 -j MASQUERADE up echo 1 > /proc/sys/net/ipv4/ip_forward down iptables -t nat -D POSTROUTING -s 192.168.3.15 -j MASQUERADE down echo 0 > /proc/sys/net/ipv4/ip_forward
BLUETOOTH_ENABLED=1 ... PAND_ENABLED=1 ... PAND_OPTIONS="--listen --role=NAP -e bnep0"
sudo /etc/init.d/bluetooth restart
Note: the description how to configure Bluetooth on Windows host PC was based on BlueSoleil application. BlueSoleil is one of the most popular Windows Bluetooth application. If you do not use BlueSoleil, the screenshots bellow may differ from what you see in your host PC, but they can help to understand what you need to change on your Bluetooth application.
You should follow the next steps to get Bluetooth network configured in your Windows host PC (BlueSoleil):
If you install host-pc-connectivity package, your Mac OS host PC is ready to Bluetooth network.
Otherwise, you can configure your Mac OS host PC manually following the steps bellow:
By using Maemo PC Connectivity, you can configure a Wlan ad-hoc network on your maemo device, that is, you can setup connection attributes like IP address, network mask, etc. For that, you have to install maemo-pc-connectivity meta package on your maemo device.
To setup a Wlan ad-hoc on maemo device, proceed as follows:
Note: the WEP key should have 5, 10 or 13 characters (Example: aaaaa)
Once the Wlan network was configured, you can easily switch it on or off by using Connection Switcher applet from status bar.
The iwconfig command is the configuration utility in Linux for Wlan interfaces. It is used to set the parameters of the network interface which are specific to the wireless operation. The iwconfig command may also be used to display the parameters and the wireless statistics. It extracts these information from /proc/net/wireless file. By typing iwconfig command without any arguments, it will be displayed the current status of all wireless interfaces on the system. But for configuring your host PC to connect with your maemo device, you should execute the following steps as root user:
ifconfig wlan0 up iwconfig wlan0 mode Ad-Hoc iwconfig wlan0 essid devel_adhoc iwconfig wlan0 key off
It is recommended you set the wireless key to avoid unexpected remote connections. In this case, you should replace the last command by:
Note: you should type the same WEP key used on maemo device in hexadecimal digits (Example: aaaaa is 6161616161 in hexadecimal)
iwconfig wlan0 key 6161616161
To setup a Wlan ad-hoc network that allows others computers to connect to your Windows host PC, follow the next steps.
To configure a Wlan ad-hoc network on your Mac host PC, follow the steps:
Walter 2009-12-21