vanvught / rpidmx512

Orange Pi DMX512 / RDM / MIDI / OSC / Art-Net / WS28xx / L6470 / Stepper / TLC59711 / PCA9685 / Servo / PWM / TCNet / SMPTE / RDMNet / LLRP / GD32 / GigaDevice / Raspberry Pi
http://www.orangepi-dmx.org/
MIT License
392 stars 108 forks source link

Network: DHCP Client #179

Closed vanvught closed 3 years ago

vanvught commented 3 years ago

Follow-up for https://github.com/vanvught/rpidmx512/issues/151#issuecomment-794105766

Does firmware look once and once only for network?

Yes. Just at startup.

Hello Arjan,

Perhaps this should be changed? We have some environments where the DHCP is out of our control (and is quite slow to boot). So I could imagine that e.g. after a power surge the Orange Pi's would boot - fail to acquire a DHCP lease and be stuck with their locally assigned IP. Obviously this is not desirable. Attempting DHCP renewal or rebooting (if board has local IP) at X interval would be great for this (X perhaps even configurable) :-)

Best regards, Søren

cc: @soerenpedersen

vanvught commented 3 years ago

Value in minutes between 0 and 5. Where 0 is no retry.

Schermafbeelding 2021-03-10 om 18 25 10

cc: @soerenpedersen

soerenpedersen commented 3 years ago

Looks good! Looking forward to testing it out :-)

vanvught commented 3 years ago

@soerenpedersen Hi Søren, herewith test firmware.

orangepi_zero.uImage.gz

hippyau commented 3 years ago

Can the MAC detect link up/down?

On Thu, 11 Mar 2021, 06:07 Arjan, notifications@github.com wrote:

@soerenpedersen https://github.com/soerenpedersen Hi Søren, herewith test firmware.

orangepi_zero.uImage.gz https://github.com/vanvught/rpidmx512/files/6118554/orangepi_zero.uImage.gz

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vanvught/rpidmx512/issues/179#issuecomment-796012973, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIWBBRKUHAO3J5G7KPKGZGTTC7GOPANCNFSM4Y4BQQGQ .

vanvught commented 3 years ago

Can the MAC detect link up/down?

Yes. Just give it a try with disconnecting the Ethernet cable while booting. As soon as the DHCP goes is in 'renew' then plug in the Ethernet cable and you have DHCP running immediately.

hippyau commented 3 years ago

Thanks, I was more thinking a link-goes-up event could triggers the DHCP client.

On Thu, 11 Mar 2021, 07:29 Arjan, notifications@github.com wrote:

Can the MAC detect link up/down?

Yes. Just give it a try with disconnecting the Ethernet cable while booting. As soon as the DHCP goes is in 'renew' then plug in the Ethernet cable and you have DHCP running immediately.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vanvught/rpidmx512/issues/179#issuecomment-796147443, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIWBBRIUHY77QMTRAFEZ373TC7QFLANCNFSM4Y4BQQGQ .

vanvught commented 3 years ago

The case for DHCP client retry is when there is a ink-up, but the DHCP server is not reachable/available, yet.

soerenpedersen commented 3 years ago

@soerenpedersen Hi Søren, herewith test firmware.

orangepi_zero.uImage.gz

Confirmed. Looks like it's working as expected :-) Perhaps it should be enabled by default when DHCP is configured?

vanvught commented 3 years ago

Perhaps it should be enabled by default when DHCP is configured?

That would break the IP Addressing Modes as described here -> https://github.com/vanvught/rpidmx512/issues/117#issuecomment-630290528

hippyau commented 3 years ago

then defaulting to the 2.x.y.z (based on MAC address as specified in Art-Net 4 "IP address configuration – Static Addressing").

I suggest is bad practice, 2.x.x.x is an internet route-able IP range, feel sorry for the people on it :) Should use 10.x,x,x /wherever possible/.

vanvught commented 3 years ago

I suggest is bad practice, 2.x.x.x is an internet route-able IP range, feel sorry for the people on it :) Should use 10.x,x,x /wherever possible/.

2.x.x.x is part of the Art-Net standard. And all my firmware is 100% compliant with any standards used in the lighting industry.

hippyau commented 3 years ago

Understood, but they also support 10.x.x.x and this complies with a preceding network RFC-5735. in my eyes btw! I don't really care.... not your problem.... just saying :) Hope you are well :)

On Fri, Mar 12, 2021 at 12:26 AM Arjan @.***> wrote:

I suggest is bad practice, 2.x.x.x is an internet route-able IP range, feel sorry for the people on it :) Should use 10.x,x,x /wherever possible/.

2.x.x.x is part of the Art-Net standard. And all my firmware is 100% compliant with any standards used in the lighting industry.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/vanvught/rpidmx512/issues/179#issuecomment-796774723, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIWBBRLJG6FDOG22TURJLHTTDDHJXANCNFSM4Y4BQQGQ .

soerenpedersen commented 3 years ago

Perhaps it should be enabled by default when DHCP is configured?

That would break the IP Addressing Modes as described here -> #117 (comment)

Ah, I see. Looking forward to testing out your firmware some more when my RJ45 connectors finally arrive for the 8x 4 board. :-)

vanvught commented 3 years ago

8x 4 board. :-)

Cool! With feedback from other users I have made some great updates to the 8x 4U firmware. I hope to publish it this weekend.

I am also working on an simpler board with the 5M80ZE64C5N CPLD. The BOM is € 6,04

zero_board