🔐 Login
📝 Sign Up
🔑 Forgot Password

Welcome Back!

Enter your credentials to continue

Create Account

Join our secure network

Recovery

Reset your password via email

Onion Omega Series Overview

The Onion Omega series consists of compact, Linux-based IoT development boards designed for embedded systems, automation, and networking applications. These modules provide built-in Wi-Fi, GPIO expansion, and support for various peripherals, making them ideal for IoT, robotics, and industrial automation projects.

Onion Omega Module Variants

Omega2

Base model with 580 MHz MIPS CPU, 64MB RAM, and 16MB flash storage, expandable via Onion docks.

Omega2+

Upgraded version: 128MB RAM, 32MB flash, microSD slot for storage expansion.

Front view of Onion Omega 2 & 2+ boards

Omega2S & Omega2S+

Surface-mount versions designed for integration into custom PCBs; same features as Omega2/Omega2+.

Front view of Onion Omega 2s & 2s+ boards

Omega2 LTE

Adds LTE modem support for mobile data connectivity.

Omega2 Pro

Fully integrated development platform with built-in power regulation, storage, and expansion connectors.

Omega2 Dash

Includes built-in 3.2" touchscreen LCD for GUI applications.

Feature Comparison Table
Model CPU RAM Flash Storage MicroSD Slot Wi-Fi LTE Touchscreen GPIO
Omega2 580 MHz MIPS 64MB 16MB No Yes No No 18
Omega2+ 580 MHz MIPS 128MB 32MB Yes Yes No No 18
Omega2S 580 MHz MIPS 64MB 16MB No Yes No No 18
Omega2S+ 580 MHz MIPS 128MB 32MB Yes Yes No No 18
Omega2 LTE 580 MHz MIPS 128MB 32MB Yes Yes Yes No 18
Omega2 Pro 580 MHz MIPS 128MB 256MB Yes Yes No No 18
Omega2 Dash 580 MHz MIPS 128MB 32MB Yes Yes No Yes (3.2") 18
Conclusion

The Onion Omega series provides a range of IoT and embedded development solutions, from basic microcontrollers to LTE-connected modules and touchscreen-enabled devices. Depending on your application, you can choose a model that best fits your performance, connectivity, and interface needs.

Comprehensive History of Onion Omega

Onion Omega is a series of compact, Linux-based single-board computers and IoT development boards launched by Onion Corporation in 2014. Optimized for headless operation, the boards run Linux/OpenWrt and focus on IoT applications, cloud connectivity, and embedded systems.

Onion Omega (2014) – MT7688 SoC, 64MB RAM, 16MB NAND flash, Wi-Fi, USB OTG, Linux/OpenWrt, IoT prototyping.
Onion Omega2 (2016) – Upgraded MT7688 SoC, 128MB RAM, 16MB flash, smaller footprint, cloud connectivity via Onion Cloud platform, modular expansion through Dock system.
Onion Omega2+ (2017) – 256MB RAM, 32MB flash, better power management, compatible with all Omega2 docks, fully OpenWrt/Linux supported.
Omega2S / Omega2S+ (2018–2019) – SPI flash instead of NAND, optional Ethernet expansion, low-power operation.
Omega2 Pro (2020) – 512MB RAM, 32MB flash, enhanced networking performance, professional variant for commercial IoT applications.

Onion Omega boards remain popular in the maker and IoT communities for their small size, low power consumption, integrated Wi-Fi, and modular Dock system. The Onion Cloud platform enables remote management, monitoring, and software deployment.

WiFi on Onion Omega Series

The Onion Omega series comes with built-in WiFi, enabling seamless wireless communication for IoT projects. With its WiFi capabilities, the Omega can easily connect to networks, communicate with remote servers, and interact with other devices in your system.

WiFi Features
  • Built-in 802.11b/g/n WiFi for fast, reliable wireless communication.
  • Supports WPA/WPA2 encryption for secure wireless connections.
  • Easy setup via the web interface or terminal commands.
  • Ability to create a WiFi hotspot, allowing the Omega to function as an access point.
Connecting to a WiFi Network

To connect the Omega to a WiFi network, follow these steps:

  1. Access the Omega's web interface or SSH into the device.
  2. Scan available networks:
    iw dev wlan0 scan
  3. Connect to your network:
    wifi config wlan0 -i <SSID> -p <password>
Managing WiFi Connections

After connecting to a network, you can manage and monitor the connection using the following commands:

  • Check current IP address:
    ifconfig wlan0
  • Check connection status:
    iw dev wlan0 link
  • List saved WiFi configurations:
    wifi show
Creating a WiFi Hotspot

You can configure the Onion Omega as a WiFi access point for other devices to connect:

  1. Set up the hotspot interface:
    wifi hotspot start -i wlan0 -s MyOmegaAP -p password123
  2. Check active hotspot:
    wifi hotspot status
  3. Stop the hotspot:
    wifi hotspot stop
Advanced WiFi Commands
  • Reboot WiFi interface:
    ifconfig wlan0 down && ifconfig wlan0 up
  • Monitor WiFi traffic:
    tcpdump -i wlan0
  • Ping an external server to test connection:
    ping -c 4 8.8.8.8
Ethernet on Onion Omega Series

The Onion Omega series is designed primarily for WiFi connectivity, but it also supports wired Ethernet networking. Ethernet connectivity can be achieved either through a USB-to-Ethernet adapter or by using the official Onion Ethernet Dock, which provides a dedicated RJ45 Ethernet interface.

Using USB-to-Ethernet Adapters

The Omega2 and Omega2+ support USB-to-Ethernet adapters through their USB host interface. Adapters based on common chipsets such as ASIX AX88772 or Realtek RTL8152 are typically supported by OpenWrt-based firmware.

When connected, the adapter is detected as an Ethernet interface (usually eth0 or eth1) and can be configured using standard OpenWrt networking tools.

Onion Ethernet Dock

The Onion Ethernet Dock is an official expansion board for the Omega2 and Omega2+ that provides a built-in RJ45 Ethernet port. Internally, the dock uses a USB-to-Ethernet controller, but it presents itself as a native Ethernet interface to the operating system.

When the Omega is seated in the Ethernet Dock, the wired network interface is automatically available without additional drivers or configuration in standard Onion/OpenWrt firmware builds.

This is the preferred solution when reliable wired networking is required, as it avoids adapter compatibility issues and provides mechanical stability.

Enabling Ethernet Connection

Once an Ethernet adapter or Ethernet Dock is connected, the interface can be configured using standard OpenWrt networking commands:

  1. Bring the Ethernet interface up:
    ifconfig eth0 up
  2. Verify link status and IP address:
    ifconfig eth0
  3. Assign a static IP address (example):
    ifconfig eth0 192.168.1.100 netmask 255.255.255.0
  4. Set the default gateway:
    route add default gw 192.168.1.1 eth0
  5. Configure DNS:
    echo "nameserver 8.8.8.8" > /etc/resolv.conf
I2C on Onion Omega Series

The Onion Omega series supports the I2C (Inter-Integrated Circuit) communication protocol, which is commonly used for connecting microcontrollers and peripherals such as sensors, displays, and EEPROMs. I2C allows multiple devices to communicate over a two-wire bus: one for data (SDA) and one for clock (SCL).

I2C Features on Onion Omega
  • Supports multiple I2C devices on the same bus.
  • Uses standard 3.3V logic, ensuring compatibility with many devices.
  • Easy configuration via the command line or programming interfaces.
  • Compatible with a variety of I2C sensors and devices like temperature sensors, displays, and ADCs.
Enabling I2C on Onion Omega

By default, the I2C interface is not enabled on the Omega. To enable I2C, follow these steps:

  1. SSH into your Onion Omega device.
  2. Run the following command to enable I2C:
    echo "i2c-gpio" > /sys/module/i2c_bcm2708/parameters/i2c0
  3. Confirm that the I2C bus is available by checking the device tree:
    ls /dev/i2c-0
Using I2C with Devices

Once I2C is enabled, you can start communicating with I2C devices. You can use a tool like i2c-tools or a programming language like Python to interact with I2C peripherals. The common I2C tools are i2cdetect, i2cget, and i2cset, which allow you to detect devices, read, and write data to I2C addresses.

Example: Detecting I2C Devices

i2cdetect -y 0

This will display a matrix showing the I2C addresses of all devices connected to the bus.

Example: Reading Data from an I2C Device

i2cget -y 0 0x48 0x01

This example reads data from address 0x48 (a common I2C address for a temperature sensor) at register 0x01.

Using Python for I2C

Python is a popular choice for communicating with I2C devices on the Omega. The SMBus library makes it easy to communicate with I2C devices using Python.

Example: Python Code to Read from an I2C Device


import smbus

# Initialize the SMBus
bus = smbus.SMBus(0)

# Define the I2C address of the device
device_address = 0x48

# Read a byte of data from register 0x01
data = bus.read_byte_data(device_address, 0x01)

print(f"Data: {data}")
      

This example demonstrates how to initialize the I2C bus and read a byte of data from a device with address 0x48, which could be a temperature sensor or similar device.

Audio on Onion Omega Series

The Onion Omega series offers basic support for audio playback and input through various methods, including digital audio output, analog audio output, and software libraries. While the Omega does not have a dedicated audio chip like some other boards, it is flexible enough to interface with external audio hardware such as USB sound cards, audio shields, and I2S devices. Additionally, it can generate and process audio using its software capabilities.

Audio Output Options

The Omega offers multiple ways to output audio:

  • USB Audio: You can use a USB audio adapter to provide high-quality audio output through the USB port. This method requires a compatible USB sound card or audio interface.
  • I2S Audio: The Omega supports I2S (Inter-IC Sound) for connecting external audio chips, such as DACs (digital-to-analog converters) and audio amplifiers. I2S allows for high-quality, low-latency audio output.
  • Analog Audio (PWM): Audio output can also be achieved using Pulse Width Modulation (PWM). While this is not ideal for high-fidelity audio, it can be used for simple audio signals.
Audio Input Options

For audio input, the Omega can interface with USB audio devices or use GPIO pins in combination with external components. Some options include:

  • USB Audio: Like audio output, USB audio input is supported with compatible USB audio interfaces or microphones.
  • Analog Audio: Audio input via the GPIO pins is possible, though additional circuitry like amplifiers or ADCs may be required for high-quality audio input.
Configuring USB Audio Devices
  1. SSH into your Onion Omega device.
  2. Run the following command to check if the device is recognized:
    lsusb
  3. If the device is detected, use the aplay command to output audio:
    aplay /path/to/audiofile.wav
  4. You can also control volume and playback settings using alsamixer and other ALSA tools.
Using I2S for Audio
  1. Ensure that I2S peripherals (such as a DAC or audio codec) are connected to the correct GPIO pins.
  2. Use a library like onion-i2s to configure I2S and send audio data.
  3. Example Python code for sending audio data over I2S:
    
    import I2S
    
    # Initialize I2S interface
    i2s = I2S.I2S()
    
    # Send audio data to I2S DAC
    i2s.write(data)
              
Audio Software Support

On the Onion Omega, you can use a variety of software tools to work with audio. The Omega is compatible with standard Linux audio software packages such as ALSA (Advanced Linux Sound Architecture) and PulseAudio. These tools allow you to control audio settings, record audio, and play audio files directly from the command line or through scripts.

Installing ALSA for Audio Control

To install ALSA and related tools on the Onion Omega, use the following command:

opkg update
opkg install alsa-utils

Playing Audio Files

Once ALSA is installed, you can play audio files directly from the command line. For example:

aplay /path/to/audiofile.wav

This will send the audio to the default sound device on the Omega.

Limitations

While the Onion Omega provides several options for handling audio, it is important to note that it is not primarily designed as an audio-focused device. As such, high-quality, low-latency audio applications may require additional hardware or configuration. For critical applications, it is recommended to use dedicated audio interfaces such as USB sound cards or I2S DACs.

Supported Models

The audio features described here are available on all Onion Omega models. However, external peripherals such as USB audio devices and I2S DACs will determine the audio quality and functionality available on your device. Here’s a summary of the Omega models:

  • Onion Omega 2
  • Onion Omega 2+
  • Onion Omega 2S
SPI on Onion Omega Series

The Onion Omega series supports the SPI (Serial Peripheral Interface) communication protocol, which is widely used for connecting high-speed peripherals like sensors, displays, SD cards, and EEPROMs. SPI is a full-duplex communication protocol that uses separate lines for data input, data output, clock, and chip select, making it ideal for high-speed data transfer.

SPI Features on Onion Omega
  • High-speed communication with devices like displays, SD cards, and sensors.
  • Multiple SPI devices can be connected using different chip select (CS) lines.
  • 3.3V logic, compatible with most modern peripherals.
  • SPI hardware support for fast data transfer rates.
  • Easy configuration via the command line or programming interfaces.
Enabling SPI on Onion Omega
  1. SSH into your Onion Omega device.
  2. Enable the SPI bus:
    echo "spi-bcm2708" > /sys/module/spi_bcm2708/parameters/spi0
  3. Verify the SPI bus is available:
    ls /dev/spidev0.0
Using SPI with Devices

Once SPI is enabled, you can communicate with SPI devices using command-line tools or programming languages like Python. Common utilities include spidev and spi-config.

Example: Communicating with an SPI Device


# Send a command to an SPI device at SPI bus 0, chip select 0
spidev -d /dev/spidev0.0 -b 50000 -s 0x01
      

This example communicates with an SPI device using bus 0, chip select 0, sending command 0x01 at 50,000 Hz.

Using Python for SPI

Python provides a convenient way to interact with SPI devices using the spidev library.

Example: Python Code to Communicate with an SPI Device


import spidev

# Initialize the SPI bus
spi = spidev.SpiDev()

# Open SPI bus 0, device 0
spi.open(0, 0)

# Set SPI speed and mode
spi.max_speed_hz = 50000
spi.mode = 0

# Send data to the device
response = spi.xfer2([0x01])

print(f"Response from SPI device: {response}")

# Close SPI bus
spi.close()
      

This Python example demonstrates opening the SPI bus, setting speed and mode, communicating with a device, and closing the bus.

Timer and PWM on Onion Omega Series

The Onion Omega series supports timers and pulse-width modulation (PWM) for time-based tasks and controlling actuators like motors, LEDs, or other devices. Timers allow for scheduling events and generating precise delays, while PWM enables smooth control over duty cycles for variable output.

Using Timers on Omega

Timers can be used for generating delays, periodic events, or scheduling tasks. You can also configure timers to trigger interrupts for precise event handling.

Example: Measure elapsed time using a Bash timer:


start=$(date +%s%N)
sleep 1
end=$(date +%s%N)
echo "Elapsed: $(( (end - start)/1000000 )) ms"
        

Timers can also be accessed from Python for scheduled tasks:


import time

def my_task():
    print("Task executed")

# Execute task every 2 seconds
while True:
    my_task()
    time.sleep(2)
        
Using PWM on Omega

PWM allows you to control devices like LEDs, motors, or servos by adjusting the duty cycle of a digital output. The Onion Omega series supports PWM on multiple GPIO pins.

Configuring PWM via Sysfs:


# Export PWM channel 0
echo "0" > /sys/class/pwm/pwmchip0/export

# Set duty cycle (e.g., 50%)
echo 500000 > /sys/class/pwm/pwm0/duty_cycle

# Set period/frequency (e.g., 1 kHz)
echo 1000000 > /sys/class/pwm/pwm0/period

# Enable PWM output
echo 1 > /sys/class/pwm/pwm0/enable
        

Python Example for PWM:


from OmegaExpansion import PWM

# Initialize PWM on pin 0
pwm0 = PWM(0)
pwm0.set_duty_cycle(50)   # 50% duty cycle
pwm0.set_frequency(1000)  # 1 kHz
pwm0.enable()
        

Advanced PWM Tips:

  • Use different PWM channels for multiple devices.
  • Adjust duty cycle dynamically to dim LEDs or control motor speed.
  • High-frequency PWM can reduce audible noise in motor applications.
  • Combine timers and PWM for precise motion control or signal generation.
Notes & Use Cases
  • LED dimming with PWM duty cycle adjustments.
  • Motor speed control for DC motors or small fans.
  • Generating audio tones using timers + PWM.
  • Scheduling periodic tasks in Python or Bash using timers.
  • Combining PWM with interrupts for responsive control in embedded applications.
Serial Communication on Onion Omega Series

The Onion Omega series provides serial communication capabilities, allowing it to interface with sensors, controllers, and other microcontrollers. Both UART and USB-based serial communication are supported, enabling flexible connectivity for IoT and embedded projects.

Using UART Serial on Omega

To use UART, connect the Omega's TX/RX pins to your serial device. The Omega operates with standard 3.3V logic levels for serial communication.

Set the UART parameters:


stty -F /dev/ttyS0 115200
        

You can use Minicom or screen to communicate over the serial interface.


minicom -D /dev/ttyS0 -b 115200
        

screen /dev/ttyS0 115200
        
Redirecting or Disabling the Default Console

By default, the Omega outputs console messages to UART0. You can redirect this console to another UART or disable it to free the port for your own serial communication.

To disable the console on /dev/ttyS0, edit the /etc/inittab file and comment out the line that spawns the serial getty:


# Comment out or remove the following line in /etc/inittab
# T0:23:respawn:/sbin/getty -L ttyS0 115200 vt100
        

Alternatively, to redirect the console to USB serial:


# Redirect console to ttyUSB0
echo "console=ttyUSB0,115200" >> /boot/cmdline.txt
        

After making these changes, reboot the device to apply the new console settings:


reboot
        
Notes & Tips
  • Ensure voltage levels match your connected serial devices (3.3V logic).
  • Disabling the default console frees the UART for other communication without interference.
  • USB-to-serial adapters can be used if you want multiple serial interfaces.
  • Always test serial communication using a simple echo or loopback before connecting to complex devices.
GPIO on Onion Omega Series

The Onion Omega series offers GPIO pins that allow you to interface with a wide range of devices such as LEDs, buttons, sensors, and relays. These pins are capable of digital input and output and can be configured for various applications.

Using GPIO on Omega

The Omega uses a simple file-based interface to control GPIO pins. You can easily export GPIO pins, configure them as input or output, and read or write their states through the command line or scripts.

Basic GPIO Commands

To control GPIO pins, use the following commands:

  1. Export the GPIO pin:
    echo "X" > /sys/class/gpio/export
  2. Set the pin direction (input or output):
    echo "in" > /sys/class/gpio/gpioX/direction
  3. Write to the pin:
    echo "1" > /sys/class/gpio/gpioX/value
Onion Omega Web Interface

The Onion Omega series features a web-based configuration interface called the Console. This web interface provides an easy-to-use GUI for managing system settings, network configurations, and installing software packages.

Accessing the Web Interface

By default, the Omega runs a lightweight web server that hosts the Console. You can access it using any modern web browser.

  1. Connect your computer to the Omega’s WiFi (default SSID: Omega-XXXX).
  2. Open a web browser and go to http://omega-XXXX.local or http://192.168.3.1.
  3. Log in using the default credentials:
    • Username: root
    • Password: (Set during first setup)
Features of the Web Console

The web interface allows users to perform various system management tasks:

  • Dashboard – View system status including CPU usage, memory, and storage.
  • WiFi Setup – Configure WiFi settings to connect the Omega to an existing network.
  • File Manager – Browse and manage files stored on the device.
  • Terminal – Access a built-in web-based command line interface.
  • Package Manager – Install and update software packages.
  • App Store – Install additional Onion Omega apps.
  • System Settings – Manage hostname, password, and network settings.
Installing Additional Web Applications

The Omega supports adding custom web applications via the web server. You can install additional packages to expand the functionality:


# Update package list
opkg update

# Install a lightweight web server
opkg install lighttpd

# Start the web server
/etc/init.d/lighttpd start
        
Developing Custom Web Pages

You can host your own web applications on the Omega by placing HTML, JavaScript, and PHP files in the web server directory:


# Default web server directory
cd /www

# Create an index.html file
echo "<h1>Welcome to my Omega Web Interface</h1>" > /www/index.html
        
Enabling Remote Access

To access the web interface from a remote network, configure port forwarding on your router or use Onion Cloud services for secure remote management.

Conclusion

The web-based interface on Onion Omega provides a convenient way to manage the device, configure settings, and even develop custom web applications. With its built-in Console and the ability to host additional web pages, it is a flexible tool for IoT and embedded applications.

Handling Interrupts on Onion Omega

Interrupts allow the Onion Omega to respond to external events asynchronously, making it ideal for handling real-time inputs such as button presses, sensor triggers, and other hardware signals.

Supported Interrupt Sources
  • GPIO Interrupts – Detects changes in input state.
  • Timer Interrupts – Allows precise timing operations.
  • Peripheral Interrupts – Generated by I2C, SPI, UART, and other hardware modules.
Configuring GPIO Interrupts

Onion Omega GPIO pins can be configured to trigger an interrupt when their state changes. The typical edge detection modes include:

  • Rising Edge – Triggered when a pin changes from LOW to HIGH.
  • Falling Edge – Triggered when a pin changes from HIGH to LOW.
  • Both Edges – Triggered on any state change.
Example: Setting Up a GPIO Interrupt

The following example demonstrates how to configure an interrupt on GPIO 0 using the Omega's fast-gpio utility.


# Install fast-gpio utility if not already installed
opkg update
opkg install fast-gpio

# Configure GPIO 0 as an input
fast-gpio set-input 0

# Attach an interrupt to GPIO 0, triggering on falling edge (button press)
fast-gpio set-interrupt 0 falling
        
Handling Interrupts in Python

For more advanced applications, you can use Python to handle GPIO interrupts using the OPi.GPIO library.


import OPi.GPIO as GPIO
import time

# Use GPIO 0 for the interrupt
interrupt_pin = 0

# Callback function to handle the interrupt
def button_pressed(channel):
    print("Interrupt detected on GPIO", channel)

# Set up GPIO
GPIO.setmode(GPIO.BOARD)
GPIO.setup(interrupt_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)

# Add event detection
GPIO.add_event_detect(interrupt_pin, GPIO.FALLING, callback=button_pressed, bouncetime=300)

# Keep the script running
try:
    while True:
        time.sleep(1)
except KeyboardInterrupt:
    GPIO.cleanup()
        
Using Interrupts in C

For high-performance applications, interrupts can be handled in C using the Omega SDK.


#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <unistd.h>
#include <poll.h>

#define GPIO_PIN "0"

int main() {
    char path[40];
    snprintf(path, sizeof(path), "/sys/class/gpio/gpio%s/value", GPIO_PIN);
    
    int fd = open(path, O_RDONLY);
    if (fd < 0) {
        perror("Failed to open GPIO");
        return 1;
    }

    struct pollfd pfd;
    pfd.fd = fd;
    pfd.events = POLLPRI;

    while (1) {
        lseek(fd, 0, SEEK_SET);
        char buffer[10];
        read(fd, buffer, sizeof(buffer));

        printf("Waiting for interrupt...\n");
        poll(&pfd, 1, -1);
        printf("Interrupt detected on GPIO %s\n", GPIO_PIN);
    }

    close(fd);
    return 0;
}
        
Interrupt Priority and Performance

For real-time applications, interrupt priority can be managed using kernel configurations or by handling events in low-level C instead of user-space scripts.

Conclusion

GPIO interrupts on Onion Omega provide an efficient way to handle external signals without constantly polling for changes. Using Python, Bash, or C, developers can build responsive and efficient embedded applications.

Operating Systems on Onion Omega Series

The Onion Omega series is primarily designed to run a Linux-based operating system, but it also supports alternative operating systems such as RTOS (Real-Time Operating Systems) and bare-metal programming for specialized applications. Below is a detailed guide on the default OS, how to reinstall it, and other operating system alternatives available for the Onion Omega series.

Default Operating System: Omega OS

The default operating system for the Onion Omega series is Omega OS, which is a custom Linux distribution based on OpenWRT. It is designed specifically for embedded development and IoT applications, providing a lightweight and flexible environment for running a variety of applications.

Omega OS is optimized for the Onion Omega's hardware and includes various tools and packages needed for embedded development. It comes with a minimal web interface for configuration and software management, making it simple to get started with your projects.

Key Features of Omega OS:

  • Based on OpenWRT Linux distribution.
  • Supports popular programming languages like Python, Node.js, and more.
  • Access to a wide range of software packages via the opkg package manager.
  • Web-based interface for easy configuration and monitoring.
  • Lightweight, fast booting, and optimized for IoT applications.

Reinstalling Omega OS

If you need to reinstall Omega OS on your Onion Omega device, follow these steps:

1. Download Omega OS Image

First, download the latest version of Omega OS from the Onion IoT website:

2. Prepare the SD Card

To reinstall the OS, you will need a microSD card with at least 4 GB of storage. Use an SD card reader to connect the card to your computer.

Format the SD card using a tool like SD Formatter or the built-in disk utility of your operating system to ensure the card is clean and ready for installation.

3. Flash the Image

Use an image flashing tool to write the Omega OS image to the SD card:

  • On Windows, use Balena Etcher to flash the image.
  • On Linux, use the dd command to write the image:
  • sudo dd if=omega_os_image.img of=/dev/sdX bs=4M status=progress && sync

4. Boot the Onion Omega

Insert the SD card into the Onion Omega and power it on. The device will boot into Omega OS automatically. You can now proceed with the initial setup, which includes connecting to a Wi-Fi network, setting up SSH access, and configuring the system.

Alternative Operating Systems

While Omega OS is the default and recommended operating system, you can also run alternative operating systems on the Onion Omega series, including RTOS or bare-metal programming for more specialized use cases.

1. Real-Time Operating Systems (RTOS)

Real-Time Operating Systems are used in applications where precise timing and quick response times are critical, such as robotics or automation systems. Some RTOS options you can consider for the Onion Omega include:

  • FreeRTOS: A lightweight and widely-used RTOS for embedded systems. It supports multi-threading, task scheduling, and real-time clock management.
  • ChibiOS: A compact and fast RTOS designed for real-time applications, with low memory usage and a focus on performance.
  • RIOT OS: An open-source RTOS designed for IoT devices, with a focus on low-power operation and scalability.

To use an RTOS, you will need to build it from source and load it onto the Omega. For most RTOSes, this involves setting up a cross-compilation environment and flashing the firmware to the device.

2. Bare-Metal Programming

Bare-metal programming involves writing programs directly to the hardware without using an operating system. This is useful for applications that require maximum control over the hardware and minimal overhead.

To get started with bare-metal programming on the Onion Omega, you will need a toolchain that supports the MIPS architecture and tools for flashing the firmware onto the Omega. You can write code in C or assembly, compile it using a cross-compiler, and then load the program onto the device. Some key resources to help you get started include:

Resetting the Default Password on Onion Omega

If you forget the password for your Onion Omega, you can reset it using either a direct serial connection or by booting into failsafe mode.

Method 1: Resetting the Password via SSH or Serial Console

  1. Connect to the Omega using SSH or a serial terminal:
    
    # If connected to Omega's WiFi:
    ssh root@omega-XXXX.local
    
    # Or use the IP address:
    ssh root@192.168.3.1
              
  2. Once logged in, change the password using:
    passwd
  3. Enter the new password twice to confirm.

Method 2: Reset Password in Failsafe Mode

  1. Power on the Omega and wait for the boot sequence.
  2. When you see Press any key to stop autoboot, press any key to enter the command line.
  3. Mount the root filesystem in writable mode:
    mount_root
  4. Reset the password using:
    passwd
  5. Reboot the Omega to apply the changes:
    reboot

Method 3: Factory Reset to Default Settings

  1. Press and hold the Reset button for 10 seconds.
  2. The Omega will restart and reset all settings, including the password.
  3. After rebooting, connect to its default WiFi (Omega-XXXX) and log in using:
    • Username: root
    • Password: (empty, set during first login)

Configuring Onion Omega to Boot from Internal Flash with SD Card as Main Storage

This guide will help you configure your Onion Omega device to boot from its internal flash memory while using the SD card as the main storage drive.

Prerequisites

  • Onion Omega device (e.g., Omega2 or Omega2+)
  • A microSD card (formatted with ext4 filesystem)
  • SSH access to the Omega2 (via USB or Wi-Fi)
  • Basic knowledge of Linux-based systems

Step 1: Prepare the SD Card

sudo mkfs.ext4 /dev/sdX
sudo mount /dev/sdX1 /mnt
sudo mkdir /mnt/storage

Step 2: Prepare the Omega2

mount -o rw /dev/mtdblock0 /mnt/omega

Step 3: Copy Data from Internal Flash to SD Card

cp -a /mnt/omega/home /mnt/storage/
cp -a /mnt/omega/usr /mnt/storage/

Step 4: Modify Mount Points

/etc/fstab
vi /etc/fstab
/dev/mmcblk0p1 /home ext4 defaults 0 0
/dev/mmcblk0p1 /usr ext4 defaults 0 0

Step 5: Update Bootloader Configuration

printenv
setenv bootcmd 'bootm 0x9f000000'
saveenv

Step 6: Reboot and Verify

reboot

Step 7: Check the Mounts

df -h

Troubleshooting

  • If the system doesn't boot properly or the SD card is not mounted correctly, double-check your /etc/fstab file for correct paths.
  • Ensure the SD card is properly formatted and connected.
  • You can check the boot log for errors related to the SD card mounting or any other related issues.