Simple Ethernet Setup for the AIO Board using DHCP

Step 5 of the software guide instructs the user to configure their computer’s network adapter manually to use a specific IPV4 address.

I feel this step could be eliminated if the AIO board was able to answer a DHCP request from the computer. The computer’s IP address, gateway, subnet mask, etc could be set without any interaction from the user.

I would be happy to contribute the software for this, but wanted to hear from others before starting.

Most computers are not set up as a DHCP server but if you did plug into your home network, likely your home router could assign an IP address. But not all tractor setups have a DHCP server in them either. It would be nice if it could revert to a static IP if there was no DHCP server. This would be a function of whatever ethernet driver / library is used.

Hi Matthew,

Thanks for taking the time to review my suggestion. I was thinking the DHCP server would be part of the AIO board firmware rather than something provided by the computer.

The steps would be as follows. The computer will broadcast out a DHCP request. The AIO board receives the DHCP request and responds with the IP address the computer should use. This makes connecting the AIO board to any computer completely plug and play.

If I miss understood you feedback, please let me know.

No one is stopping you from doing it. But it’s not easy.

Should probably have the teensy check for an existing DHCP server before starting up it’s own.

1 Like

Yes, having two DHCP servers on the same LAN can cause problems.

I have forked the repo here and have an initial implementation ready for testing. Waiting for a rainy day to borrow the AIO board from the tractor.

Is the ipadress really important? I don’t use it with UDP. But I’m from another planet.

From what I have seen the IP address is not important as most UDP messages are broadcasted to every IP on the subnet. It is important though for the computer and other devices on the LAN to be configured to use an IP on the same subnet or the messages will be ignored.

1 Like

I have been using the DHCP server integrated into the AIO board for about two weeks and so far no issues.

Before the AIO board is connected the ethernet interface is using its self assigned IP address.

Within a few seconds of connecting the AIO board the computer will be assigned an IP address (the next address after the one the AIO board has been configured to use).

ipconfig shows the IPv4 address, gateway, and subnet mask. The custom DNS suffix confirms it got this configuration from the AIO board.

Is there a process for testing / merging a new feature?

Please do a PR on the Boards repository

That’s for the AgOpenGPS program, not the related firmware. But the approach is almost the same except there is no develop branch in the Boards Repository

Can you make the computer to have a lower adress instead? Like 192.168.5.10?

Also, to be accepted for a PR, it should also allow to change the IP from the AgIO page IMO

Maybe by registering the demand and restarting with the new address? If that is possible.

Because the system must be able to work with RC or machine modules also. Or just to let some flexibility for special use.

It would be very nice if we would not have to manually configure the computer ethernet port.

I created a pull request, but will leave it draft until all comments are resolved.

Hi Pat,

The way the DHCP code works presently is that it starts with the IP address stored in the variable Eth_myip which the comment in the code says is “set via AgIO”. The first IP addressed assigned via DHCP will be Eth_myip plus one. I don’t see any way in AgIO to set the IP address of the AIO board, but perhaps I just missed it.

It looks to me like the machine board uses 192.168.5.50 as its IP address by default? I think eventually it would be ideal for the machine board to get its IP address via DHCP as well.

Let me know what you think is best. I am happy to adjust the code as needed.

in post 9, the “set Subnet” button

Here is in the firmware:

I can’t say much about this. I only write code for Android. I use my own (simple) AgIO. The original code blocks the entire system. It becomes chaos in my head, if I have to change every time. That’s why I don’t concern myself with the hardware.