We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Displaying booting status on an I2C display.



  • I am embedding an Omega2s into a device case. Since it takes more than 60 seconds to boot to the point that the Wifi and USB host are fully ready to go I would like to display some type of booting status to the .98” 128 x 32 pixel OLED display. Writing to the display works great once the drivers and OS are loaded. But I want to initialize, clear, and write to the display from the time U-BOOT hands over control, until the OS is fully loaded.

    As an example, something as simple as displaying “Booting” as early as possible after U-Boot and adding a “.” approximately every 5-seconds or so, finally clearing at the end of full-boot and display “Ready.”

    Since the I2C driver is not loaded until way late in the boot process, I figure that I need to write something at the bare metal GPIO level. What would be a good clean strategy to accomplish displaying booting status to this I2C display?

    Thank you,

    Leonard



  • @lzerman

    If not particular about using I2C 128x32 display, there are OLED modules that interface with UART.

    Please see this link:
    https://www.digole.com/index.php?productID=545

    I contacted them, question@digole.com, about using those as a console display.

    Got the reply:
    <<
    In order to use this display as a tiny console, you need to modify the message which send to our display: add "TT" to the head of message. eg.: "TTHello world!" will show "Hello world!" on the screen.

    But, if there are large quantity of demand, we can modify the firmware as a pure console.
    Best Regards,

    - Victor
    <<

    Thanks.



  • Yes, we are particular about the size format of the display. It has to fit in a specialized handle. The display is a constant where the variable comes in is the "when" I can update the display during the boot using I2C even at the bare hardware level. I figure I can add a driver load (and die no error) to several points spread-out across the boot list to hit the I2C for the display, but being with 40-years of expertise with microcontrollers but new to the Omega2S specifically, my guess is the hive-mind of this community has probably encountered this issue with brilliant solutions before.



  • Without changing uboot itself (custom build), I guess the earliest point in time you could do something is when boot time modules (from /etc/modules-boot.d/) get loaded, which is about 2 seconds after kernel starts executing (see dmesg). Kernel loading/decompressing also takes maybe 2-3 seconds before that, so you'll have ~5 seconds dark time after powerup anyway.

    As far as I can see, the i2c_mt7621 does not have any dependencies apart from i2c_coreso you could put those very early into the /etc/modules-boot.d list. Then, make a simple kernel module of your own, which also loads early and can use the kernel i2c support to talk to your display in a clean way. Such a module can also use kernel timer infrastructure, so you could easily make it animate something on the display during further boot without the need to sprinkle the boot list with update calls.

    You'd need to setup a openwrt build environment and get the basics of writing a kernel module, but with 40 years of experience in the field, that should be no real obstacle, I guess 😉



  • Thank you for such an excellent reply. It points me in the right direction. We may be doing a custom U-Boot and kernel build anyhow. I am starting to become fond of this platform. I just picked up the Omega2S a couple weeks ago for the first time and had the streaming USB UVC video working on day one over Wifi.



Looks like your connection to Community was lost, please wait while we try to reconnect.