WIP: Output RoninDojo's IP address on the console/monitor as a fallback #5
No reviewers
Labels
No labels
No milestone
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Ronin/monorepo!5
Loading…
Reference in a new issue
No description provided.
Delete branch "lasermind/monorepo:improvement/kmsg"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Speaking of the kernel ring buffer, why not use it to our advantage?
I would fancy receiving a notification about the RoninDojo IP address, when testing with a DHCP config. This does not need to be an unknown, or guesswork, or a hassle of looking it up in the router. Avahi advertising, I feel, is half-baked anyway, and sometimes .local domains are not happily resolved in home networks. (Android phones don't do it at all.) As a fallback of last resort for the user, let there be the option, to just plug in a monitor and actually have the IP address displayed.
The good thing is: using these kernel ring buffer messages, the user doesn't even need to be logged in (he can't, random password), because these messages are simply dumped to the console, no matter what. (I tried to make it somewhat pretty nonetheless.)
There are two stages, where such a message appears: (1) early, as soon as the setup has configured the network and the IP in known, and (2) late, when the setup has finished completely and RoninDojo is available.
I am not sure I fully understand (until I test) why the line
printf "%s" "<1>" | sudo tee /dev/kmsg > /dev/nullneeds to be repeated so many times?Can you elaborate on this?
Sure! These kernel messages are a very low-level system. There is one message, on one line. There are no line breaks, like "\n", you would have in an echo command, or similar. To make our own message about the IP a bit more prominent and catch an eye, I needed to make my own line breaks, and draw a little box and so on. It's there, to set the message apart from other output, already appeared on the console, so that it is actually noticable. (I'd like to add a screenshot, but the server is not configured to handle this.)
We could even go more crazy with ASCII art and use the RoninDojo logo there. Right now it's a first idea, to use this messaging system.
I also had the idea that I should make it "rebootable". From a users perspective, especially as a fallback system, it should appear on a normal boot / reboot too. At the moment, these messages are triggered only during first-run, the setup process. But these messages are also needed, when setup is (successfully) finished and the user still hasn't figured out the IP. Only then the user would maybe plug in a monitor and wants to see this message. But I noticed, that many SBCs are not capable of hot-plugging a monitor. The monitor needs to be plugged in at boot time. So the user is forced to reboot (power cycle) the machine – thinking of a Tanto here, with newly flashed RoninOS, for example). In this scenario, the IP message should also appear – so it needs to be triggered at the end of every boot process.
I will have a look at this again and add this functionality.
Output RoninDojo's IP address on the console/monitor as a fallbackto WIP: Output RoninDojo's IP address on the console/monitor as a fallback@lasermind I have approved the current changes so remove WIP if you want it to be merged now, or please inform if you would still like to add the additional functionality mentioned above
The feature is only half-way finished in this current state, that's why I labelled it as "WIP" for now, to keep this on the radar. I'll look into this idea again, as soon as I can find the time.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.