Networking Forums

Networking Forums > Computer Networking > Linux Networking > How to debug wifi (MADWIFI) code?

Reply
Thread Tools Display Modes

How to debug wifi (MADWIFI) code?

 
 
Ignoramus20594
Guest
Posts: n/a

 
      03-29-2006, 05:45 PM
I have issues with Madwifi wireless connections.

I tried both WEP and WPA encryption (with wpa_supplicant).

Both do not work. With WEP, I can seemingly connect to the station
(iwconfig shows some stats suggesting such), but cannot route packets
to wireless. With wpa_supplicant, it is unable to take the key that
wpa_passphrase generated due to failing ioctl (looks like it chokes on
a big key).

Anyway, wpa_supplicant is a nice program because it prints a lot of
debugging information. Kudos to its author.

With WEP, though, I am operating completely in the dark.

Is there some way to debug WEP connections and to see details of
conversations between the wireless card and access point?

I did spend a lot of time reading docs, faqs, etc, but the results
are not positive yet. I am ready to invest more time into this.

I want to ask a favor from everyone, if you do not have any real
suggestions (meaning never set up wireless on linux), to avoid posting
comments that are not helpful. All helpful comments will be gratefully
received.

i

 
Reply With Quote
 
 
 
 
Unruh
Guest
Posts: n/a

 
      03-29-2006, 08:40 PM
Ignoramus20594 <(E-Mail Removed)> writes:

>I have issues with Madwifi wireless connections.


>I tried both WEP and WPA encryption (with wpa_supplicant).


>Both do not work. With WEP, I can seemingly connect to the station
>(iwconfig shows some stats suggesting such), but cannot route packets
>to wireless. With wpa_supplicant, it is unable to take the key that
>wpa_passphrase generated due to failing ioctl (looks like it chokes on
>a big key).


>Anyway, wpa_supplicant is a nice program because it prints a lot of
>debugging information. Kudos to its author.


>With WEP, though, I am operating completely in the dark.



Wireless has absolutely nothing to do with routing.
If dhcp gave you an ip address (ifconfig -a) then your wireless works, and
you are connected. Thereafter your routing problems are a totally separate
issue.


route -n will tell you what your routes are.

>Is there some way to debug WEP connections and to see details of
>conversations between the wireless card and access point?


>I did spend a lot of time reading docs, faqs, etc, but the results
>are not positive yet. I am ready to invest more time into this.


>I want to ask a favor from everyone, if you do not have any real
>suggestions (meaning never set up wireless on linux), to avoid posting
>comments that are not helpful. All helpful comments will be gratefully
>received.


>i


 
Reply With Quote
 
Ignoramus20594
Guest
Posts: n/a

 
      03-29-2006, 08:59 PM
On 29 Mar 2006 20:40:29 GMT, Unruh <unruh-(E-Mail Removed)> wrote:
> Ignoramus20594 <(E-Mail Removed)> writes:
>
>>I have issues with Madwifi wireless connections.

>
>>I tried both WEP and WPA encryption (with wpa_supplicant).

>
>>Both do not work. With WEP, I can seemingly connect to the station
>>(iwconfig shows some stats suggesting such), but cannot route packets
>>to wireless. With wpa_supplicant, it is unable to take the key that
>>wpa_passphrase generated due to failing ioctl (looks like it chokes on
>>a big key).

>
>>Anyway, wpa_supplicant is a nice program because it prints a lot of
>>debugging information. Kudos to its author.

>
>>With WEP, though, I am operating completely in the dark.

>
>
> Wireless has absolutely nothing to do with routing.
> If dhcp gave you an ip address (ifconfig -a) then your wireless works, and
> you are connected. Thereafter your routing problems are a totally separate
> issue.


I want to have a static IP on that network. The Access Point is not a
DHCP server and I would prefer not to use DHCP.


>
> route -n will tell you what your routes are.


Yes, sure, I tried route -n, routes looked perfectly legit, and yet
ping did not work.

Maybe this is a trivial problem, but I doubt it.

That is why I am asking, *is there some way to debug just what is
happening between the wireless card and access point*.

i

 
Reply With Quote
 
Ignoramus20594
Guest
Posts: n/a

 
      03-29-2006, 09:22 PM
Just for anyone's information, I just found out that to debug madwifi,
I need to use athdebug. It then does a lot of printk calls.

i

 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      03-29-2006, 10:09 PM
Ignoramus20594 <(E-Mail Removed)> writes:

>On 29 Mar 2006 20:40:29 GMT, Unruh <unruh-(E-Mail Removed)> wrote:
>> Ignoramus20594 <(E-Mail Removed)> writes:
>>
>>>I have issues with Madwifi wireless connections.

