[arch-general] Ad hoc

Ralf Mardorf ralf.mardorf at alice-dsl.net
Thu Feb 9 05:22:56 EST 2012


The PPPoE connection works after running '# ifconfig eth0 up && netcfg pppoe' as usual.

After preparing ad hoc [1] I loaded the module by '# modprobe rtl8192se'.

Then I tried to run 'newlan -n', but it doesn't work [2].

1. How can I run 'newlan'?
2. Do I need to reboot to load the firmware?
3. Do I have to change the lines

modprobe -r ath_pci
modprobe ath_pci autocreate=adhoc

to something like

modprobe -r ath_pci
modprobe ath_usb autocreate=adhoc

when using an USB device?

[root at archlinux src]# modprobe -r ath_pci
FATAL: Module ath_pci not found.
[root at archlinux src]# modprobe ath_usb autocreate=adhoc
FATAL: Module ath_usb not found.
[root at archlinux src]# modprobe ath_pci
FATAL: Module ath_pci not found.

Rebooting now without a starting the adhoc script or loading the module at startup ...

Regards,
Ralf

********** [1] ****************************************
[spinymouse at archlinux ~]$ cd /usr/src

[spinymouse at archlinux src]$ wget
http://launchpadlibrarian.net/33927923/rtl8192se_linux_2.6.0010.1012.2009.tar.gz

[spinymouse at archlinux src]$ su

[root at archlinux src]# tar -xzOf rtl8192se_linux_2.6.0010.1012.2009.tar.gz \
>  rtl8192se_linux_2.6.0010.1012.2009/firmware/RTL8192SE/rtl8192sfw.bin > \
>  /lib/firmware/RTL8192SU/rtl8192sfw.bin

[root at archlinux src]# ls /lib/firmware/RTL8192SU/rtl8192sfw.bin -hAl
-rw-r--r-- 1 root root 75K Feb  9 10:19 /lib/firmware/RTL8192SU/rtl8192sfw.bin

[root at archlinux src]# exit

[spinymouse at archlinux src]$ wget https://aur.archlinux.org/packages/ne/newlan/newlan.tar.gz

[spinymouse at archlinux src]$ tar xzf newlan.tar.gz

[spinymouse at archlinux src]$ cd newlan

[spinymouse at archlinux newlan]$ makepkg -si

[spinymouse at archlinux newlan]$ cd ..

[spinymouse at archlinux src]$ leafpad adhoc

[spinymouse at archlinux src]$ cat adhoc
#!/bin/bash
####### this part should change or simply be removed depending on the network card
#recreates the ath0 interface in ad hoc mode
modprobe -r ath_pci
modprobe ath_pci autocreate=adhoc
wlanconfig ath0 destroy
wlanconfig ath create wlandev wifi0 wlanmode adhoc
#######

#starts the ad hoc server
ifconfig ath0 down
iwconfig ath0 mode ad-hoc
iwconfig ath0 channel 4
iwconfig ath0 essid 'mine'
ifconfig ath0 10.0.0.1 up

#forwards the ad hoc network to the router
iptables -A FORWARD -i ath0 -o eth0 -s 10.0.0.0/24 -m state --state NEW -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
sh -c "echo 1 > /proc/sys/net/ipv4/ip_forward"

********** [2] ****************************************
[root at archlinux src]# sudo newlan -n mynewprofile
This application was designed for ArchLinux, to run anyway add --force.
[root at archlinux src]# sudo newlan --force -n mynewprofile

WARNING: Application execution forced, use at own risk.

ArchLinux netcfg Easy Wireless LAN 1.0.0.8

Invalid argument, try 'newlan --help' for more information.

[root at archlinux src]# newlan --help
This application was designed for ArchLinux, to run anyway add --force.
[root at archlinux src]# newlan --force --help

WARNING: Application execution forced, use at own risk.

ArchLinux netcfg Easy Wireless LAN 1.0.0.8

Invalid argument, try 'newlan --help' for more information.

[root at archlinux src]# newlan --force -n mynewprofile

WARNING: Application execution forced, use at own risk.

ArchLinux netcfg Easy Wireless LAN 1.0.0.8

Invalid argument, try 'newlan --help' for more information.



More information about the arch-general mailing list