Showing posts with label wireless. Show all posts
Showing posts with label wireless. Show all posts

Friday, 24 July 2009

Ad-Hoc Wireless Network Troubles

Now that I have the Edimax IP Camera working I want it to connect to my Toshiba NB100 netbook computer as simply as possible - the idea is to use it when we are away on holiday so I don't want to have to set up a whole network with an access point etc. Instead I just want to set up an ad-hoc network between the computer and the IP Camera.
According to the instructions this should be easy - I tell the IP Camera to connect to an ad-hoc network called 'bentv', and then use NetworkManager in the Ubuntu desktop of the netbook to create the ad-hoc network.
This works fine on my main laptop, but fails on the netbook.
It turns out that NetworkManager is not capable of putting the wireless card into ad-hoc mode.
The work around was to have the script to start the VLC viewer shutdown network manager and set up the network manually as follows:

#!/bin/sh
/etc/init.d/NetworkManager stop
ifconfig ath1 down
wlanconfig ath1 destroy
wlanconfig ath1 create wlandev wifi0 wlanmode adhoc
iwconfig ath1 essid bentv
iwconfig ath1 channel 1
iwconfig ath1 192.168.1.35
iwconfig ath1 netmask 255.255.255.0
ifconfig ath1 up

vlc --fullscreen rtsp://192.168.1.17/ipcam.sdp

/etc/init.d/NetworkManager start

This is based on information I found here.
This seems to work, but the wireless networking is a bit iffy after the script exits - I might have to do the wlanconfig destroy bit again to put it into infrastructure mode.

Sunday, 2 November 2008

Wireless Networking in Linux on Fujitsu Siemens Amilo Li2727 laptop

I have a Fujitsu Siemens Amilo Li2727 laptop, which has a built in wireless network card.
Ubuntu Linux 8.10 detects the card as an AR242X (by typing lspci), but the madwifi driver compatibility page says it should be an AR5007EG.

The symptoms are that wireless networking does not work at all. dmesg reports:
"wifi%d: unable to attach hardware: 'Hardware revision not supported' (HAL status 13)".
No wifi devices present when doing ifconfig, iwconfig etc. There is one odd device (pan0) - I don't know what this is!

There are quite a few forum posts about this problem - they say that the madwifi driver can solve the problem, but you need to download a patch and re-compile the driver. When you download the patch the README file says the instructions are out of date, and you should use the updated madwifi driver as described in http://madwifi.org/ticket/1192. That page gives a link to the driver source code and the compilation instructions are stored in http://madwifi.org/wiki/UserDocs/FirstTimeHowTo. I followed these - they were very easy - first deleting the Ubuntu supplied copy of the madwifi driver, then compiling and installing the new one.

After re-booting I have two devices - wifi0 and ath0. iwconfig reports that ath0 has wifi extensions, so this looks promising.

Tried iwlist ath0 scanning - it reported that the network was down.
did ifconfig ath0 up. Then iwlist ath0 scanning says has no scan results, which is wrong because I am sat next to a wireless router...

Had a look at http://ubuntuforums.org/showthread.php?t=669267.
This got me looking at the Hardware Drivers manager in System/Administration - this said that there was a proprietary driver for the wireless card activated, so maybe this is intefering with things? Deactivated it..and rebooted again..

To start with, no wireless at all, but doing 'modprobe ath-pci' gave the following when I typed dmesg:

ath_hal: module license 'Proprietary' taints kernel.
[ 159.942692] AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133, RF2425, RF2417)
[ 160.035904] ath_pci 0000:08:00.0: PCI INT A -> GSI 18 (level, low) -> IRQ 18
[ 160.035939] ath_pci 0000:08:00.0: setting latency timer to 64
[ 160.534217] MadWifi: ath_attach: Switching rfkill capability off.
[ 160.541042] wifi0: Atheros AR2425 chip found (MAC 14.2, PHY SChip 7.0, Radio 10.2)
[ 160.559097] ath_pci: wifi0: Atheros 5424/2424: mem=0xfa000000, irq=18
[ 198.800025] ath0: no IPv6 routers present

At least there are no errors....but still iwlist reports no scan results.

Another thing I have read about is that the Amilo does not power up the wireless adapter automatically - could the radio transmitter be switched off?

The madwifi compatibility page pointed to this article:
http://madwifi.org/wiki/UserDocs/MiniPCI#FujistsuSiemensAmiloLi2727withAtherosAR2425AR5007EG802.11abgPCI-erev01
This talks about downloading the acerhk hotkey driver source and compiling it, but
I found that it is already installed in ubuntu and doing 'modprobe acerhk' ran it without error.
I pressssed Fn-F1 a few times and nothing happened (apparantly), then I realised that to make the wifi led light you have to do that in software (echo on > /proc/driver/acerhk/wirelessled). Doing this put the led on, and iwlist ath0 scanning gave me a list of access points - Success!!!

It seems that the acerhk driver has the code to switch on the wireless transmitter by doing the echo command above, but the Fn-F1 key does not work.

Now the procedure to get wireless networking working after boot is:
modprobe ath-pci
modprobe acerhk
echo on > /proc/driver/acerhk/wirelessled
ifdown ath0
ifup ath0

This needs automating!...