DHCP question/problem

125 views
Skip to first unread message

GH

unread,
Jan 17, 2011, 10:08:37 PM1/17/11
to Chromium OS dev
I am running Chromium OS on a HP Mini 110-1025DX. First of all, the
wireless card does not have a supported driver, so it is probably
expected that I am having some issues. After successfully building
the Broadcom Linux STA driver and loading the module, I can get my
netbook to successfully associate with my access point using
wpa_supplicant, but then it fails to get an IP address using dhcpcd.
If I assign a static IP address to the interface and set the default
route, I can ping internet IP address, so I know I am close to getting
everything working, but I can't seem to resolve this DHCP issue. If I
manually run dhcpcd using the following command (notice debugging is
enabled) I can see it sending broadcast requests, but it never
receives a response:
dhcpcd -d -t 60 -h chromeos wlan0
My wireless router doesn't have much for debugging output for the DHCP
server, but it does show the mac address, hostname, and IP address of
each machine associated. When I run the above command I do see the
existing DHCP record (assigned the last time I booted the netbook into
ubuntu 10.04) getting the hostname updated to chromeos, so it appears
to be partially working.
I also tried sending an IP address using the following command:
dhcpcd -d -t 60 -h chromeos -s 192.168.0.197 wlan0
and when I do this the dhcpcd process acts like it succeeds and goes
into the background.

My problem is that if I select an access point in the UI it times out
attempting to get an IP from the DHCP server, and even if I assign a
static IP, set the default route, and create a resolve.conf file
manually the UI still doesn't recognize that the network is
configured. So, I have the following questions:
1. What can I do to further debug my DHCP problem? I am not afraid to
get into the code if someone can point me in the correct direction.
2. Is there a quick and dirty way to get the UI to recognize the
network is set up after I assign the static IP, default route, and
resolve.conf?

As a reference, here is what I did to get to this point (and a general
how-to for anyone interested in building the Broadcom STA linux driver
for Chrome OS):

# get the source code
repo init -u http://git.chromium.org/git/manifest -m minilayout.xml
repo sync

# build the chroot environment
cd src/scripts
./make_chroot

# setup for the target board
./enter_chroot.sh
./setup_board --board=x86-generic --default
# set chronos password
./set_shared_user_password.sh
# build the kernel (to get the kernel headers)
./cros_workon start kernel
exit
repo sync
./enter_chroot.sh
./bin/cros_workon_make kernel
./cros_workon stop kernel
# build packages
./build_packages --oldchromebinary

# build image
./build_image --withdev --noenable_rootfs_verification

# copy to usb
./image_to_usb.sh # lists devices available
./image_to_usb.sh --to=/dev/sd_
exit

# download the broadcom linux sta driver
cd ~/chromiumos
wget http://www.broadcom.com/docs/linux_sta/hybrid-portsrc_x86_32-v5_100_82_38.tar.gz
mkdir hybrid-portsrc_x86_32-v5_100_82_38 && cd hybrid-portsrc_x86_32-
v5_100_82_38
tar -zxf ../hybrid-portsrc_x86_32-v5_100_82_38.tar.gz

# wl_linux.c and change eth%d to be wlan%d (one line change)
# add MODULE_LICENSE("MIXED/Proprietary"); right before static struct
pci_device_id
vim src/wl/sys/wl_linux.c
# edit Makefile and change /lib/modules/`uname -r`/build to ../src/
third_party/kernel/files
vim Makefile
# build wl.ko
# NOTE: setarch i386 is required to build the module on your chrome os
64 bit build machine for the x86-generic board
sudo setarch i386 make

# start chromium os, copy in the new kernel module, insert the
wireless modules
sudo mount -o remount,rw /
insmod /lib/modules/2.6.32.26+drm33.12/update/net/wireless/lib80211.ko
insmod /lib/modules/2.6.32.26+drm33.12/update/drivers/net/wireless/
wl.ko
depmod -a

# create a file named wpa_supplicant.conf
network={
ssid="__ssid__"
scan_ssid=1
key_mgmt=WPA-PSK
psk="__psk__"
}
# wpa_supplicant command to associate with access point
wpa_supplicant -iwlan0 -Dwext -c./wpa_supplicant.conf
# dhcpcd command that currently times out and doesn't receive a
response from broadcasts
dhcpcd -d -t 60 -h chromeos wlan0

Grant Grundler

unread,
Jan 18, 2011, 12:59:21 AM1/18/11
to GH, Chromium OS dev
On Mon, Jan 17, 2011 at 7:08 PM, GH <gregj...@gmail.com> wrote:
> I am running Chromium OS on a HP Mini 110-1025DX.  First of all, the
> wireless card does not have a supported driver, so it is probably
> expected that I am having some issues.

Can you try kernel-next instead of the stock kernel.

I'm asking because Broadcom 43xx wireless driver in kernel-next has
some MAC80211 support and flimflam depends on that. flimflam
(ChromiumOS connection manager) does NOT support WEXT interface which
is/was the wireless configuration interface before.

Look for "MAC80211" in kernel-next/.../drivers/net/wireless/Kconfig to
see what I am referring to.


>  After successfully building
> the Broadcom Linux STA driver and loading the module, I can get my
> netbook to successfully associate with my access point using
> wpa_supplicant, but then it fails to get an IP address using dhcpcd.

I'm don't know what's going wrong here...but is it possible this isn't
working because the driver doesn't support MAC80211 interface and thus
the kernel CFG80211 isn't working?

I'm assuming "iw_handler" is not MAC80211. So I don't think ChromiumOS
can use this driver.

Hopefully someone else can confirm my guess correct.

hth,
grant

> --
> Chromium OS Developers mailing list: chromiu...@chromium.org
> View archives, change email options, or unsubscribe:
> http://groups.google.com/a/chromium.org/group/chromium-os-dev?hl=en
>

Sam Leffler

unread,
Jan 18, 2011, 11:57:48 AM1/18/11
to GH, Chromium OS dev
On Mon, Jan 17, 2011 at 7:08 PM, GH <gregj...@gmail.com> wrote:
> I am running Chromium OS on a HP Mini 110-1025DX.  First of all, the
> wireless card does not have a supported driver, so it is probably
> expected that I am having some issues.  After successfully building
> the Broadcom Linux STA driver and loading the module, I can get my
> netbook to successfully associate with my access point using
> wpa_supplicant, but then it fails to get an IP address using dhcpcd.

You want to use the upstream open source driver; not the binary wl
driver. We only support drivers that use the cfg80211 system api's
which wl does not. As Grant said the driver you want is in the
kernel-next repo.

> If I assign a static IP address to the interface and set the default
> route, I can ping internet IP address, so I know I am close to getting
> everything working, but I can't seem to resolve this DHCP issue.  If I
> manually run dhcpcd using the following command (notice debugging is
> enabled) I can see it sending broadcast requests, but it never
> receives a response:
> dhcpcd -d -t 60 -h chromeos wlan0

dhcpcd does not set the ip address directly; it sends the information
to flimflam to do the work. If flimflam is unaware of the network
connection you manually created then it's uncertain what it will do
but I expect it will discard it.

> My wireless router doesn't have much for debugging output for the DHCP
> server, but it does show the mac address, hostname, and IP address of
> each machine associated.  When I run the above command I do see the
> existing DHCP record (assigned the last time I booted the netbook into
> ubuntu 10.04) getting the hostname updated to chromeos, so it appears
> to be partially working.
> I also tried sending an IP address using the following command:
> dhcpcd -d -t 60 -h chromeos -s 192.168.0.197 wlan0
> and when I do this the dhcpcd process acts like it succeeds and goes
> into the background.
>
> My problem is that if I select an access point in the UI it times out
> attempting to get an IP from the DHCP server, and even if I assign a
> static IP, set the default route, and create a resolve.conf file
> manually the UI still doesn't recognize that the network is
> configured.  So, I have the following questions:
> 1. What can I do to further debug my DHCP problem?  I am not afraid to
> get into the code if someone can point me in the correct direction.
> 2. Is there a quick and dirty way to get the UI to recognize the
> network is set up after I assign the static IP, default route, and
> resolve.conf?
>
> As a reference, here is what I did to get to this point (and a general
> how-to for anyone interested in building the Broadcom STA linux driver
> for Chrome OS):

<...stuff deleted...>

You are bypassing all the system services when you setup things
manually so it's not surprising you've got problems. Get a usable
driver installed and everything should work.

-Sam

GH

unread,
Jan 18, 2011, 6:45:53 PM1/18/11
to Chromium OS dev
Is the Broadcom 43xx driver in the kernel-next repo the driver from
linuxwireless.org? My wireless card has the 4312 chip which
identifies itself as 4315. My understanding is the b43 module does
not work with this wireless card and that is why Ubuntu uses the
Broadcom STA driver that I compiled (wl.ko). This information is
dated, but multiple people say the Broadcom STA driver is the way to
go for the 4312 chip. Perhaps these people would find their solutions
no longer work now that wpa_supplicant no longer officially supports
wext:

http://groups.google.com/group/chromium-os-dev/msg/7a0afde907e0af35
http://groups.google.com/a/chromium.org/group/chromium-os-discuss/msg/f26b85d3ee5c640b

The biggest thing that pushed me towards trying it first was that
Ubuntu 10.04 uses the Broadcom STA (wl.ko) driver on my netbook. I
will try the Broadcom 43xx driver in the kernel-next repo, but if that
doesn't work does anyone know of a quick and dirty way to send
flimflam the message with the dhcpcd info (which I would substitute in
my static IP info into) to trick it into completing the network
configuration?

The cfg80211 module is not getting automatically loaded, but if I load
it first (before lib80211 and wl) I noticed that when I flip the
physical wireless switch on my netbook it turns the indicator LED on
and off. If I load cfg80211 after I load wl the physical wireless
switch does nothing, but using ifconfig wlan0 up and ifconfig wlan0
down does turn the wireless indicator LED on and off. I don't know
what this means, but I thought it might be worth noting. I also tried
loading mac80211 right after cfg80211, but flimflam still doesn't get
an IP address from dhcpcd.

I had already read in other places that wpa_supplicant no longer
officially supports wext, but I figured changing the flimflam
configuration file which specifies the wpa_supplicant startup command
to add -Dwext was how other people using the wl driver had
successfully got their wireless card to work. Making that change
allows me to select and connect to an access point using the UI, but
then as I previously stated dhcpcd is failing to get an IP address. I
figured if I could associate successfully using wpa_supplicant, set up
the ip address and default route manually, and then ping internet IP
address everything should be able to work, but it sounds like that
isn't necessarily the case because the wl driver doesn't use cfg80211
system apis? Strange!

Thanks!

On Jan 18, 10:57 am, Sam Leffler <sleff...@chromium.org> wrote:

Sam Leffler

unread,
Jan 18, 2011, 6:50:08 PM1/18/11
to GH, Chromium OS dev
Try enabling debug msgs in flimflam w/ ff_debug. Something like
ff_debug wifi+dhclient+inet might help you understand what's
happening.

-Sam

GH

unread,
Jan 18, 2011, 6:59:16 PM1/18/11
to Chromium OS dev
Thanks for the help, I am still really new to a lot of aspects of
building and running chrome os.
How do I enable the debugging you described? It isn't clear to me if
this is a run-time option or if I need to build flimflam?
Once I have kernel and kernel-next pulled down and built, how do I
select which one goes into my build?

Thanks again!

On Jan 18, 5:50 pm, Sam Leffler <sleff...@chromium.org> wrote:
> Try enabling debug msgs in flimflam w/ ff_debug.  Something like
> ff_debug wifi+dhclient+inet might help you understand what's
> happening.
>
> -Sam
>
>
>
>
>
>
>
> On Tue, Jan 18, 2011 at 3:45 PM, GH <gregjho...@gmail.com> wrote:
> > Is the Broadcom 43xx driver in the kernel-next repo the driver from
> > linuxwireless.org?  My wireless card has the 4312 chip which
> > identifies itself as 4315.  My understanding is the b43 module does
> > not work with this wireless card and that is why Ubuntu uses the
> > Broadcom STA driver that I compiled (wl.ko).  This information is
> > dated, but multiple people say the Broadcom STA driver is the way to
> > go for the 4312 chip.  Perhaps these people would find their solutions
> > no longer work now that wpa_supplicant no longer officially supports
> > wext:
>
> >http://groups.google.com/group/chromium-os-dev/msg/7a0afde907e0af35
> >http://groups.google.com/a/chromium.org/group/chromium-os-discuss/msg...
> > Chromium OS Developers mailing list: chromium-os-...@chromium.org

GH

unread,
Jan 18, 2011, 7:08:24 PM1/18/11
to Chromium OS dev
One additional question:
When I built the kernel I think I used
./cros_workon start kernel
which I believe corresponds to the chromeos-base/kernel ebuild
I just tried:
./cros_workon start kernel-next
and that doesn't work, it appears I need to use
./cros_workon start sys-kernel/chromeos-kernel-next

So, my question is did I do something wrong previously and what is the
difference between chromeos-base/kernel and sys-kernel/chromeos-
kernel?

Thanks!

GH

unread,
Jan 18, 2011, 8:49:14 PM1/18/11
to Chromium OS dev
I figured out how to use ff_debug, that is a handy little tool!
Here is the output from flimflam successfully associating then dhcpcd
failing to get an ip:
http://sites.google.com/site/actlow/chromeos_var_log_messages.txt

Let me know if anyone sees anything that indicates a problem with
DHCP.
Thanks!

On Jan 18, 5:50 pm, Sam Leffler <sleff...@chromium.org> wrote:
> Try enabling debug msgs in flimflam w/ ff_debug.  Something like
> ff_debug wifi+dhclient+inet might help you understand what's
> happening.
>
> -Sam
>
>
>
>
>
>
>
> On Tue, Jan 18, 2011 at 3:45 PM, GH <gregjho...@gmail.com> wrote:
> > Is the Broadcom 43xx driver in the kernel-next repo the driver from
> > linuxwireless.org?  My wireless card has the 4312 chip which
> > identifies itself as 4315.  My understanding is the b43 module does
> > not work with this wireless card and that is why Ubuntu uses the
> > Broadcom STA driver that I compiled (wl.ko).  This information is
> > dated, but multiple people say the Broadcom STA driver is the way to
> > go for the 4312 chip.  Perhaps these people would find their solutions
> > no longer work now that wpa_supplicant no longer officially supports
> > wext:
>
> >http://groups.google.com/group/chromium-os-dev/msg/7a0afde907e0af35
> >http://groups.google.com/a/chromium.org/group/chromium-os-discuss/msg...
> > Chromium OS Developers mailing list: chromium-os-...@chromium.org

Sam Leffler

unread,
Jan 18, 2011, 11:15:08 PM1/18/11
to GH, Chromium OS dev
The log indicates the dhcp request timed out before a reply was
received. If you can turn off WPA for testing you can see if it works
w/o crypto, but this seems to point at the driver as at fault. Maybe
the "dell guy" (sorry, name escapes me) who used to put out images w/
the wl driver has some insight?

This posting from olof explains how to build an image w/ kernel-next:

https://groups.google.com/a/chromium.org/group/chromium-os-dev/browse_thread/thread/9b2a295c0a52d59c?pli=1

I've not done it yet for x86 so don't know if the driver(s) you want
are configured by default.

-Sam

> Chromium OS Developers mailing list: chromiu...@chromium.org

GH

unread,
Jan 23, 2011, 11:43:41 PM1/23/11
to Chromium OS dev
Since everyone says the b43 driver doesn't work well with the 4312
chipset, in the end I built chrome os using kernel-next and then built
the broadcom sta (wl.ko) driver for kernel-next. Now everything works
(including getting an IP address using dhcpcd)! Note that I had to
make 2 modifications to my previous instructions I used to build the
module:
1. There is a reference to 'init_MUTEX(&wl->sem);' in src/wl/sys/
wl_linux.c that needs to be changed to 'sema_init(&wl->sem, 1);' for
the newer kernel
2. The '-Dwext' option passed to wpa_supplicant now needs to be '-W
wext' instead (wext is unsupported, but at least for now it works)

On Jan 18, 10:15 pm, Sam Leffler <sleff...@chromium.org> wrote:
> The log indicates the dhcp request timed out before a reply was
> received.  If you can turn off WPA for testing you can see if it works
> w/o crypto, but this seems to point at the driver as at fault.  Maybe
> the "dell guy" (sorry, name escapes me) who used to put out images w/
> the wl driver has some insight?
>
> This posting from olof explains how to build an image w/ kernel-next:
>
> https://groups.google.com/a/chromium.org/group/chromium-os-dev/browse...
Reply all
Reply to author
Forward
This conversation is locked
You cannot reply and perform actions on locked conversations.
0 new messages