WIP: Output RoninDojo's IP address on the console/monitor as a fallback #5

Draft
lasermind wants to merge 1 commit from lasermind/monorepo:improvement/kmsg into master
Contributor

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.

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/null needs to be repeated so many times?

Can you elaborate on this?

I am not sure I fully understand (until I test) why the line `printf "%s" "<1>" | sudo tee /dev/kmsg > /dev/null` needs to be repeated so many times? Can you elaborate on this?
Author
Contributor

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.

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.
lasermind changed title from Output RoninDojo's IP address on the console/monitor as a fallback to WIP: Output RoninDojo's IP address on the console/monitor as a fallback 2026-06-05 13:07:20 +00:00

@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

@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
Author
Contributor

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.

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.
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u improvement/kmsg:lasermind-improvement/kmsg
git switch lasermind-improvement/kmsg
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Ronin/monorepo!5
No description provided.