Author |
Message |
parkinpants
|
Posted: Sun Aug 14, 2005 5:22 am |
|
Joined: Sun Jul 24, 2005 4:15 pm
Posts: 170
|
Hi,
I have configured my Asus PCMCIA WL07G card to work on Knoppmyth. However I now want it configure to my network when Knoppmyth boots up. Someone mentioned that it needs to be done in accordance with 'run-levels'.
I also have an integrated ethernet port on my motherboard. This works fine on boot-up but 'stalls' if it isn't connected. Likewise the wireless card 'stalls' on boot up because at that point I haven't yet executed the following commands:
To find and log onto wireless network
Code: iwlist wlan0 scanning iwconfig wlan0 key 534A-5F66-EG iwconfig wlan0 essid MYNETWORKNAME Set wireless connection as primary deviceCode: ifconfig eth0 down netcardconfig (Choose Wlan0 device and activate DHCP broadcast) ifconfig eth0 up netcardconfig (Choose eth0 device and activate DHCP broadcast) My Guide To Getting Ndiswrapper WorkingI have made a guide (below) for setting up my card using ndiswrapper if it helps anyone else. Will be complete once I find out how to get it work on boot-up. #Insert CD containing ASUS WL07G Windows XP Drivers, then do: #(or just download the driver and put it in e.g /usr/src) Code: mount/dev/cdrom ndiswrapper –i /cdrom/Driver/WinXP/RT2500.INF Code: ndiswrapper –m ndiswrapper –hotplug modprobe ndiswrapper ndiswrapper –l You should now see: Driver present, Hardware Detected Code: ifconfig wlan0 up iwconfig
You should now see a device for wlan0 #Find and log onto wireless network (this is specific to a wireless router set to infra-structure mode with no access point restriction.... but a WEP key instead.) Code: iwlist wlan0 scanning iwconfig wlan0 key XXXX-XXXX-XX (if WEP key is set on the router) iwconfig wlan0 essid YOUR_NETWORK_NAME
#Set wireless connection as primary device Code: ifconfig eth0 down netcardconfig
Choose Wlan0 device and activate DHCP broadcast Code: ifconfig eth0 up netcardconfig
Choose eth0 device and activate DHCP broadcast
Usage Of Wireless Connection
You can use Putty on Windows to access the mythbox via wireless connection:
1. Download Putty.exe onto Windows PC
2. # ifconfig (to get inet address of wlan0 on mythtbox)
3. Open Putty and enter the inet address and port number of mythbox.
4. You will also want to start Samba on the mythbox so that you can drag and drop media files from the PC to the mythbox
More information at….
http://ndiswrapper.sourceforge.net/medi ... stallation
Last edited by parkinpants on Sat Oct 01, 2005 4:47 pm, edited 5 times in total.
|
|
Top |
|
 |
Xsecrets
|
Posted: Sun Aug 14, 2005 9:03 am |
|
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location:
Nashville, TN
|
search the forum for /etc/network/interfaces
editing that file will let you stop your ethernet from attempting to come up and bring up your wireless.
_________________ Have a question search the forum and have a look at the KnoppMythWiki.
Xsecrets
|
|
Top |
|
 |
parkinpants
|
Posted: Sun Aug 14, 2005 3:02 pm |
|
Joined: Sun Jul 24, 2005 4:15 pm
Posts: 170
|
Hi,
I've looked at various threads from a search, including many on which I see you have commented...
I can disable eth0 no problem, so that no longer hangs....
my current interfaces confg is now....
-----------------------
auto lo wlan0
iface lo inet loopback
wireless_essid (my network name)
#(I have removed WEP key from my router)
iface wlan0 inet dhcp
------------------
Now it 'stalls' on startup as many others have described when doing List to DHCP.....etc
To get it working manually from this configuration I then have to do
iwlist wlan0 scanning
iwlist wlan0 essid PARKYSPLACE
netcard config
(enable wlan0 DHCP)
-------------------------------
I keep going round in circles with this problem!
Do I have to add the line 'ndiswrapper' at the bottom of /etc/modules?
|
|
Top |
|
 |
