Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: Xianwen Chen on March 10, 2013, 05:42:28 PM

Title: [solved] udhcpc cannot obtain IP in WIFI
Post by: Xianwen Chen on March 10, 2013, 05:42:28 PM
Hi all,

I use a USB Realtek 8187B wireless adapter. I find that udhcpc cannot obtain IP. I have to use dhcpcd every time. Is it just me having this problem?

Thanks in advance.
Title: Re: udhcpc cannot obtain IP in WIFI
Post by: Juanito on March 10, 2013, 11:13:17 PM
Using a dell dw1530 wireless card, I need to run udhcpc once, kill the process and run udhcpc again - it always works the second time.
Title: Re: udhcpc cannot obtain IP in WIFI
Post by: gerald_clark on March 10, 2013, 11:28:34 PM
You could use the nodhcp boot optiion so you can run udhcpc at the proper time.
Title: Re: udhcpc cannot obtain IP in WIFI
Post by: Juanito on March 10, 2013, 11:40:19 PM
Thanks, but in my case I'm not sure that would change anything (there was no problem with my previous hardware) - plus I need udhcpc running in case I use a wired connection.
Title: Re: udhcpc cannot obtain IP in WIFI
Post by: gerald_clark on March 10, 2013, 11:42:16 PM
You can always run it in bootlocal.sh.
Title: Re: udhcpc cannot obtain IP in WIFI
Post by: Xianwen Chen on March 12, 2013, 02:57:01 AM
Using a dell dw1530 wireless card, I need to run udhcpc once, kill the process and run udhcpc again - it always works the second time.
Hi Juanito,

Thank you. I tried to run udhcpc multiple times. However, I cannot obtain IP from DHCP server with udhcpc. I use a USB wireless adapter with Realtek 8187B chip.
Title: Re: udhcpc cannot obtain IP in WIFI
Post by: Juanito on March 12, 2013, 03:01:39 AM
could you post the output you get when you try to run udhcpc - make sure there are no other instances of udhcpc running first
Title: Re: udhcpc cannot obtain IP in WIFI
Post by: Xianwen Chen on March 12, 2013, 03:43:56 AM
could you post the output you get when you try to run udhcpc - make sure there are no other instances of udhcpc running first

Hi Juanito,

Thank you. I took Gerald Clark's advice. The option 'nodhcp' was added to the boot menu. No 'udhcpc' instance was running at system startup.

My landlord uses WPA to protect her WIFI. After I associated the USB wireless adapter to the WIFI, I tried both 'udhcpc' and 'udhcpc wlan0' twice. It always repeated reporting 'Sending discover...'. I waited several minutes for each trial.

The USB adapter is connected to one of the USB ports. The light did not blink when 'udhcpc' was trying to discover the DHCP server. That suggests that 'udhcpc' might not have sent signal through the adapter.

As usual, 'dhcpcd' obtained IP from the DHCP server instantly.
Title: Re: udhcpc cannot obtain IP in WIFI
Post by: tinypoodle on March 12, 2013, 03:49:47 AM
After I associated the USB wireless adapter to the WIFI, I tried both 'udhcpc' and 'udhcpc wlan0' twice.
sudo udhcpc -i wlan0
Title: Re: udhcpc cannot obtain IP in WIFI
Post by: Juanito on March 12, 2013, 04:10:04 AM
You need to use something like this:
Code: [Select]
$ sudo udhcpc -b -i wlan0 -x hostname:box -p /var/run/udhcpc.wlan0.pid
Title: Re: udhcpc cannot obtain IP in WIFI
Post by: Xianwen Chen on March 12, 2013, 04:31:45 AM
The problem has been solved. Thank you Tinypoodle and Juanito.
Title: Re: [solved] udhcpc cannot obtain IP in WIFI
Post by: tinypoodle on March 12, 2013, 04:44:06 AM
Just by
Code: [Select]
udhcpc --helpyou could see that you actually were trying to get a lease for eth0 ;)
Title: Re: [solved] udhcpc cannot obtain IP in WIFI
Post by: Xianwen Chen on March 12, 2013, 05:42:17 AM
Just by
Code: [Select]
udhcpc --helpyou could see that you actually were trying to get a lease for eth0 ;)

Thank you tinypoodle.