View previous topic :: View next topic |
Author |
Message |
bhogg Tux's lil' helper
Joined: 29 Jun 2003 Posts: 96
|
Posted: Sun Sep 12, 2004 3:01 pm Post subject: Wireless configuration |
|
|
Hi all,
Hopefully someone else has had this problem and can offer a quick solution.. google isn't turning up many answers this time.
I can get wireless up and running (after a few attempts) using variations of iwconfig, iwconfig eth1 essid <>, iwconfig eth1 key <>, ifconfig eth1 up, etc.. but I'd obviously like to have an automatic way of getting the essid, connecting, seeing if there's a key, and so on.
Previously, my /etc/init.d/net.eth1 restart command would scan for an AP, find one, then attempt to connect but fail (WEP) - but that was when I was using ndiswrapper. I'm now using a native driver and can get it working using the commands above, but now the net.eth1 script is producing the following error:
Code: |
# /etc/init.d/net.eth1 restart
* Running preup function
* Configuring wireless network for eth1
/sbin/runscript.sh: line 667: error: command not found
* Failed to configure wireless for eth1
* preup eth1 failed
|
/sbin/runscript.sh doesn't even have 667 lines, so I have no idea how to get this resolved. It would be nice to get this working (in priority of essid, somehow letting this script use the /etc/conf.d/wireless script and it's key values) - and not have to su each time I want wireless up.
Thanks,
Brian |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
bhogg Tux's lil' helper
Joined: 29 Jun 2003 Posts: 96
|
Posted: Mon Sep 13, 2004 1:03 am Post subject: |
|
|
Awesome, that got it up and running enough to be usable!
Is there a graphical UI to the script that allows for resetting wireless as a user, or selecting from a list of AP's when they are of the same level of preference? (or for auto-attaching to hot spots as needed)
Thanks again,
Brian |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Sep 13, 2004 6:36 am Post subject: |
|
|
bhogg wrote: | Is there a graphical UI to the script that allows for resetting wireless as a user, or selecting from a list of AP's when they are of the same level of preference? (or for auto-attaching to hot spots as needed) |
No
However, it is possible to give user permissions to restart network devices. And the way the script works no preferences have the same level - they just work in the order you specify.
And it works well with hotspots too!
Just set the default IP to dhcp and you're away. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
bhogg Tux's lil' helper
Joined: 29 Jun 2003 Posts: 96
|
Posted: Mon Sep 13, 2004 11:31 am Post subject: |
|
|
Just a couple quick questions in case you know them off hand:
I'm occasionally getting an error scanning (usually with dhcp enabled) at this point:
Code: |
* Configuring wireless network for eth1
* Scanning for access points
/sbin/runscript.sh: line 541: 20 Signal level: syntax error in expression (error token is "Signal level")
/sbin/runscript.sh: line 541: 20 Signal level: syntax error in expression (error token is "Signal level")
|
It still appears to work, just not sure how to get rid of it, or what it's affecting.
Also, is there a way to specify a gateway by ESSID in the wireless configuration file? In /etc/conf.d/net, you usually specify a separate gateway="ethx/192.168.0.1" line as it's not passible to ifconfig.
Thanks,
Brian |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Sep 13, 2004 11:56 am Post subject: |
|
|
bhogg wrote: | I'm occasionally getting an error scanning (usually with dhcp enabled) at this point:
Code: |
* Configuring wireless network for eth1
* Scanning for access points
/sbin/runscript.sh: line 541: 20 Signal level: syntax error in expression (error token is "Signal level")
/sbin/runscript.sh: line 541: 20 Signal level: syntax error in expression (error token is "Signal level")
|
|
A few people have reported that to me - I think I have a fix. I can't be sure as I've never seen the problem myself :/
Here's a link to a hopefully fixed version - could you test it for me please?
http://rsm1.demon.co.uk/~roy/downloads/wireless.sh
(just drop it in /etc/init.d)
Quote: |
Also, is there a way to specify a gateway by ESSID in the wireless configuration file? In /etc/conf.d/net, you usually specify a separate gateway="ethx/192.168.0.1" line as it's not passible to ifconfig.
|
Code: | gateway_ESSID="192.168.0.1" |
The script puts in the interface (ethx) in for you _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
bhogg Tux's lil' helper
Joined: 29 Jun 2003 Posts: 96
|
Posted: Fri Sep 17, 2004 6:15 pm Post subject: |
|
|
The script did seem to fix the (intermittant) error, but seemed to try to connect my disconnected eth0 a few times during the course of the script. I ended up flipping back to the old script to kill that.
I also modified it to stop forcing preferred connections to the aps if they weren't found (in case they're hidden) since they will never be hidden.
I am running into a strange problem... is there any way to reconfigure the script to connect to the AP with the greatest signal strength? I've got one spot I go to that has multiple APs named the same essid, and it keeps trying to establish a connection with the weakest of the group. If they weren't bridged and named something different I could get around it, but no such luck...
Thanks again! |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Sat Sep 18, 2004 11:01 pm Post subject: |
|
|
bhogg wrote: |
I am running into a strange problem... is there any way to reconfigure the script to connect to the AP with the greatest signal strength? I've got one spot I go to that has multiple APs named the same essid, and it keeps trying to establish a connection with the weakest of the group. If they weren't bridged and named something different I could get around it, but no such luck... |
Unfortunately, I cannot do that. I just tell the driver "assoicate with ESSID foobar" - which AP called foobar your card associates with is entirely upto the driver.
Yours sounds like an interesing scenario - I'm sure if you emailed the driver developers they could help you out more _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
|