LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices

Reply
 
Search this Thread
Old 11-10-2005, 04:15 AM   #1
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Rep: Reputation: 15
Wireless USB Adaptor on Slackware


I'm trying to go fully wireless in my house and get my PC up and running with a USB wireless adaptor (it's a D-Link DWL-G122). I got the driver installed using ndiswrapper, and "ndiswrapper -l" does show me the driver loaded into memory. Next I did:

Code:
 
# modprobe ndiswrapper 
# ifconfig eth0 down 
# ifconfig eth1 down #I have 2 wired network cards in my comp.
# iwconfig wlan0 essid cupotea 
# iwconfig wlan0 mode managed 
# ifconfig wlan0 192.168.2.1 netmask 255.255.255.0 
# route add default gw 192.168.2.1 netmask 255.255.255.0 
# ifconfig wlan0 up
I don't get any errors along the way.

The problem I have is I can only see my PC's and the router on my internal network. I can ping these PC's and the router and I can visit my router homepage at 192.168.2.1 in a browser and it works OK. If I try to visit any external sites it says "[sitename] could not be found. Please check the name and try again." If I try and ping the external IP address of my router it says "connect: Network is unreachable" .... it's like it doesn't know the route and it's not using 192.168.2.1 as the gateway?

One more thing, I can't shut down my computer either. When I do "shutdown -h now" the screen fills up with this:

Quote:
ndiswrapper (wrap_reset_port:1040): reset failed: -22
ndiswrapper (wrap_reset_port:1040): reset failed: -22
ndiswrapper (wrap_reset_port:1040): reset failed: -22
ndiswrapper (wrap_reset_port:1040): reset failed: -22
etc etc ....
Sorry for the long post .... any suggestions are most welcome

Last edited by stokes; 11-10-2005 at 04:17 AM.
 
Old 11-10-2005, 04:22 AM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
I've just had something similar getting wireless going on my laptop under Gentoo. Came down to the default gateway. Rather than:
Code:
route add default gw 192.168.2.1 netmask 255.255.255.0
try:
Code:
route add default gw 192.168.2.1
and then try pinging external sites. Of course, ensuring /etc/resolv.conf is correct first. Don't know why it didn't like the netmask, but both at home + work it won't take it, yet my desktop machines (different card) need it set.
 
Old 11-10-2005, 01:21 PM   #3
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Original Poster
Rep: Reputation: 15
ok ... just tried that and it seems to make no difference.

Any other suggestions?
 
Old 11-12-2005, 03:27 PM   #4
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Original Poster
Rep: Reputation: 15
Any more suggestions anyone?? I really have no clue what to do next.
 
Old 11-12-2005, 05:34 PM   #5
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,790
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
Since you're using a static IP, you do need to set up your /etc/resolv.conf file to include your ISP's nameservers. My guess is that you could surf by IP address (for example, if you try to go to 64.179.4.149 you would end up here at LQ). So for each nameserver your ISP has, you need to add a line like this:

nameserver xxx.xxx.xxx.xxx

and replace the x's with the IP address.
 
Old 11-12-2005, 10:48 PM   #6
bbcar
LQ Newbie
 
Registered: Sep 2003
Location: New Mexico
Distribution: SUSE 8.0
Posts: 6

Rep: Reputation: 0
The problem sounds like the domain name server or gateway. For the gateway, fouldsy's suggestion should work (if you follow that by restarting the network /etc/rc.d/network restart). What does your file /etc/resolv.conf have? You don't want the first entry to be the router address (192.168.2.1)

--Bill
 
Old 11-13-2005, 03:42 AM   #7
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Original Poster
Rep: Reputation: 15
Thumbs up

Quote:
Originally posted by Hangdog42
Since you're using a static IP, you do need to set up your /etc/resolv.conf file to include your ISP's nameservers. My guess is that you could surf by IP address (for example, if you try to go to 64.179.4.149 you would end up here at LQ). So for each nameserver your ISP has, you need to add a line like this:

