Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/firmware/_build-env-notes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ import WslNote from './_wsl-note.mdx';
<WslNote/>


**The method recommended by Onion is to use Ubuntu 22.04 Linux in a Docker container.**. Using Docker provides isolation, which helps prevent dependency conflicts with existing software on the host system and ensures a clean, reproducible development environment.
**The method recommended by Onion is to use Ubuntu 22.04 Linux in a Docker container.** Using Docker provides isolation, which helps prevent dependency conflicts with existing software on the host system and ensures a clean, reproducible development environment.
2 changes: 1 addition & 1 deletion docs/introduction/firmware-revision-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ The new Omega2 firmware (23.05.3) is based on OpenWRT 23.05, and it's running th
- Uses the open source mt76 WiFi driver - more flexibility and functionality.
- Easier and faster methods for building custom packages and firmware.

See the [What's new in v23.05.3 article](./whats-new-in-v23.05.3) for more details. <!-- TODO: update above with OPENWRT_RELEASE variable? -->
See the [What's new in v23.05.3 article](./whats-new) for more details. <!-- TODO: update above with OPENWRT_RELEASE variable? -->

<GiscusDocComment />
83 changes: 83 additions & 0 deletions docs/networking/find-ip-address.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
---
title: Finding the Omega's IP Address
---

import { GiscusDocComment } from '/src/components/GiscusComment';

Every device on a network is assigned a unique identifier called an IP address. An IPv4 address consists of four numbers ranging from 0 to 255, separated by periods — for example, `192.168.0.100`.


Knowing the Omega's IP address is required for accessing it over the local network. This includes:
- Accessing the command-line through SSH
- Accessing a web server hosted on the Omega
- Transferring files to and from the Omega using protocols like SCP, FTP, and rsync

## Procedure to Determine the IP Address

This procedure relies on the `ifconfig` utility to find the Omega's IP address. The `ifconfig` utility is a common Linux utility for monitoring network interfaces and is installed on the Omega by default.

First, determine which network interface to check, and then use `ifconfig` to find the IP address.

:::info Note

To run the `ifconfig` command, access to the Omega's command line is required. To connect to the command line either:
- Use a serial connection: see the [quickstart guide](../quickstart/serial-command-line) for details
- Connect via the WiFi AP: Connect to the Omega's default WiFi Access Point and SSH into 192.168.3.1, which is the Omega's default IP address on its AP.

:::

### Step 1: Determine the Relevant Network Interface

The Omega has several network interfaces. The interface that should be checked depends on how the Omega is connected to the network:

* Use `apcli0` for connections to an existing WiFi network as a client
* Use `eth0` for Ethernet connections
* Use `ra0` for the Omega's WiFi Access Point

:::note Note

The Omega's IP address on its own WiFi Access Point is set in the network configuration in `/etc/config/network`. It is not assigned by an external DHCP server.

:::

### Step 2: Run the `ifconfig` Command

To find the IP address of the Omega on a specific interface, run the following command:

```shell
ifconfig <interface-name>
```

**When connected to an existing WiFi network:**

```shell
ifconfig apcli0
```

**When connected via Ethernet to a network:**

```shell
ifconfig eth0
```

**When connected to the Omega's own WiFi Access Point:**

```shell
ifconfig ra0
```

### Step 3: Locate the IP Address

The IP address will be in the output of the `ifconfig` command, among other information:

![command line output of ifconfig command with ip address highlighted on omega2 ](./assets/omega2-ip-address-check.png)

Look for the line containing `inet addr:`. **This line shows the Omega's IP address on that network interface.**

If that line is blank, the Omega does not have an IP address on that network interface. Double check the network configuration and try again.


<!-- TODO: review if `hostname -I` is an alternate method of finding the ip address -->


<GiscusDocComment />
24 changes: 10 additions & 14 deletions docs/packages/custom-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ A package makefile is a central blueprint that provides detailed information abo

- `PKG_NAME` - name of the package.
- `PKG_VERSION and PKG_RELEASE` - version number.
- `Package/mycustomapp/install` - dependencies and package metadata.
- `Package/$(PKG_NAME)` - dependencies and package metadata.
- `Build/Compile` - instructions on how to compile the source code, which is optional and only required if the package source code needs to be compiled (e.g., for C, C++, Rust, or Go programs).
- `Package/mypackage/install` - instructions for the package manager on how to install the compiled package on the target device.
- `Package/$(PKG_NAME)/install` - instructions for the package manager on how to install the compiled package on the target device.

An example of a package makefile:

Expand All @@ -48,31 +48,27 @@ PKG_RELEASE:=3

include $(INCLUDE_DIR)/package.mk

define Package/mycustomapp
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=My Custom Application
DEPENDS:=+libuci +libubus
endef

define Package/mycustomapp/description
define Package/$(PKG_NAME)/description
Custom application for Omega2.
endef

define Build/Compile
# Add compilation instructions here if needed
endef

define Package/mycustomapp/install
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/custom_binary $(1)/usr/bin/
endef

$(eval $(call BuildPackage,mycustomapp))
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mybinary $(1)/usr/bin/
endef

$(eval $(call BuildPackage,mypackage))
$(eval $(call BuildPackage,$(PKG_NAME)))

```

Expand All @@ -88,7 +84,7 @@ The file directory is an optional component found in the package source structur

Additionally, it is a good place to store files that aren’t necessarily application source code but are still helpful to the package, such as config files or the files required to make the package run as a service.

Any files in the file directory that are meant to be installed on the device must be added to the `Package/mypackage/install` section in the package makefile.
Any files in the file directory that are meant to be installed on the device must be added to the `Package/$(PKG_NAME)/install` section in the package makefile.

### Patch Directory

Expand Down Expand Up @@ -128,15 +124,15 @@ Packages sometimes depend on other packages or libraries to function properly. D
By managing package dependencies effectively, developers can ensure their projects are reliable and maintainable.

```shell
define Package/mypackage
define Package/$(PKG_NAME)
SECTION:=utils
CATEGORY:=Utilities
TITLE:=My Custom Package
TITLE:=My Custom Application
DEPENDS:= +libfoo # Example dependency on libfoo
endef
```

In the above example, the mypackage is defined with a dependency on `libfoo`. The `DEPENDS` variable specifies this dependency, ensuring that the `libfoo` package will be installed on the device when the mypackage is installed. This illustrates how package dependencies are explicitly declared and managed within the context of the OpenWRT framework for Omega2 devices.
In the above example, the `mycustomapp` package is defined with a dependency on `libfoo`. The `DEPENDS` variable specifies this dependency, ensuring that the `libfoo` package will be installed on the device when the `mycustomapp` package is installed. This illustrates how package dependencies are explicitly declared and managed within the context of the OpenWRT framework for Omega2 devices.

:::tip

Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Onion recommends the following hardware setup for ease of use:

You'll need a computer and a microUSB to USB cable in addition to the Omega2 hardware.

#### Overview of the process
### Overview of the process

In this first article, we cover the unboxing and powering up of your Omega2. Then we’ll cover connecting to the Omega’s command line and WiFi in separate articles within the QuickStart section. Finally, we'll explore running a Hello World demo program using Python.

Expand Down
1 change: 1 addition & 0 deletions sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const sidebars = {
'networking/wifi',
'networking/ethernet',
'networking/wifi-ethernet',
'networking/find-ip-address',
'networking/ip-address-collisions',
],
},
Expand Down