OpenWrt Forum Archive

Topic: howto configure NL-251... prism2.5 in /etc/config/wireless

The content of this topic has been archived on 21 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

hi
normalement je parle francais mais je vais faire un effort.

i do not arrive has to make that  interfaces wlan0 is configured when openwrt start.
it is wrap with kamikaze from march 2007

with iwconfig wlan0 essid ... that work.
in short the only problem is to adapt the file of config

here my config files

root@OpenWrt:~# cat /etc/config/wireless
config wifi-device wlan0
option channel     1
config wifi-iface
        option device        wlan0   
        option mode          "ad-hoc"   
        option ssid          "bombolong"


root@OpenWrt:~# cat /etc/config/network
# Copyright (C) 2006 OpenWrt.org
config interface loopback
        option ifname   lo
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0
config interface lan
        option ifname   eth0
        option proto    static
        option ipaddr   192.168.0.65
        option netmask  255.255.255.0
config interface wifi0
option ifname wlan0
option proto static
option ipaddr 10.16.16.65
option netmask 255.0.0.0

card detected in demsg:

wifi0: NIC: id=0x8013 v1.0.0
wifi0: PRI: id=0x15 v1.1.0
wifi0: STA: id=0x1f v1.4.9
...
wifi0: Intersil Prism2.5 PCI: mem=0xa0000000, irq=9
wifi0: registered netdevice wlan0


if you are any experience with prism and kamikaze please help me smile

thank
dako

Currently you can not do this using /etc/options/wireless.  To implement it you would need to write a shell script to handle that type of card.  See the madwifi.sh script in packages/madwifi/files for an example.  This card type would then need to be recognised in /sbin/wifi and the new script called to handle the options.

In the mean time simply create a script using iwconfig and put it in /etc/init.d and link to it using /etc/rc.d

The script to do what you have in your /etc/config/wireless would look like:-

#!/bin/ash

iwconfig wlan0 mode ad-hoc
iwconfig wlan0 channel 1
iwconfig wlan0 essid  bombolong

i have do this
root@OpenWrt:~# cat /etc/init.d/prism
#!/bin/ash

iwconfig wlan0 mode ad-hoc
iwconfig wlan0 channel 1
iwconfig wlan0 essid  bombolong
iwconfig wlan0 rate 2M
ifconfig wlan0 10.16.16.65
root@OpenWrt:~# ls -l /etc/init.d/prism
-rwxr-xr-x    1 root     root          146 Jan  1 11:22 /etc/init.d/prism

but after reboot the iwconfig report this

root@OpenWrt:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wifi0     IEEE 802.11b  ESSID:"test"  Nickname:""
          Mode:Master  Access Point: Not-Associated   Bit Rate:11 Mb/s   
          Sensitivity=1/3 
          Retry limit:8   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
         
wlan0     IEEE 802.11b  ESSID:"test"  Nickname:""
          Mode:Master  Access Point: Not-Associated   Bit Rate:11 Mb/s   
          Sensitivity=1/3 
          Retry limit:8   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality:0  Signal level:0  Noise level:0
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

wat can i do to activate  /etc/init.d/prism  other than chmoding +x

thank

You have to put in link in /etc/rc.d

cd /etc/rc.d
ln -s /etc/init.d/prism S50prism

The S means this is a startup script and the 50 determines the order in which they are executed (they are sorted alphabetically (i.e. normal directory order) and executed in that order.  You should put this so that it is BELOW the number for the network script so that the ip address assignments are done after you have defined the wireless bits.

WWWAAAOUUUW


root@OpenWrt:~# iwconfig
lo        no wireless extensions.

eth0      no wireless extensions.

wifi0     IEEE 802.11b  ESSID:"bombolong"  Nickname:""
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 02:02:0D:41:8A:C0   
          Bit Rate=2 Mb/s   Sensitivity=1/3 
          Retry limit:8   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
         
wlan0     IEEE 802.11b  ESSID:"bombolong"  Nickname:""
          Mode:Ad-Hoc  Frequency:2.412 GHz  Cell: 02:02:0D:41:8A:C0   
          Bit Rate=2 Mb/s   Sensitivity=1/3 
          Retry limit:8   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=0/70  Signal level=-100 dBm  Noise level=-100 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:4  Invalid misc:16   Missed beacon:0


ok thank for help me.

i test the with second minipci now wink ( atheros)

dako

The discussion might have continued from here.