>>
>>>I tried both WEP and WPA encryption (with wpa_supplicant).

>>
>>>Both do not work. With WEP, I can seemingly connect to the station
>>>(iwconfig shows some stats suggesting such), but cannot route packets
>>>to wireless. With wpa_supplicant, it is unable to take the key that
>>>wpa_passphrase generated due to failing ioctl (looks like it chokes on
>>>a big key).

>>
>>>Anyway, wpa_supplicant is a nice program because it prints a lot of
>>>debugging information. Kudos to its author.

>>
>>>With WEP, though, I am operating completely in the dark.

>>
>>
>> Wireless has absolutely nothing to do with routing.
>> If dhcp gave you an ip address (ifconfig -a) then your wireless works, and
>> you are connected. Thereafter your routing problems are a totally separate
>> issue.


>I want to have a static IP on that network. The Access Point is not a
>DHCP server and I would prefer not to use DHCP.


Fine. Make it static. You could do that by having dhcp deliver the same
address always from the router. A key issue is that the router has to know
what your address is, so it can send stuff to you. You have to figure out
how to get your router to do that. Most wireless routers expect y ou to
connect using dhcp, but can deliver a static address via dhcp. I am not
sure if they will allow an automatic assignment without dhcp.



>>
>> route -n will tell you what your routes are.


>Yes, sure, I tried route -n, routes looked perfectly legit, and yet
>ping did not work.


You have admitted that you do not know what is happening, yet you tell us
that your route is fine. Why not post it here, so we can see ourselves if
it is fine.



>Maybe this is a trivial problem, but I doubt it.


>That is why I am asking, *is there some way to debug just what is
>happening between the wireless card and access point*.




>i


 
Reply With Quote
 
Ignoramus20594
Guest
Posts: n/a

 
      03-29-2006, 10:15 PM
On 29 Mar 2006 22:09:00 GMT, Unruh <unruh-(E-Mail Removed)> wrote:
> Ignoramus20594 <(E-Mail Removed)> writes:
>
>>On 29 Mar 2006 20:40:29 GMT, Unruh <unruh-(E-Mail Removed)> wrote:
>>> Ignoramus20594 <(E-Mail Removed)> writes:
>>>
>>>>I have issues with Madwifi wireless connections.
>>>
>>>>I tried both WEP and WPA encryption (with wpa_supplicant).
>>>
>>>>Both do not work. With WEP, I can seemingly connect to the station
>>>>(iwconfig shows some stats suggesting such), but cannot route packets
>>>>to wireless. With wpa_supplicant, it is unable to take the key that
>>>>wpa_passphrase generated due to failing ioctl (looks like it chokes on
>>>>a big key).
>>>
>>>>Anyway, wpa_supplicant is a nice program because it prints a lot of
>>>>debugging information. Kudos to its author.
>>>
>>>>With WEP, though, I am operating completely in the dark.
>>>
>>>
>>> Wireless has absolutely nothing to do with routing.
>>> If dhcp gave you an ip address (ifconfig -a) then your wireless works, and
>>> you are connected. Thereafter your routing problems are a totally separate
>>> issue.

>
>>I want to have a static IP on that network. The Access Point is not a
>>DHCP server and I would prefer not to use DHCP.

>
> Fine. Make it static. You could do that by having dhcp deliver the same
> address always from the router. A key issue is that the router has to know
> what your address is, so it can send stuff to you. You have to figure out
> how to get your router to do that. Most wireless routers expect y ou to
> connect using dhcp, but can deliver a static address via dhcp. I am not
> sure if they will allow an automatic assignment without dhcp.


That's a very good point.

I would be willing to settle for DHCP if that makes it work.

The issue I had was that even though I had all routes set up seemingly
perfectly, and did ping of something, the RX/TX values on the ifconfig
output were still zeroes.

>
>
>>>
>>> route -n will tell you what your routes are.

>
>>Yes, sure, I tried route -n, routes looked perfectly legit, and yet
>>ping did not work.

>
> You have admitted that you do not know what is happening, yet you tell us
> that your route is fine. Why not post it here, so we can see ourselves if
> it is fine.
>


Thanks. I will try to do that tonight. Maybe I will set up a webpage
with several outputs from several tries, trying different things.

i

>
>>Maybe this is a trivial problem, but I doubt it.

>
>>That is why I am asking, *is there some way to debug just what is
>>happening between the wireless card and access point*.

>
>
>
>>i

>


 
Reply With Quote
 
Mark South
Guest
Posts: n/a

 
      03-30-2006, 08:17 AM
On Wed, 29 Mar 2006 22:09:00 +0000, Unruh wrote:

> Ignoramus20594 <(E-Mail Removed)> writes:
>
>>On 29 Mar 2006 20:40:29 GMT, Unruh <unruh-(E-Mail Removed)> wrote:
>>> Ignoramus20594 <(E-Mail Removed)> writes:
>>>
>>>>I have issues with Madwifi wireless connections.
>>>
>>>>I tried both WEP and WPA encryption (with wpa_supplicant).
>>>
>>>>Both do not work. With WEP, I can seemingly connect to the station
>>>>(iwconfig shows some stats suggesting such), but cannot route packets
>>>>to wireless. With wpa_supplicant, it is unable to take the key that
>>>>wpa_passphrase generated due to failing ioctl (looks like it chokes on
>>>>a big key).
>>>
>>>>Anyway, wpa_supplicant is a nice program because it prints a lot of
>>>>debugging information. Kudos to its author.
>>>
>>>>With WEP, though, I am operating completely in the dark.
>>>
>>>
>>> Wireless has absolutely nothing to do with routing.
>>> If dhcp gave you an ip address (ifconfig -a) then your wireless works, and
>>> you are connected. Thereafter your routing problems are a totally separate
>>> issue.


And can the OP ping external IP addresses, eg 66.94.234.13 for yahoo.com?

>>I want to have a static IP on that network. The Access Point is not a
>>DHCP server and I would prefer not to use DHCP.

>
> Fine. Make it static. You could do that by having dhcp deliver the same
> address always from the router. A key issue is that the router has to know
> what your address is, so it can send stuff to you. You have to figure out
> how to get your router to do that. Most wireless routers expect y ou to
> connect using dhcp, but can deliver a static address via dhcp. I am not
> sure if they will allow an automatic assignment without dhcp.


Having fixed addresses delivered by dhcp to each MAC address is the best
solution.

Also, as you hint in your last line, some home routers will not route from
static IP addresses (ie, those they didn't assign themselves) to the
outside of the LAN.
--
mark south; echo (E-Mail Removed)|tr a-z n-za-m
"I can trace my ancestry back to a protoplasmal primordial atomic
globule. Consequently, my family pride is something inconceivable."
-- Gilbert & Sullivan, The Mikado

 
Reply With Quote
 
Ignoramus27088
Guest
Posts: n/a

 
      03-30-2006, 01:00 PM
On Thu, 30 Mar 2006 10:17:02 +0200, Mark South <(E-Mail Removed)> wrote:
> On Wed, 29 Mar 2006 22:09:00 +0000, Unruh wrote:
>
>> Ignoramus20594 <(E-Mail Removed)> writes:
>>
>>>On 29 Mar 2006 20:40:29 GMT, Unruh <unruh-(E-Mail Removed)> wrote:
>>>> Ignoramus20594 <(E-Mail Removed)> writes:
>>>>
>>>>>I have issues with Madwifi wireless connections.
>>>>
>>>>>I tried both WEP and WPA encryption (with wpa_supplicant).
>>>>
>>>>>Both do not work. With WEP, I can seemingly connect to the station
>>>>>(iwconfig shows some stats suggesting such), but cannot route packets
>>>>>to wireless. With wpa_supplicant, it is unable to take the key that
>>>>>wpa_passphrase generated due to failing ioctl (looks like it chokes on
>>>>>a big key).
>>>>
>>>>>Anyway, wpa_supplicant is a nice program because it prints a lot of
>>>>>debugging information. Kudos to its author.
>>>>
>>>>>With WEP, though, I am operating completely in the dark.
>>>>
>>>>
>>>> Wireless has absolutely nothing to do with routing.
>>>> If dhcp gave you an ip address (ifconfig -a) then your wireless works, and
>>>> you are connected. Thereafter your routing problems are a totally separate
>>>> issue.

>
> And can the OP ping external IP addresses, eg 66.94.234.13 for yahoo.com?


no.

>>>I want to have a static IP on that network. The Access Point is not a
>>>DHCP server and I would prefer not to use DHCP.

>>
>> Fine. Make it static. You could do that by having dhcp deliver the same
>> address always from the router. A key issue is that the router has to know
>> what your address is, so it can send stuff to you. You have to figure out
>> how to get your router to do that. Most wireless routers expect y ou to
>> connect using dhcp, but can deliver a static address via dhcp. I am not
>> sure if they will allow an automatic assignment without dhcp.

>
> Having fixed addresses delivered by dhcp to each MAC address is the best
> solution.
>
> Also, as you hint in your last line, some home routers will not route from
> static IP addresses (ie, those they didn't assign themselves) to the
> outside of the LAN.


That Netgear is an access point, not a router. In any case, I tried
using DHCP, and it did not work.

Some facts from yesterday:

1) I have a Linksys wireless ROUTER (wifi plus 4 ports), and in
insecure mode, I was able to connect and use the network just fine,
with a script of mine. (that's how I am typing this right now)

2) I am trying to get a Netgear WG102 ACCESS POINT to work with WEP
encryption. I am not interested in running in insecure mode.

3) The WG102 is plugged into the Linksys router and is pingable and
accessible if I am connected to the network.