nameserver xxx.xxx.xxx.xxx

and replace the x's with the IP address.
It works!!! Thanks!
 
Old 11-25-2005, 09:17 AM   #8
DoctorWynn
Member
 
Registered: Nov 2005
Distribution: OpenSuSe 10.1
Posts: 63

Rep: Reputation: 15
Ok, I too am having this problem, but my resolv.conf file appears to be correct, according to what was mentioned above. Here are it's contents,

; generated by /sbin/dhclient-script
search Smiths
nameserver 192.168.2.1


My wireless connection works fine, but when I shutdown or reboot, that "wrap_reset_port:1040 reset failed -22" error repeats infinitely. I'm using Fedora Core 4, and this is a belkin usb adapter, model F5d7050 with ndiswrapper.

I'm new to Linux, but not computing, and I can usually figure these things out. This one, I'm stumped.
 
Old 11-25-2005, 09:45 AM   #9
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,790
Blog Entries: 1

Rep: Reputation: 414Reputation: 414Reputation: 414Reputation: 414Reputation: 414
First off, Welcome to LQ!

I'm afraid that error message (wrap_reset_port:1040 reset failed -22) has me stumped as well. Googling on it only brings up this thread. If this shutdown error is the only problem, I would post it at the ndiswrapper forum and see if one of the developers can help. They are probably going to suggest you use the latest version of ndiswrapper, so make sure you are.

If your problem is that you can't surf by name, it could be a couple of things. First off, can you surf by IP address? Also, from your resolv.conf file, it looks as if you are using DHCP to get an IP address for your wireless card. Are you sure that is happening? Check the output of ifconfig to make sure. Finally, while your resolv.conf entry should work, it couldn't hurt to add your ISP DNS servers and see if that makes a difference.
 
Old 11-27-2005, 03:51 AM   #10
stokes
Member
 
Registered: Oct 2005
Location: UK
Posts: 31

Original Poster
Rep: Reputation: 15
DoctorWynn: Are you still having this problem? I noticed a difference between your resolv.conf and mine. In mine my nameservers are listed at the top, and "search domain" is listed on the last line at the end. It could be worth trying - little things like this normally make a difference in Linux.

Hangdog42: to get around the "wrap_reset_port:1040 reset failed -22" problem I just kill the ndiswrapper process as part of the system shutdown ... perhaps not the most graceful approach but it does get around the problem.
 
Old 11-27-2005, 07:32 AM   #11
DoctorWynn
Member
 
Registered: Nov 2005
Distribution: OpenSuSe 10.1
Posts: 63

Rep: Reputation: 15
Quote:
Originally posted by stokes
DoctorWynn: Are you still having this problem? I noticed a difference between your resolv.conf and mine. In mine my nameservers are listed at the top, and "search domain" is listed on the last line at the end. It could be worth trying - little things like this normally make a difference in Linux.
Yes I am. And can't find any info on it anywhere but here. I will take a look at your suggestion today, and let you know how it goes. It's weird cuz everything works fine. The wireless connection is strong, but this error at shutdown causes me to have to turn off the box manually which I don't like doing for fear of screwing something up. But then again, this isn't windoze!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wireless USB adaptor by XMicro sirius_5 Mandriva 1 10-05-2005 10:10 PM
I would like to set up a linksys WUSB54G USB wireless adaptor on Slackware 10.0 insainiac Linux - Wireless Networking 2 10-25-2004 03:38 AM
wireless usb adaptor gsmwraith Linux - Wireless Networking 1 08-03-2004 01:35 PM
usb wireless adaptor TechQuest Linux - Wireless Networking 3 02-13-2004 08:45 AM
Wireless Adaptor (USB) walterw Linux - Wireless Networking 1 12-26-2002 02:18 PM


All times are GMT -5. The time now is 01:56 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration