You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nuttx.apache.org by TimH <Ti...@JTi.uk.com> on 2022/01/25 18:16:32 UTC

RNDIS and DHCPD

First attempt hasn't worked, but not I've investigated or checked my 
.config yet; but, before I do, is it reasonable to expect NuttX to 
support DHCP server and USB RNDIS such that a connected PC gets an IP 
address from the NuttX RNDIS "gadget" allowing connectivity without the 
PC user having to change adapter settings (assuming the adapter is set 
for DHCP)?

If so, great, I'll persevere. If not, I'll save myself the hassle :)

Re: RNDIS and DHCPD

Posted by Alan Carvalho de Assis <ac...@gmail.com>.
Hi Greg,

On 1/25/22, Gregory Nutt <sp...@gmail.com> wrote:
>> Good question! Normally the computer/host is supposed to run the DHCP
>> server, you need to check in the spec if there is some way to change
>> it.
>>
>
> I wrote a DHCP server a long time ago.  It is at apps/netutils/dhcpd.
> Haven't used it in a long time so I would expecit it to have some bit rot.
>

I think the DHCP server is working, see this tutorial:

https://eadalabs.com/esp32-nuttx-and-bridged-networking/

Re: RNDIS and DHCPD

Posted by Gregory Nutt <sp...@gmail.com>.
> Good question! Normally the computer/host is supposed to run the DHCP
> server, you need to check in the spec if there is some way to change
> it.
>

I wrote a DHCP server a long time ago.  It is at apps/netutils/dhcpd.
Haven't used it in a long time so I would expecit it to have some bit rot.

Re: RNDIS and DHCPD

Posted by Alan Carvalho de Assis <ac...@gmail.com>.
Good question! Normally the computer/host is supposed to run the DHCP
server, you need to check in the spec if there is some way to change
it.

On 1/25/22, TimH <Ti...@jti.uk.com> wrote:
> Will check those configs, thanks Alan. But I want the NuttX device to be
> the DHCP server, so the PC gets an IP address in the same subnet as the
> NuttX device, assuming the PC is set to get IP addresses via DHCP. I
> don't think the PC (Linux or Windows) can give the NuttX device an IP
> address without lots of hassle.
>
> My hope is that I can enable my board as a DHCP server and web server:
> plug it to a PC (USB/RNDIS), use a browser, and get web pages served
> from the device to configure, and get files. This means I don't need USB
> MSD and FAT :)
>
> On 25/01/2022 20:20, Alan Carvalho de Assis wrote:
>> Hi Tim,
>>
>> Looking my see you can see that I faced some issues with Ubuntu
>> attributing DHCP address to my board, but I think it works if you use
>> a better dhcp server on Linux.
>>
>> I suggest you too look how other boards are configuring it, i.e.:
>>
>> boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig
>> boards/arm/stm32/stm32f4discovery/configs/rndis/defconfig
>>
>> BR,
>>
>> Alan
>>
>> On 1/25/22, TimH<Ti...@jti.uk.com>  wrote:
>>> First attempt hasn't worked, but not I've investigated or checked my
>>> .config yet; but, before I do, is it reasonable to expect NuttX to
>>> support DHCP server and USB RNDIS such that a connected PC gets an IP
>>> address from the NuttX RNDIS "gadget" allowing connectivity without the
>>> PC user having to change adapter settings (assuming the adapter is set
>>> for DHCP)?
>>>
>>> If so, great, I'll persevere. If not, I'll save myself the hassle :)
>>>
>

Re: RNDIS and DHCPD

Posted by TimH <Ti...@JTi.uk.com>.
Will check those configs, thanks Alan. But I want the NuttX device to be 
the DHCP server, so the PC gets an IP address in the same subnet as the 
NuttX device, assuming the PC is set to get IP addresses via DHCP. I 
don't think the PC (Linux or Windows) can give the NuttX device an IP 
address without lots of hassle.

My hope is that I can enable my board as a DHCP server and web server: 
plug it to a PC (USB/RNDIS), use a browser, and get web pages served 
from the device to configure, and get files. This means I don't need USB 
MSD and FAT :)

On 25/01/2022 20:20, Alan Carvalho de Assis wrote:
> Hi Tim,
>
> Looking my see you can see that I faced some issues with Ubuntu
> attributing DHCP address to my board, but I think it works if you use
> a better dhcp server on Linux.
>
> I suggest you too look how other boards are configuring it, i.e.:
>
> boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig
> boards/arm/stm32/stm32f4discovery/configs/rndis/defconfig
>
> BR,
>
> Alan
>
> On 1/25/22, TimH<Ti...@jti.uk.com>  wrote:
>> First attempt hasn't worked, but not I've investigated or checked my
>> .config yet; but, before I do, is it reasonable to expect NuttX to
>> support DHCP server and USB RNDIS such that a connected PC gets an IP
>> address from the NuttX RNDIS "gadget" allowing connectivity without the
>> PC user having to change adapter settings (assuming the adapter is set
>> for DHCP)?
>>
>> If so, great, I'll persevere. If not, I'll save myself the hassle :)
>>

Re: RNDIS and DHCPD

Posted by Alan Carvalho de Assis <ac...@gmail.com>.
Hi Tim,

Looking my see you can see that I faced some issues with Ubuntu
attributing DHCP address to my board, but I think it works if you use
a better dhcp server on Linux.

I suggest you too look how other boards are configuring it, i.e.:

boards/arm/lc823450/lc823450-xgevk/configs/rndis/defconfig
boards/arm/stm32/stm32f4discovery/configs/rndis/defconfig

BR,

Alan

On 1/25/22, TimH <Ti...@jti.uk.com> wrote:
> First attempt hasn't worked, but not I've investigated or checked my
> .config yet; but, before I do, is it reasonable to expect NuttX to
> support DHCP server and USB RNDIS such that a connected PC gets an IP
> address from the NuttX RNDIS "gadget" allowing connectivity without the
> PC user having to change adapter settings (assuming the adapter is set
> for DHCP)?
>
> If so, great, I'll persevere. If not, I'll save myself the hassle :)
>