Xsecrets
|
Posted: Sun Aug 14, 2005 3:17 pm |
|
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location:
Nashville, TN
|
you've got a few things out of order.
try
Code: auto lo wlan0
iface lo inet loopback
iface wlan0 inet dhcp wireless_mode managed wireless_essid (my network name) #(I have removed WEP key from my router) wireless_key 26digithexkeyhere
or to keep things just a little bit more clean and easy to follow. Code: auto lo iface lo inet loopback
auto wlan0 iface wlan0 inet dhcp wireless_mode managed wireless_essid (my network name) #(I have removed WEP key from my router) wireless_key 26digithexkeyhere
_________________ Have a question search the forum and have a look at the KnoppMythWiki.
Xsecrets
|
|
Top |
|
 |
parkinpants
|
Posted: Mon Aug 15, 2005 4:05 pm |
|
Joined: Sun Jul 24, 2005 4:15 pm
Posts: 170
|
hmm, tried both sets of configurations you just gave me but it still hangs "when listening to DHCP on wlan0" on startup.
Had a look at both the Wiki and other forum posts with the same solution but it just doesn't seem to be happening for me.
Does it matter where nidswrapper is /etc/modules ?
I just put it at the bottom of the file. Is there anything else I need to have done, I read somethng about ~/modutils/
Is one of the commands in that network config file the equivalent of iwlist wlan0 scanning? this command is necessary for me to use when I manually connect.
thanks
|
|
Top |
|
 |
Xsecrets
|
Posted: Mon Aug 15, 2005 5:40 pm |
|
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location:
Nashville, TN
|
you can try moving nwiswrapper higher in the modules file, modutils is no longer used in R5 and no none of those commands does iwlist, however in my experience and I have used nwiswrapper with debian you do not have to do that as long as you have your essid in your interfaces file.
_________________ Have a question search the forum and have a look at the KnoppMythWiki.
Xsecrets
|
|
Top |
|
 |
parkinpants
|
Posted: Fri Aug 19, 2005 8:43 am |
|
Joined: Sun Jul 24, 2005 4:15 pm
Posts: 170
|
I tried moving ndiswrapper up the list in the modules but still no luck. When it 'stalls' on startup I use CTRL + C to carry on
(This is not a complete extract of the error msg:)
-----------------------
sit0: unknown hardware address type 776
sit0: unknown hardware address type 776
Listening On LPF/wlan0/00:11:d8:38:00
Sending On LPF/wlan0/00:11:d8:38:00
Socket/fallback/fallback.net
No DHCP Offers received
No working leases.....
----------------------------------------------
Other unusual behaviour is that the interfaces file reverts back after reboot sometimes - the essid command is missing! It doesn't always do this though. At first I thought maybe I was being dopey and didn't save the file before reboot but now that its done it a few times I'm confused and suspicious.
So anyway I still need to run these 3 commands manually to get it running:
iwlist wlan0 scanning
iwconfig wlan0 essid NETWORKNAME
netcardconfig
None of the examples on other posts work for me - is there no other way to do this? Can these lines be added to any other bootup files?
Help!
|
|
Top |
|
 |
Xsecrets
|
Posted: Fri Aug 19, 2005 3:05 pm |
|
Joined: Mon Oct 06, 2003 10:38 am
Posts: 4978
Location:
Nashville, TN
|
instead of using those commands try ifdown wlan0 and ifup wlan0 these use the interfaces file, and if you can make them work it should come up on boot.
_________________ Have a question search the forum and have a look at the KnoppMythWiki.
Xsecrets
|
|
Top |
|
 |
