Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 18
Hi, I'm having problems with an embedded linux platform and a wireless access point. I want my network to be as follows: ADSL wireless BB router (and DHCP server) -> ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    19

    DHCP problems with a WAP


    Hi,

    I'm having problems with an embedded linux platform and a wireless access point. I want my network to be as follows:
    ADSL wireless BB router (and DHCP server) -> WAP (wireless access point acting as client, DHCP server not enabled) -> switch -> embedded platform

    However the embedded platform sends out its DHCP discover request (noted by using wireshark on a linux PC) but nothing responds.

    However
    ADSL BB router -> WAP -> switch -> Linux PC and Windows PC get IP addresses
    ADSL BB router -> switch -> swtich -> embedded platform gets IP address
    but
    ADSL BB router -> WAP -> embedded platform doesn't get IP addreess

    So the Linux PC and a Windows PC all successfully can use all combinations of switches and WAP to get IP addresses using DHCP but the embedded device and the WAP don't get on.

    I've also tried a hub instead of a switch incase that makes a difference but it doesn't.

    I've looked through the DHCP discover packets using Wireshark from all machines and I can't spot anything obvious (the only 3 differences I could see I bodged in ipconfig.c (length of packet, whether the packet allows fragmentation, stay alive timeout) but still no joy).

    I've looked for updates to the ethernet driver for my embedded platform but nothing. The embedded platform is using kernel 2.6.21.3 so quite old however I am not able to upgrade the kernel to the latest as there are too many driver patches for the platform that I know nothing about and have been warned that the platform experts expect to take a week to do a kernel upgrade so it would take me much longer. I have tried applying various IP patches I've found around but nothing has worked so far.

    Any ideas gratefully received (assume a certain level of ignorance about IP as you can probably tell by my waffle above) as well as telling me to try a more appropriate forum.

    Rachel

    PS The WAP is a Edimax EW-7206APg, the ADSL BB router is a NETGEAR DG834GT if that makes a difference. The ethernet driver the platform is using is 8139too.

  2. #2
    Linux Guru
    Join Date
    Jul 2004
    Posts
    4,593
    I'm not sure if I understand the problem exactly, but this is how I had to set up my AP.

    Connect the AP to the router using a wired LAN connection. A switch should make no difference, as it passes the packets through. Then have the router assign a permanent IP address to the AP.

    I actually have added a second switch before the AP, and it didn't make any difference. I hope this helps you some.
    Please do not send Private Messages to me with requests for help. I will not reply.

  3. #3
    Just Joined!
    Join Date
    Dec 2009
    Posts
    19
    Thanks for your reply - how could I explain things better (I'm fairly new to IP level stuff so am possibly using the wrong terminology)?

    The AP is indeed set up with a static IP address (.2 in my network, ADSL router with .1), and it allows a Linux PC and WIndows PC to get IP addresses using DHCP off the router via the WAP and any number of switches. Its just the embedded platform that cannot get an IP address via the WAP network route - but it can using a wired cable to the router. Being as all other platforms are happy with either a wired or wireless route to the router, what could be different about an embedded platform in combination with a wireless route?

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Jul 2004
    Posts
    4,593
    Quote Originally Posted by rbassett View Post
    Thanks for your reply - how could I explain things better (I'm fairly new to IP level stuff so am possibly using the wrong terminology)?
    I'm no pro myself.
    The AP is indeed set up with a static IP address (.2 in my network, ADSL router with .1),
    This could be the problem. If I understand correctly, your system has two networks:
    192.168.1.xxx (wired router)
    192.168.2.xxx (wireless AP)

    Put the AP on the same network as the router. It may be looking for the router, but can't find it.

    Edit: There may be a way to tell the Linux imbedded PC where to look for the router. But having no knowledge of even what it is you are using, I can't even try to advise on this. This is usually referred to as the default gateway, and since the AP is on a different network it can't seem to find the router.

    The mechanism for this is dhclient. It uses the dhclient.conf file, which can be found in the /etc/dhcp3 folder. You may need to add the router address to it, but I am not experienced in how to properly do this. Read the man pages concerning it.
    Code:
    man dhclient
    Code:
    man dhclient.conf
    You can also manually run dhclient, after the wireless has connected to the AP.
    Code:
    sudo dhclient
    If you are not using Ubuntu, first gain root access with the su comand.
    Last edited by waterhead; 12-24-2009 at 01:28 PM.
    Please do not send Private Messages to me with requests for help. I will not reply.

  6. #5
    Just Joined!
    Join Date
    Dec 2009
    Posts
    19
    Hi,
    Sorry I wasn't clear - no the router is 192.168.0.1 and the WAP is 192.168.0.2 and DHCP on the router is set up to give out addresses in the range 192.168.0.100 and upwards. So my Linux and Windows PCs have IP addresses 192.168.0.100 and upwards.

  7. #6
    Linux Guru
    Join Date
    Jul 2004
    Posts
    4,593
    I added more to my previous post, while you were posting. See if any of that helps.
    Please do not send Private Messages to me with requests for help. I will not reply.

  8. #7
    Linux Guru
    Join Date
    Jul 2004
    Posts
    4,593
    If this is a problem with it not finding the default gateway, then editing the dhclient.conf file may not be the way to fix it. I found info on directing it to the default gateway on Debian/Ubuntu HERE.

    Make sure it knows where the gateway is, by manually telling it. Change the IP to match your router's IP.
    Code:
    route add default gw 192.168.1.254
    You still haven't said what Linux distro you are using. This type of configuration can be different, depending on what distro you are using.
    Please do not send Private Messages to me with requests for help. I will not reply.

  9. #8
    Just Joined!
    Join Date
    Dec 2009
    Posts
    19
    Hi Paul,
    The embedded platform doesn't use a distro - its using "neat" kernel 2.6.21.3 with extras - all extra packages built by hand - its a mips based set top box that my previous employer used to make that I got given as a leaving "present"! I've previously tried adding a dhclient.conf but it doesn't get read - the boot up process seems to be using the ipconfig code internal to the kernel (by putting printk's in linux/net/ipconfig.c I'd put some debug in to work out what was going on).
    The default gateway, subnetmask etc are all set as expected as I can see that debug going through when I use a direct wire connection from the router to the platform which succeeds to get an IP address.
    I can only assume the WAP is modifying / throwing away the DHCP discover packet from the embedded platform or not passing back the answer from the router (although I suspect it is the first option but why?). I thought maybe the packet was not formulated 100% "correctly" and though the router understands it (as I can used a wired route to get the IP address), maybe the WAP thinks its not a valid packet and bins it?

  10. #9
    Linux Guru
    Join Date
    Jul 2004
    Posts
    4,593
    Could this be a problem with WEP and the password? How are you sending the password and login information? Try it after disabling the security on the AP.
    Please do not send Private Messages to me with requests for help. I will not reply.

  11. #10
    Just Joined!
    Join Date
    Dec 2009
    Posts
    19
    OK I'll try, although if the Linux PC and Windows PC can use the WAP to get an IP address from the router successfully, why would it make a difference for the embedded device?

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •