Contacting DHCP - a second chance?
Tennant Stuart (2505) 122 posts |
As Risc OS boots up, it runs SetupNet to contact the DHCP server, but sometimes (for external reasons) this doesn’t work and a broadbandless computer is the result. Is it possible (say when the line isn’t busy or you’ve switched the router on) to have a second chance at contacting the DHCP server without resetting the machine? I’ve tried clicking on SetupNet, but it just ignores me. |
Mike Freestone (2564) 131 posts |
The command that does the work is *dhcpexecute, see if that (or its help) helps |
Steffen Huber (91) 1953 posts |
Press F12 and type *DHCPExecute This should reinit the DHCP process. |
Tennant Stuart (2505) 122 posts |
Okay, thanks for that – however, I get the error message:
*HELP says:
So what would be appropriate values for e, block, p, w, and interface?
Note that in the above post, quotation marks represent pointy brackets. |
Richard Walker (2090) 431 posts |
The parameters are optional, apart from the interface name. So do: dhcpexecute x Where x is the interface. I think inetinfo will list them. |
Steve Pampling (1551) 8170 posts |
DHCPExecute -e -b -w -p EtherWibble would appear to be a reasonable command string to configure interface EtherWibble to place any error in the variable Inet$Error, block until the interface is bound, wait for the interface to appear and assign a private IP (APIPA style) if the DHCP request times out. |
Tennant Stuart (2505) 122 posts |
locked up the machine, until an Alt-Break invited me to stop Netsurf. So I did that then tried to restart Netsurf, which promptly blew up with more errors. I then repeated the DHCPExecute command, which locked up the machine again, until an Alt-Break invited me to stop the next task, and then more DHCPExecute/Alt-Break cycles just sent the whole thing downhill. |
Tennant Stuart (2505) 122 posts |
*InetInfo (or *InetInfo r) produces…
*InetInfo i produces…
..so which of those is the interface? |
Colin (478) 2433 posts |
ej0. That is the usb ethernet interface – the other is a loopback interface. !Boot.Choices.Internet.Startup shows the obey file used when the internet starts up – if it’s any help |
Richard Walker (2090) 431 posts |
Yes, as Colin says, the interface is ej0 (lo0 is the loopback interface – a ‘virtual’ interface to your own computer). So, do: ‘dhcpexecute ej0’. I couldn’t remember off-hand if the network setup screen in Boot showed any of this stuff, or even provided access to DHCP renew functionality. If not, there’s an idea for someone… :) |
Tennant Stuart (2505) 122 posts |
Okay, so I tried… *DHCPExecute -e -b -w -p ej0 ..and at first I thought it had locked up the machine like before, but no it hadn’t – and the broadband was working too! :-) |
Colin (478) 2433 posts |
Probably because at boot up it may be waiting for ej0 or some other dependency to start working. I tend to find if it doesn’t start within about 5secs it will time out. |
Martin Avison (27) 1494 posts |
Strange. As an experiment I unplugged my Iyonix (RO5.20) network cable and rebooted. After 10 minutes waiting to contact the DHCP server I gave up and pressed Escape. Big mistake! Although the boot seemed to progress normally, at the end I received the ‘Boot has failed’ message with options for a ‘Floppy Boot’ !!, a Retry or something else. I am sure the timeout on my Pi is much shorter, but I cannot check as it is packed up for the show! In my wanderings I have discovered the *DHCPInfo command, which now says: and I had not seen this information before, and may be useful to others.
|
Colin (478) 2433 posts |
I’m running DHCP 0.26 and it times out in about 40secs. According to CVS the timeout was changed from 10mins to 20secs in version 0.22 so its odd that your 0.23 version takes 10 mins |