4) I get the followig output from trying to connect to WG102:

+ ifconfig ath1 down
+ ifconfig wifi1 down
+ iwconfig ath1 essid IgorNetgear
+ iwconfig ath1 key s:EatFish
+ iwconfig ath1 ap off
+ sleep 1
+ iwconfig ath1 ap 00:0F:B5A:CA:E8
+ sleep 1
+ ifconfig ath1 up
+ iwconfig ath1 txpower 100mW
+ iwconfig ath1 rate 54M auto
+ sleep 3
+ ifconfig wifi1 192.168.1.91
+ iwconfig ath1
ath1 IEEE 802.11g ESSID:"IgorNetgear" Nickname:"IgorsLaptop"
Mode:Managed Frequency:2.427 GHz Access Point:
00:0F:B5A:CA:E8
Bit Rate:1 Mb/s Tx-Power=19 dBm Sensitivity=0/3
Retryff RTS thrff Fragment thrff
Encryption key:4561-7446-6973-68 Security mode:restricted
Power Managementff
Link Quality=55/94 Signal level=-40 dBm Noise level=-95
dBm
Rx invalid nwid:433596 Rx invalid crypt:0 Rx invalid
frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0

However, when trying to set up routes, or even just use dhclient
ath1 or dhclient wifi1, it does not hear anything. Nothing is
pingable.

i




 
Reply With Quote
 
lurker@nowhere.com
Guest
Posts: n/a

 
      03-30-2006, 02:45 PM
I was having a similar problem recently until I added these lines before
my iwconfig ath0 lines:

wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode sta

A google search says these aren't needed if you are using the madwifi
drivers past January 23rd. The key in your iwconfig output that is
similar to mine is the 'Bit Rate:1 Mb/s' while 'Link Quality' looked OK
and the ESSID got set. I also noticed the 'Rx invalid nwid:' going up.


Just checked, I'm running gentoo and claim to have the 20060207 version
of madwifi, but still need the wlanconfig commands to get going.
Hope this helps.

 
Reply With Quote
 
Ignoramus27088
Guest
Posts: n/a

 
      03-30-2006, 03:34 PM
On Thu, 30 Mar 2006 14:45:55 GMT, (E-Mail Removed) <(E-Mail Removed)> wrote:
> I was having a similar problem recently until I added these lines before
> my iwconfig ath0 lines:
>
> wlanconfig ath0 destroy
> wlanconfig ath0 create wlandev wifi0 wlanmode sta
>
> A google search says these aren't needed if you are using the madwifi
> drivers past January 23rd. The key in your iwconfig output that is
> similar to mine is the 'Bit Rate:1 Mb/s' while 'Link Quality' looked OK
> and the ESSID got set. I also noticed the 'Rx invalid nwid:' going up.
>
>
> Just checked, I'm running gentoo and claim to have the 20060207 version
> of madwifi, but still need the wlanconfig commands to get going.
> Hope this helps.
>


Wow, this looks like your symptoms were similar AND that you were able
to get resolution. My madwifi drivers are two days old (checked them
out with subversion and compiled myself), but, as you say, maybe I
should try it.

Yes, indeed, the 1 Mb/s number looked bogus, so, I am greatly hoping
that this is the issue that is the same as yours.

I will try your suggestion tonight and will report on the progress.

Just curious:

what is the difference between ath0 and wifi0? Why two devices? What
are their respective roles? I was unable to find my answer.

Which one do you route your network through? Do you have a script that
does your connection? Can you post it? (sans passwords, of course)?

Thanks a lot!

i

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Ubiquiti SRC & MadWifi Filo_Flame Wireless Internet 1 11-30-2007 12:01 PM
madwifi, atheros, htb tricky Linux Networking 0 06-07-2006 01:09 PM
Code 12 installing PCMCIA Wifi glaurent Wireless Networks 1 11-21-2005 08:12 PM
help compiling madwifi drivers AA Linux Networking 2 09-19-2004 11:46 PM
Device Cannot Start [code 10] on netgear wifi adapter Colin Coles Wireless Internet 7 02-26-2004 04:14 PM



1 2 3 4 5 6 7 8 9 10 11