Skip navigation.

Posts tagged with "Wireless"

Setup Internet Gateway in Linux

,

1. If you want to configure a Linux machine to be Internet gateway, you need to configure the iptables. Add the following to the startup script.

# Delete and flush. Default table is "filter". Others like "nat" must be 
# explicitly stated.
iptables --flush           
iptables --table nat --flush
iptables --delete-chain    
iptables --table nat --delete-chain
   
# Set up IP FORWARDing and Masquerading
iptables --table nat --append POSTROUTING --out-interface eth0 \
         -j MASQUERADE
iptables --append FORWARD --in-interface eth1 -j ACCEPT
   
echo 1 > /proc/sys/net/ipv4/ip_forward  

A good tutorial on iptables

2. You can create your own startup script in /etc/init.d/ or just modify one of the scripts to
perform some customized tasks. Here is a video tutorial on Debian Startup scripts.

3. Gnome or KDE provides networking configuration GUI. It enables you to configure the network interfaces. The actual configuration file is /etc/network/interfaces. Somtimes you may find this configuration tool is not powerful enough, e.g., you want to configure the mode or frequency of your wirelss cards. In this case, you may need to put something in your startup scripts such as

iwconfig eth1 mode ad-hoc
iwconfig eth1 freq 2.457G
iwconfig eth1 channel 10
......

Install Orinoco USB in Debian Etch

,

This document is based on ORiNOCO USB Unofficial Complex Support Page and The Linux ORiNOCO Driver

1. Download kernel source files and compile kernel from source

If you have a pre-build kernel image with your distribution and do not want to download
the whole kernel source tree and rebuild it, just install the necessary header files

  apt-get install linux-headers-$(uname -r)

Howto: build Linux kernel module against installed kernel w/o full kernel source tree

By installing header files, you end up having

  /lib/modules/2.6.16-2-686/build -> /usr/src/linux-headers-2.6.16-2-686

My kernel version is 2.6.16-2-686

2. Download from SVN branch of orinoco-usb:

svn co \
https://orinoco.svn.sourceforge.net/svnroot/orinoco/branches/usb orinoco

3. Go to newly created by SVN "orinoco" folder and do:

  make
  make install

All modules including orinoco-usb should be installed without problems.

My current gcc version is 4.1. However, the kernel is pre-build using gcc4.0, so I also
installed gcc4.0. "orinoco" build uses gcc4.0. To force the compiler version, add "CC=gcc-4.x" after the make.

Note: if "make" gives you complain about missing "compat.h", just create an empty "compat.h" file in the the "orinoco" directory


4. Enter orinoco/firmware/

  make ezusb

As root

  cp orinoco_ezusb_fw  orinoco_usb_fw.h /usr/lib/hotplug/firmware/ 

All done! You can insert your orinoco-usb device now!

APE testbed V

, ,

PCMCIA Stuff

1.PCMCIA Error
Decide to disable kernel PCMCIA, use standlone PCMCIA package instead

2. Change the Makefile in "kernel" directory
@echo "#######################################################"
@echo "Installing PCMCIA"
@echo "#######################################################"
#rm -rf $(INSTALL_PATH)/etc/pcmcia
#$(MAKE) -C $(PCMCIA_DIR) install DIRS="cardmgr flash debug-tools etc"
$(MAKE) -C $(PCMCIA_DIR) install


3. Something wrong with orinicoo driver, so swith back to kernel support