Achieving Device Communication Via USB Virtual NIC on OK3588 (Linux 5.10.66 + Buildroot)

by yir65681 in Circuits > Linux

1 Views, 0 Favorites, 0 Comments

Achieving Device Communication Via USB Virtual NIC on OK3588 (Linux 5.10.66 + Buildroot)

3.jpg

In embedded system debugging, device interconnection, and system integration, a stable, low-cost, and easily deployable communication method is crucial. On the Rockchip OK3588 platform (Linux 5.10.66 + Buildroot), a solution has been implemented that enables device-to-device communication through a USB NIC, allowing fast point-to-point network connections without requiring additional Ethernet ports or switching equipment.

Solution Overview

This solution leverages the Linux USB Gadget mechanism, allowing the board to automatically create a virtual NIC (usb0) in either USB Host or Device mode. By combining USB physical connectivity with network-protocol communication, it supports:

  1. TCP/IP communication between devices
  2. Rapid debugging / remote maintenance
  3. System integration / functional validation
  4. Cross-platform collaboration (OK3588 + RK3562)


Source Code Modification

RK3562: In addition to the article's configurations, the following should be added:

RK3562 device tree and kernel configuration modification screenshot 1

RK3562 device tree and kernel configuration modification screenshot 2

OK3588: No device-tree changes are needed. Simply enable the same options in menuconfig.

Commands