Discussion:
udhcpc (1.12.1) - Problem with usb ?!
Manuel Sahm
2008-11-25 07:33:51 UTC
Permalink
Hello,

I`m using the AT91SAM9260 ARM9 microcontroller with linux kernel 2.6.27.
For the usb device port I use gadgetfs.

My dhcp client program is udhcpc.

I have two questions:

1.)
I start the udhcpc when I recognize a connection with the tool ifpludg. Then I make a system call:
"udhcpc --interface=wlan0 --now --quit -s /etc/init.d/simple.script"
Is it a problem to use the parameter "--quit" concerning the lease time ?
I have to use the paramter because of a problem with my usb device ??? (look at question 2.)

2.)
I plug in my usb wlan stick in my usb host port - enumeration is successful.
I start udhcpc (without the --quit paramter) - Request is successful - got ip address - process udhcpc is running in background (daemon ?!).
Now I insert my usb device cable and now I am not abel to open the EP1 ?
If I kill udhcpc, all works fine ?

Any ideas ?


Thank you very much

Best regards
Manuel Sahm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/busybox/attachments/20081125/79bb46c1/attachment.htm
Denys Vlasenko
2008-11-25 10:56:14 UTC
Permalink
Post by Manuel Sahm
I`m using the AT91SAM9260 ARM9 microcontroller with linux kernel 2.6.27.
For the usb device port I use gadgetfs.
My dhcp client program is udhcpc.
1.)
"udhcpc --interface=wlan0 --now --quit -s /etc/init.d/simple.script"
Is it a problem to use the parameter "--quit" concerning the lease time ?
I have to use the paramter because of a problem with my usb device ??? (look at question 2.)
Instead of adding --quit you need to look into the problem.
Post by Manuel Sahm
2.)
I plug in my usb wlan stick in my usb host port - enumeration is successful.
I start udhcpc (without the --quit paramter) - Request is successful - got ip address - process udhcpc is running in background (daemon ?!).
Now I insert my usb device cable and now I am not abel to open the EP1 ?
You insert what? Above you said you already detected the connection
using ifplugd. I'm confused. I'm also confused by "not abel to open the EP1".
what is "EP1"?
Post by Manuel Sahm
If I kill udhcpc, all works fine.
Any ideas ?
Write up more coherent problem description.
--
vda
Manuel Sahm
2008-11-25 13:03:20 UTC
Permalink
Hello, sorry I will try to give you more detailed informations:

I have an Atmel AT91SAM9260 with an usb-host and usb device port.

