This is a discussion on Problem setting up wireless lan connection within the Linux Networking forums, part of the Linux Forums category; Hi, I try to connect my laptop with my Zaurus (linux PDA with wifi card) by wireless lan but with ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hi,
I try to connect my laptop with my Zaurus (linux PDA with wifi card) by wireless lan but with no succes. On both machines pinging the local cards work. However pinging form one box to the other does not work. I use 192.168.2.22 for the laptop and 192.168.2.23 for the pda. Furthermore the laptop has an eth0 to connect to the wired lan. Could anyone please help me getting this to work? Mike This is the output of iwconfig and ifconfig: laptop iwconfig wlan0 IEEE 802.11-b ESSID:"" Mode:Ad-Hoc Frequency:2.412GHz Cell: 00:00:00:00:00:00 Bit Rate:2Mb/s Tx-Power:2346 dBm Retry min limit:8 RTS thr:off Fragment thr:off Link Quality:0/92 Signal level:-69 dBm Noise level:-90 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 laptop ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:167 errors:0 dropped:0 overruns:0 frame:0 TX packets:167 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:14196 (13.8 Kb) TX bytes:14196 (13.8 Kb) usbd0 Link encap:Ethernet HWaddr 40:00:01:00:00:01 inet addr:192.168.129.201 Bcast:192.168.129.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:1 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 b) TX bytes:110 (110.0 b) wlan0 Link encap:Ethernet HWaddr 00:02:8A:A7:0B:F4 inet addr:192.168.2.23 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b) iwconfig laptop: wlan0 IEEE 802.11b ESSID:off/any Mode:Auto Frequency:2.412 GHz Access Point: 00:00:00:00:00:00 Bit Rate:11 Mb/s Tx-Power:20 dBm Sensitivity=0/3 RTS thr:2432 B Fragment thr:2432 B Encryption key:off Power Management:off Link Quality:100/100 Signal level:-95 dBm Noise level:-256 dBm Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0 Tx excessive retries:0 Invalid misc:0 Missed beacon:0 ifconfig laptop: eth0 Link encap:Ethernet HWaddr 00:C0:9F:3F:99:84 inet addr:192.168.1.2 Bcast:192.168.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6480 errors:0 dropped:0 overruns:0 frame:0 TX packets:6931 errors:0 dropped:0 overruns:0 carrier:0 collisions:2 txqueuelen:1000 RX bytes:4836842 (4.6 Mb) TX bytes:995496 (972.1 Kb) Interrupt:4 Base address:0x1c00 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:1731 errors:0 dropped:0 overruns:0 frame:0 TX packets:1731 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:617263 (602.7 Kb) TX bytes:617263 (602.7 Kb) wlan0 Link encap:Ethernet HWaddr 00:0B:6B:29:05:E9 inet addr:192.168.2.22 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:423 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 b) TX bytes:17766 (17.3 Kb) Interrupt:9 Memory:d0004800-d00048ff |
|
|||
|
"insomniux" <mike.bosschaert@hccnet.nl> wrote:
>Hi, >I try to connect my laptop with my Zaurus (linux PDA with wifi card) by >wireless lan but with no succes. On both machines pinging the local >cards work. However pinging form one box to the other does not work. I >use 192.168.2.22 for the laptop and 192.168.2.23 for the pda. >Furthermore the laptop has an eth0 to connect to the wired lan. > >Could anyone please help me getting this to work? > >Mike > >This is the output of iwconfig and ifconfig: >laptop iwconfig >wlan0 IEEE 802.11-b ESSID:"" Generally, you need an ESSID, and it has to match that of the device you are going to connect to. Hence you might use "bosschaert" as your ESSID, and on both devices when you do the iwconfig command include "essid bosschaert". >Mode:Ad-Hoc Frequency:2.412GHz Cell: 00:00:00:00:00:00 When the Cell: is filled with 00's it means there is no connection established. .... >laptop ifconfig I take it the label is wrong here, and you actually meant that this is the PDA, not the laptop (the IP matches what was described above for the PDA). .... >wlan0 Link encap:Ethernet HWaddr 00:02:8A:A7:0B:F4 >inet addr:192.168.2.23 Bcast:192.168.2.255 >Mask:255.255.255.0 .... >iwconfig laptop: >wlan0 IEEE 802.11b ESSID:off/any >Mode:Auto Frequency:2.412 GHz Access Point: >00:00:00:00:00:00 I.e., not connected. Note also that I'm not sure if setting it to "Mode:Auto" is going to work, or not. Apparently you want an Ad-Hoc network, with only two devices that talk to each other. That is as opposed to having an Access Point such as a router, and having one or more clients connecting to it. Is that correct? >ifconfig laptop: >eth0 Link encap:Ethernet HWaddr 00:C0:9F:3F:99:84 >inet addr:192.168.1.2 Bcast:192.168.1.255 >Mask:255.255.255.0 .... >wlan0 Link encap:Ethernet HWaddr 00:0B:6B:29:05:E9 >inet addr:192.168.2.22 Bcast:192.168.2.255 >Mask:255.255.255.0 You are missing two things. One is a proper iwconfig command for each of the two devices. Two is proper routing commands to send the IP packets to the right interface. Basically, you need this sequence of commands to initiate a wifi connection, 1) load the kernel module for the wifi card. 2) Configure the interface (wlan0 or whatever) using ifconfig. This binds an IP address to the interface. If the interface configuration is successful, "ifconfig wlan0" should indicate the interface is up. 3) Configure the wifi card using iwconfig. Several parameters *must* match between the two wifi devices that are expected to talk to each other. They must have the same ESSID, use the same encryption and key, be set for the same mode (Ad-Hoc or Managed). Hence the minimal command to use would look something like this: iwconfig wlan0 essid "myessid" mode Ad-Hoc \ key 1234567890 Following that command on both of the devices, using just "ifconfig wlan0" should show a Cell number that is not all 0's, thus indicating a connection has been made. If not, determine what parameters do not match between the two units, and use iwconfig to reconfigure one or the other. I'm not positive, but with an Ad-Hoc topology you might also need to specify the frequency (or channel) to force both units to the same channel. 4) You must use the route command to provide what ever routing your network requires. The ifconfig command sets a route for the subnet indicated by the IP address assigned to an interface, so if that is sufficient, nothing else is needed. If the IP address is a.b.c.d, the automatically set route will be masked for any a.b.c.x, where x is anything from 1 to 255. All other addresses require another route command to set up. A default gateway route also requires another command. Example: My LAN has address in the 192.168.0.x range. I have a wireless network, using managed mode and a router as an access point. All wireless units have IP addresses in the range of 192.168.1.x. On any given wireless unit, I have to add routes for 192.168.0.x addresses, and a default. route add -net 192.168.0.0 netmask 255.255.255.0 dev wlan0 Note that the netmask could be changed to 255.255.0.0, and the automatic route for 192.168.1.x could be deleted. Each unit then needs a default gateway route: route add default 192.168.0.2 dev wlan0 Note that on any host with both an ethernet and a wifi device, routes to both must be set manually *if* any IP address on those subnets are outside the range of the route set by ifconfig. 5) You must also have some sort of DNS, so that network names can be translated to IP addresses. I use static IP addresses and simply put them into /etc/hosts on all of my machines. A larger network, or one using DHCP, clearly needs something better. Okay, in your particular case it appears that the appropriate kernel modules have been loaded, so you do have a wifi device. The appropriate ifconfig commands have been run, and each device is listed as "up". But correct iwconfig commands do not appear to have been run. (You can use the "iwlist wlan0 scan" command to get an idea what each unit is seeing, which can be interesting and useful.) Given what you have described, the only additional routing commands you'll need will be to assign a default gateway. -- Floyd L. Davidson <http://web.newsguy.com/floyd_davidson> Ukpeagvik (Barrow, Alaska) floyd@barrow.com |
![]() |
| Thread Tools | |
| Display Modes | |
|
|