parkinpants
|
Posted: Sat Aug 20, 2005 4:10 am |
|
Joined: Sun Jul 24, 2005 4:15 pm
Posts: 170
|
Hi
Ok, my current /etc/network/interfaces file:
auto lo
iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp
The system has once again removed the essid commad on its own accord. In any case I've added the following lines to the bottom of /etc/init.d/bootmisc.sh
iwlist wlan0 scanning
iwconfig wlan0 essid NETWORKNAME
ifup wlan0
Now, each time I restart I get a different result!
When the ndiswrapper driver is initiialised on startup it does a scan for the network. This initial scan is temperamental, sometimes it finds and connects to "daemon".... not sure what this is? But other times it stalls whilst listening to DHCP.
In any case, when it executes the 3 lines I added to bootmisc.sh it ALWAYS connects! Likewise, it ALWAYS connects if I run those commands manually.
So the remaining problems are:
1. Sometimes it stalls when doing the initial scan (stall point is after loading ndiswrapper and before running portmap). Is there a way just to disable this initial search and rely on my bootmisc.sh alterations?
2. If the initial scan connects, and then so does the 2nd scan, this causes the frontend to hang. If I try to manually reboot or shutdown it hangs at "stopping portmap". If I do netcardconfig manually before a shutdown it says something about a "pump" already running. I imagine this problem will be solved when the above problem is solved.
|
|
Top |
|
 |
g.kallqvist
|
Posted: Mon Aug 29, 2005 11:44 am |
|
Joined: Mon Aug 29, 2005 11:29 am
Posts: 15
|
I got my wireless card (netgear wg311 v2) up and running this way:
ndiswrapper -i [the XP .inf filoe from CD]
ndiswrapper -m (to get ndiswrapper into modules...)
modprobe ndiswrapper (to start the card)
netcardconfig
Finally (to load it at startup) put the following in /etc/network/interfaces (the part with wlan0):
pre-up modprobe ndiswrapper
post-down rmmod ndiswrapper
Good luck!
|
|
Top |
|
 |
parkinpants
|
Posted: Tue Sep 20, 2005 6:29 am |
|
Joined: Sun Jul 24, 2005 4:15 pm
Posts: 170
|
hi,
thanks for the tip but not there yet!
It doesn't always find the network with 1 scan....so
1. How can I tweak the bootup script/s so that the scan command is repeated for say 3 or 4 times until it gives up
2. How do I get it to only initiate the DHCP command in the event that the specified essid name is found (in order to stop it hanging/stalling on bootup.. DHCP listening on port xxx).
It seems far more likely to find the network using the commands I added to the /etc/init.d/bootmisc.h file rather than the standard commands in /etc/network/interfaces: these being....
iwlist wlan0 scan
iwconfig wlan0 essid PARKYSPLACE
ifup wlan0
so...
3. How can I stop it from initiating DHCP from the standard bootup attempt, but in doing so leave the interfaces file intact so that I can still initiate ifupwlan0 from the bootmisc.h file.
==================
by the way....
when it fails to connect it does come up with:
sit0: unknown hardware address type 776
(where it then refers to: www.isc.org/dhcp-contrib.html)
Also, in my BIOS at the startup I notice...
IRQ 12 - serial bus controller
IRQ 12 - multimedia contoller
IRQ 12 - serial cardbus bridge
IRQ 12 - display device
The ndiswrapper is using IRQ 12
Could this possibly be due to an IRQ conflict or am I stabbing at straws now?
Shall I just bite the bullet and blame Asus and get a Netgear Cardbus device instead?
help!
|
|
Top |
|
 |
parkinpants
|
Posted: Tue Sep 20, 2005 9:34 am |
|
Joined: Sun Jul 24, 2005 4:15 pm
Posts: 170
|
ok,
I decided to update to the latest version of DHCP. This caused it to stop executing the DHCP command on bootup whether through the etc/network/interfaces file or otherwise, the command "ifup wlan0" would also not work manually (netcardconfig still works).
I have now had success by changing the additions to my bootmisc.sh file to....
iwlist wlan0 scanning
iwconfig wlan0 essid PARKYSPLACE
dhclient wlan0 (instead of ifup wlan0)
ifconfig wlan0 inet 192.168.0.50 (default is 192.168.0.2 and can cause conflicts with other machines connected to the router)
iwconfig wlan0 bitrate 54 (default is only a humble 11)
So, now it will not stall on bootup providing the wireless card is pointing towards my router. Given that this involves having my mythbox backwards I am now going to play around with adapting a tin can to radiate the signal.
There are a few error messages on bootup now but at least it doesn't stall (which is the main thing). Perhaps if I comment out the contents of the interfaces file it may get rid of the error messages in any case, or delve into some other files to do with ndiswrapper, either way I don't care.
|
|
Top |
|
 |
