[LINUX] HOW-TO get a Sitecom 802.11n external USB WiFi adapter to work on a AppleTV
#1
This is the rough sequence I used to get the same Sitecom W353 802.11n USB card in this thread working under pin's Ubuntu AppleTV image. As with my OSX experiments with this card, quite a bit of fiddling was done and it's been a while since I did anything in Ubuntu, so this write up probably glosses over a few small details and includes things that aren't strictly essential.

You will need:

a) USB Hub
b) USB Keyboard
c) Drivers from the Realtek website

I have Ubuntu 10.10 running in a virtual machine on my laptop. I used this to mount the external drive that I had previously imaged with pin's Ubuntu 8.04 and copy the RTL8188SU_usb_linux_v2.6.6.0.20101111.zip driver file into the filesystem. I've done this as I don't have Ethernet anywhere near the AppleTV and thus I couldn't copy it over to the running system via the network. It's also possible to put the drivers on a flash stick and mount that locally, but it's up to you how you do it.

With the AppleTV booted from the Ubuntu image, drop the command line by keying Ctrl+Alt+F1. Login with xbmc/xbmc. The first thing we need to do is remove NetworkManager as this conflicts with the CLI method of configuring the Realtek driver.

Code:
sudo aptitude remove network-manager network-manager-gnome

Assuming the driver .zip file is in /home/xbmc:

Code:
cd /home/xbmc/
tar zxvf rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20100930.tar.gz
cd rtl8712_8188_8191_8192SU_usb_linux_v2.6.6.0.20101111/

now we compile the driver

Code:
make
./clean

and then load the .ko file:

Code:
insmod 8712u.ko

for good measure I've copied the .ko file to the kernel modules:

Code:
mkdir /lib/modules/2.6.24-28-generic/kernel/net/wireless/8712u
cp 8712u.ko /lib/modules/2.6.24-28-generic/kernel/net/wireless/8712u/

now start the interface

Code:
ifconfig wlan0 up

test that iwconfig shows the card

Code:
iwconfig

and then see what networks are in range

Code:
iwlist scan

wlan0     IEEE 802.11bgn  ESSID:"MEDIAWLAN"  Nickname:"rtl_wifi"
          Mode:Managed  Frequency:2.417 GHz  Access Point: 90:84:0D:D5:AB:66  
          Bit Rate:150 Mb/s   Sensitivity:0/0  
          Retry:off   RTS thr:off   Fragment thr:off
          Power Management:off
          Link Quality=66/100  Signal level=66/100  Noise level=0/100
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

Now we need to create permanent configuration for the WLAN

Code:
touch /etc/wpa_supplicant.conf
nano /etc/wpa_supplicant.conf
Below is the configuration that worked for me. You will need to modify the content to match your own WLAN settings (Google wpa_supplicant.conf for plenty of examples):

Code:
network={
    pairwise=CCMP
    group=CCMP
    ssid="MEDIAWLAN"
    proto=RSN
    key_mgmt=WPA-PSK
    psk=7db1c7fc31d6e82bd1269a319ea6a43c600003e4318fd4a1efcc0ace6c78a612
    }

now put the equivalent into /etc/network/interfaces. NB: I had a few issues with DHCP originally but putting a static IP in /etc/network/interfaces appears to have cured things. The following works fine for my Apple TimeCapsule access point which is configured for WPA2 security:

Code:
# The primary network interface
auto wlan0
# iface eth0 inet dhcp
iface wlan0 inet static
address 192.168.1.20
netmask 255.255.255.0
gateway 192.168.1.1
broadcast 192.168.1.255
wpa-driver wext
wpa-ssid MEDIAWLAN
wpa-ap-scan 1
wpa-proto RSN
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk 7db1c7fc31d6e82bd1269a319ea6a43c600002e4318fd4a1efcc0ace6c78a612

Create a shell script in /etc/init.d/networking called wireless-restart and put the following two lines in it:

Code:
!#/bin/sh
/etc/init.d/networking restart

Now create a symlink for this in /etc/rcS.d so that it's run at startup - the contents of the folder are executed sequentially in numerical order; hence it starts with 42 (always a good number) after S40networking which it's dependent upon.

Code:
ln -s /etc/init.d/wireless-restart /etc/rcS.d/S42wireless-restart

By this point you should have a working card anyway, but you should be able to reboot and have everything still work afterwards. So far my own experiences with it have been okay. Ubuntu is clearly a lot faster than OSX for some things, although starting streams from my NAS box over SMB isn't as smooth as using AFP under OSX and I suspect there's still a few bugs to be worked on. The Ubuntu image needs to have its version of XBMC updated (if you're wanting 10.0) and the CrystalHD drivers updated. installing the most recent version of Dharma also messes up the keymap for the Apple remote, although it's just a case of editing the file and putting VolumeUp and VolumeDown in the right place again. Minor stuff, but enough to remind me that this is clearly a work in progress.

Christian
Reply
#2
Hi!

After entering
sudo aptitude remove network-manager network-manager-gnome

i loose network connection. Well will a user loose ethernet connection with this mod?
Reply
#3
I've no idea, partly as I'm only using wireless. The reason for removing network manager is that the drivers state it conflicts with the WEXT method of configuring the card. I had a load of problems getting DHCP to work which improved once this was gone, I made so many changes around the same time it could simply be changing to a static IP that sorted the problem. Do some experimentation - maybe it's not true.
Reply
#4
as a boot-note to this HOWTO, i've been working with the lead developer for the OpenELEC project and support for Realtek 8172/8188/8192SU chipset USB WLAN cards should be included in their next release candidate (RC2). If you've not experimented with OpenELEC as an alternative AppleTV OS ..you should!

http://openelec.tv <= click me Smile
Reply
#5
I'm using openelec for already some time now and i like it very much. I have also seen that the support for this chipset will be added.

At the moment i miss component output but i hope this will be also added in the near future.

Great.
Reply

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO get a Sitecom 802.11n external USB WiFi adapter to work on a AppleTV0