I plug in my usb wlan stick in the usb host port. Then I establish a
connection to a router.
The ifplugd recognizes a connection. Then i start the udhcpc ( "udhcpc
--interface=wlan0 --now -s /etc/init.d/simple.script").
A valid ip address is available.

No I connect my host (PC) with the Atmel through the usb device port.
[I?m using gadgetfs]
Enumeration is successful. I want to use 2 Bulk endpoints for
receiving/sending data.
The problem is, that I can?t open /dev/ep1, which is the usb endpoint
for receiving data from the host.
ernno = Device or resource busy.

If i kill udhcpc all works fine ?

Thank you
Post by Manuel Sahm
Denys Vlasenko <vda.linux at googlemail.com> 25.11.2008 11:56 >>>
I`m using the AT91SAM9260 ARM9 microcontroller with linux kernel 2.6.27.
For the usb device port I use gadgetfs.
My dhcp client program is udhcpc.
1.)
I start the udhcpc when I recognize a connection with the tool
"udhcpc --interface=wlan0 --now --quit -s /etc/init.d/simple.script"
Is it a problem to use the parameter "--quit" concerning the lease time ?
I have to use the paramter because of a problem with my usb device ??? (look at question 2.)
Instead of adding --quit you need to look into the problem.
Post by Manuel Sahm
2.)
I plug in my usb wlan stick in my usb host port - enumeration is successful.
I start udhcpc (without the --quit paramter) - Request is successful
- got ip address - process udhcpc is running in background (daemon ?!).
Post by Manuel Sahm
Now I insert my usb device cable and now I am not abel to open the EP1 ?
You insert what? Above you said you already detected the connection
using ifplugd. I'm confused. I'm also confused by "not abel to open the
EP1".
what is "EP1"?
Post by Manuel Sahm
If I kill udhcpc, all works fine.
Any ideas ?
Write up more coherent problem description.
--
vda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/busybox/attachments/20081125/6a65b5a0/attachment-0001.htm
Denys Vlasenko
2008-11-26 01:41:41 UTC
Permalink
Post by Manuel Sahm
I have an Atmel AT91SAM9260 with an usb-host and usb device port.
I plug in my usb wlan stick in the usb host port. Then I establish a
connection to a router.
The ifplugd recognizes a connection. Then i start the udhcpc ( "udhcpc
--interface=wlan0 --now -s /etc/init.d/simple.script").
A valid ip address is available.
Now I connect my host (PC) with the Atmel through the usb device port.
[I?m using gadgetfs]
Enumeration is successful. I want to use 2 Bulk endpoints for
receiving/sending data.
The problem is, that I can?t open /dev/ep1, which is the usb endpoint
for receiving data from the host.
ernno = Device or resource busy.
Wow, this is complicated.

No, udhcpc should not use /dev/ep1 in this situation, it does not
even know about it. It talks only to network interfaces, not /dev/XXX
files.

Something else is interfering with /dev/ep1. It may be userspace
(ifplugd? try digging around with lsof -nP) or kernel
(weird interaction in usb subsystem between wlan0 and /dev/ep1).
--
vda
Denys Vlasenko
2008-11-26 01:41:41 UTC
Permalink
Post by Manuel Sahm
I have an Atmel AT91SAM9260 with an usb-host and usb device port.
I plug in my usb wlan stick in the usb host port. Then I establish a
connection to a router.
The ifplugd recognizes a connection. Then i start the udhcpc ( "udhcpc
--interface=wlan0 --now -s /etc/init.d/simple.script").
A valid ip address is available.
Now I connect my host (PC) with the Atmel through the usb device port.
[I?m using gadgetfs]
Enumeration is successful. I want to use 2 Bulk endpoints for
receiving/sending data.
The problem is, that I can?t open /dev/ep1, which is the usb endpoint
for receiving data from the host.
ernno = Device or resource busy.
Wow, this is complicated.

No, udhcpc should not use /dev/ep1 in this situation, it does not
even know about it. It talks only to network interfaces, not /dev/XXX
files.

Something else is interfering with /dev/ep1. It may be userspace
(ifplugd? try digging around with lsof -nP) or kernel
(weird interaction in usb subsystem between wlan0 and /dev/ep1).
--
vda

Manuel Sahm
2008-11-25 13:03:20 UTC
Permalink
Hello, sorry I will try to give you more detailed informations:

I have an Atmel AT91SAM9260 with an usb-host and usb device port.

I plug in my usb wlan stick in the usb host port. Then I establish a
connection to a router.
The ifplugd recognizes a connection. Then i start the udhcpc ( "udhcpc
--interface=wlan0 --now -s /etc/init.d/simple.script").
A valid ip address is available.

No I connect my host (PC) with the Atmel through the usb device port.
[I?m using gadgetfs]
Enumeration is successful. I want to use 2 Bulk endpoints for
receiving/sending data.
The problem is, that I can?t open /dev/ep1, which is the usb endpoint
for receiving data from the host.
ernno = Device or resource busy.

If i kill udhcpc all works fine ?

Thank you
Post by Manuel Sahm
Denys Vlasenko <vda.linux at googlemail.com> 25.11.2008 11:56 >>>
I`m using the AT91SAM9260 ARM9 microcontroller with linux kernel 2.6.27.
For the usb device port I use gadgetfs.
My dhcp client program is udhcpc.
1.)
I start the udhcpc when I recognize a connection with the tool
"udhcpc --interface=wlan0 --now --quit -s /etc/init.d/simple.script"
Is it a problem to use the parameter "--quit" concerning the lease time ?
I have to use the paramter because of a problem with my usb device ??? (look at question 2.)
Instead of adding --quit you need to look into the problem.
Post by Manuel Sahm
2.)
I plug in my usb wlan stick in my usb host port - enumeration is successful.
I start udhcpc (without the --quit paramter) - Request is successful
- got ip address - process udhcpc is running in background (daemon ?!).
Post by Manuel Sahm
Now I insert my usb device cable and now I am not abel to open the EP1 ?
You insert what? Above you said you already detected the connection
using ifplugd. I'm confused. I'm also confused by "not abel to open the
EP1".
what is "EP1"?
Post by Manuel Sahm
If I kill udhcpc, all works fine.
Any ideas ?
Write up more coherent problem description.
--
vda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20081125/6a65b5a0/attachment-0002.htm
Manuel Sahm
2008-11-25 07:33:51 UTC
Permalink
Hello,

I`m using the AT91SAM9260 ARM9 microcontroller with linux kernel 2.6.27.
For the usb device port I use gadgetfs.

My dhcp client program is udhcpc.

I have two questions:

1.)
I start the udhcpc when I recognize a connection with the tool ifpludg. Then I make a system call:
"udhcpc --interface=wlan0 --now --quit -s /etc/init.d/simple.script"
Is it a problem to use the parameter "--quit" concerning the lease time ?
I have to use the paramter because of a problem with my usb device ??? (look at question 2.)

2.)
I plug in my usb wlan stick in my usb host port - enumeration is successful.
I start udhcpc (without the --quit paramter) - Request is successful - got ip address - process udhcpc is running in background (daemon ?!).
Now I insert my usb device cable and now I am not abel to open the EP1 ?
If I kill udhcpc, all works fine ?

Any ideas ?


Thank you very much

Best regards
Manuel Sahm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.busybox.net/pipermail/busybox/attachments/20081125/79bb46c1/attachment-0002.htm
Denys Vlasenko
2008-11-25 10:56:14 UTC
Permalink
Post by Manuel Sahm
I`m using the AT91SAM9260 ARM9 microcontroller with linux kernel 2.6.27.
For the usb device port I use gadgetfs.
My dhcp client program is udhcpc.
1.)
"udhcpc --interface=wlan0 --now --quit -s /etc/init.d/simple.script"
Is it a problem to use the parameter "--quit" concerning the lease time ?
I have to use the paramter because of a problem with my usb device ??? (look at question 2.)
Instead of adding --quit you need to look into the problem.
Post by Manuel Sahm
2.)
I plug in my usb wlan stick in my usb host port - enumeration is successful.
I start udhcpc (without the --quit paramter) - Request is successful - got ip address - process udhcpc is running in background (daemon ?!).
Now I insert my usb device cable and now I am not abel to open the EP1 ?
You insert what? Above you said you already detected the connection
using ifplugd. I'm confused. I'm also confused by "not abel to open the EP1".
what is "EP1"?
Post by Manuel Sahm
If I kill udhcpc, all works fine.
Any ideas ?
Write up more coherent problem description.
--
vda
Loading...