tkoster
|
Posted: Tue Sep 20, 2005 5:56 pm |
|
Joined: Mon Apr 04, 2005 10:50 am
Posts: 120
|
You follow pretty much the same procedure I have in installing ndiswrapper, though I have never had to do so much monkeying with the settings. For me after the initial set up, if I run "ndiswrapper -m" it will forever try to load the module. The only thing I have needed to do after the fact (apart from the key settings for WEP) is run netcardconfig. However, I have found that it only works properly if the ifconfig wlan0 is down.
So I have followed your basic procedure up to where you say "ifconfig eth0 down", at that point I do "ifconfig wlan0 down" as well. At that point netcardconfig (choose wlan0), is able to set things properly and everything has worked smoothly thereafter. Every attempt with with wlan0 up has ended up with a big mess because it is trying to remake the connection that has already been made.
I'm not if that gets at all of your issues, but it fits my experience.
|
|
Top |
|
 |
parkinpants
|
Posted: Wed Sep 21, 2005 3:31 am |
|
Joined: Sun Jul 24, 2005 4:15 pm
Posts: 170
|
ok,
just to clarify....
the monkeying around was only in order to get it to connect automatically on startup, netcardconfig always worked but this program is gui controlled and has to be done manually.
The commands referring to eth0 are slightly specific to my system in that I have an ethernet port (built into motherboard) in addition to a wireless card, if you don't have an ethernet card then you can ignore lines relating to eth0, in fact rather than do ifconfig eth0 up (and down) you could instead just comment out the lines for eth0 in the /etc/network/interfaces file. Another option is to disable it in the BIOS if you don't use it at all.
The only thing I could do with now is some Linux code equivalent to this Visual Basic Pseudocode effort of mine:
X = 0
Do While X < 4
iwlist wlan0 scan
If iwconfig essid = PARKYSPLACE Then
set encryption key
initiate DHCP (dhclient)
set IP address
set bitrate
Else
X=X+1
End If
Loop
This would search for a network 3 times before giving up and if it didn't find my specified network then it wouldn't initiate DHCP and thus wouldn't stall for 3 minutes on bootup in order to look for one. (Next question, how would you then get it to connect to any available network rather than one with a predetermined name?)
Any programmers out there that can turn this into real code?
Also if I was to get a signal 'dropout' then there is no auto reconnect feature (like with XP SP2 god bless it) and so I'd have to go in manually to reconnect. This means my moma can't use hairdryers in the house.
|
|
Top |
|
 |
parkinpants
|
Posted: Sat Sep 24, 2005 4:37 pm |
|
Joined: Sun Jul 24, 2005 4:15 pm
Posts: 170
|
slight development,
Right, I mentioned that I was suspicious of a conlict with IRQ 12, knowing that my PVR 350 and wireless card both use that number.
I today ripped out my PVR 350 (having realised that my imagination thought it was a DVB-T card). My computer now locks up when it attempts to access the wlan0 device on bootup... at the point "ndiswrapper using IRQ 12"
I pull the wireless card out, Knoppmyth loads up fine.
So, I re-install Knoppmyth.
Whilst setting up ndiswrapper it now locks up when I get to:
ifconfig wlan0 up
(again it says "ndiswrapper using IRQ 12")
Its almost as if the wireless card won't work at all without the tv card in (strange but true)... and yet it causes random system lockups when it is working.
My proposed solution....
new wireless card
new tv card
|
|
Top |
|
 |