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

Sunday, May 5, 2013

Arch Linux Iomega IConnect

I got an iConnect a few years ago. 1 Ghz processor, 256 MB RAM, Gigabit Ethernet, Wireless Card, 4 USB Ports (3 Usable).

Quite a good machine to run embedded Linux on. I had it running various services such as OWFS 1-Wire, XRF Wireless from Ciseco and other testing projects.

Anyway, one day I was tinkering and I broke it. It had to do with the bloody Arch Linux updates and Kernel modules. It was in a heap and was useless. I was busy being distracted by other projects, so the iConnect was put offline and joined the grave yard of stalled/unfinished projects.

One day, recently, I talked to Dr Google about hacking the iConnect.

I came across a couple of interesting links dealing with installing Debian on the iConnect.

http://scriptkiller.de/en/a54/computer_electronics/hacking_the_iomega_iconnect/

http://www.kroonen.eu/wiki/Debian%20iConnect

Really excellent links. You should have a read if you are interested in this type of stuff.

The link that was really the money shot was

http://pawelwozniak.info/index.php/embedded-linux/iconnect/126-install-archarm-linux-on-iconnect

It contains all the information required to install Arch Linux on the iConnect.

I used the Sarkfun FTDI Basic Breakout - 5V which I got from Cool Components to gain console access. I modified it to use 3.3V rather then the hotter 5V. Perfect.

The final update is to set the arcNumber from 1682 to 2870. This gives you access to the specific hardware in the iConnect, such as LEDS and the button.

They are located in:

/sys/class/leds

This is what you get:


iconnect:blue:otb -> ../../devices/platform/leds-gpio/leds/iconnect:blue:otb
iconnect:blue:power -> ../../devices/platform/leds-gpio/leds/iconnect:blue:power
iconnect:blue:usb1 -> ../../devices/platform/leds-gpio/leds/iconnect:blue:usb1
iconnect:blue:usb2 -> ../../devices/platform/leds-gpio/leds/iconnect:blue:usb2
iconnect:blue:usb3 -> ../../devices/platform/leds-gpio/leds/iconnect:blue:usb3
iconnect:blue:usb4 -> ../../devices/platform/leds-gpio/leds/iconnect:blue:usb4
iconnect:led_level -> ../../devices/platform/leds-gpio/leds/iconnect:led_level
iconnect:red:power -> ../../devices/platform/leds-gpio/leds/iconnect:red:power
rt2800pci-phy0::assoc -> ../../devices/pci0000:00/0000:00:01.0/leds/rt2800pci-phy0::assoc
rt2800pci-phy0::quality -> ../../devices/pci0000:00/0000:00:01.0/leds/rt2800pci-phy0::quality
rt2800pci-phy0::radio -> ../../devices/pci0000:00/0000:00:01.0/leds/rt2800pci-phy0::radio



http://archlinuxarm.org/forum/viewtopic.php?f=27&t=2612

Great work. Costs no money, so Woo Hoo!!

I plan to use to use it for Project Janus. It will use an iButton key fob or an RFID card to control some devices. There will also be other sensors in the loop for status updates, PIR and perhaps some audio component. Cool....

Sunday, July 29, 2012

Arch Linux Raspberry PI Wirelss USB Edimax EW-7811Um

I got an Edimax EW-7811Um a few days ago on eBay from Peats, actually. Nice, really small. Just what I wanted for a wireless project I have for the Raspberry PI (RPI) running Arch Linux.

I had a wrestle with it for a few hours, trying to get it working.

I was able to get it working using a number of different sources.

Here all the sources are combined into one Recipe, that works.

I have two RPIs and used this method to configure the card on the second RPI, after the first one was working. so I know it works

I started with a fully upto date OS, e.g. pacman -Syu will do this.


The life saver link was Edimax EW-7811Un USB-Wifi adapter.

Here is what I did:

Download and compile the drivers
 
1. wget http://myplugbox.com/rtl8188C_8192C_usb_linux_v3.4.3_4369.20120622.tar.gz

Get the driver

2. tar xzf rtl8188C_8192C_usb_linux_v3.4.3_4369.20120622.tar.gz

Extract the doings

3. cd rtl8188C_8192C_usb_linux_v3.4.3_4369.20120622

Change to the directory

4. nano Makefile

Change KVER to what the current version is. It's currently set to: KVER := 3.1.9-31-ARCH+

I changed mine to 3.1.9-33-ARCH+

If in doubt use 'uname -a' to get the current kernel version.

5. make

This compiles the driver and takes about 10+ minutes

6. cp 8192cu.ko /usr/lib/modules/extramodules-3.1.9--raspberrypi/

Copy the new driver to a place that will be used to load it.

7. depmod -a

This wil find the new modules and write them to a file called something. I don't care.

8. sync ; reboot

9. Log back in and run lsmod

You should see the '8192cu' listed

So far, so good.

Now to configure for automatic loading of the driver and settings.

10. nano /etc/rc.conf and modify the line

MODULES=(8192cu !rtl8192cu)

This stops the rtl8192cu module that does not work for the USB Device and loads the 8192cu

11. nano /etc/rc.local

This makes sure that the required  programs are run at boot time.

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
wpa_supplicant -B -c /etc/wpa_supplicant/wpa_supplicant_special.conf -i wlan0
ifconfig wlan0 192.168.22.132 255.255.255.0
route add default gw 192.168.22.1

12. nano /etc/wpa_supplicant/wpa_supplicant_special.conf

This is all that is needed for wpa_supplicant. The other default settings are OK, I think.

# WPA-Personal(PSK) with TKIP and enforcement for frequent PTK rekeying
network={
        ssid="ESSIDtoUse"
        proto=WPA
        key_mgmt=WPA-PSK
        pairwise=TKIP
        group=TKIP
        psk="secret agent password in clear text or Hex"
        wpa_ptk_rekey=600
}

So far so good again.

13. sync ; reboot

14. Log back in

It might take a few minutes longer to login, as there are two network connection and the RPI may be getting confused.

If you run 'ifconfig', you should see the wlan0 card listed.

15. nano /etc/rc.conf

Comment out the Ethernet settings, so that the wire connection is no longer used.

#interface=eth0
#address=192.168.22.130
#netmask=255.255.255.0
#broadcast=192.168.22.255
#gateway=192.168.22.1

16. sync ; reboot

17. Log back in using the new Wireless IP Address.

Job done. Time for a beer and a quiet smirk.