Skip to content

Instantly share code, notes, and snippets.

@ankurpandeyvns
Last active September 30, 2025 14:22
Show Gist options
  • Select an option

  • Save ankurpandeyvns/5c84f83fa96e33bf6cbdfcaa7d670503 to your computer and use it in GitHub Desktop.

Select an option

Save ankurpandeyvns/5c84f83fa96e33bf6cbdfcaa7d670503 to your computer and use it in GitHub Desktop.
VSOL V2802RH ONU – Command-Line Interface Reference

📚 VSOL V2802RH ONU – Complete CLI Reference (v4, May 26 2025)

This single file combines every command, description, and example captured so far.
It merges the earlier “full” guide with all new commands from the latest terminal session.


🧭 1 · CLI Modes

Prompt Mode What it’s for Example
AP# Privileged EXEC Run‑time monitoring, quick actions AP# ?
AP(config)# Global‑Configuration Persistent settings (logs, ACLs, interfaces…) AP# configuration
RTK.0> Realtek SDK / Diag Raw chipset/PHY access AP# diag

Use exit or Ctrl+Z to step back; ?/tab for context help.


🔝 2 · Top‑Level Commands

(Click any link to jump to its details.)

Emoji Command Short Description
💾 save Save running configuration to flash
🗂 all Dump all MIB tables & chains
📝 set / get Direct MIB read/write
🔧 configuration Enter global‑configuration mode
📉 cpuocpy Show CPU utilisation
🧠 memory Hex‑dump or poke RAM
🐞 debug / undebug Enable/disable protocol debugs
👁 clear Clear counters, ARP cache, etc.
📤 copy Copy files/partitions
🆔 cfgmib Bulk MIB import/export
🌐 pppoe PPPoE session control
🔗 ping / ping6 ICMP echo test
🔍 trace / tracert6 Traceroute utility
🚀 restart Warm reboot
🛰 omcicli / omcidrv OMCI management
📡 tftp File transfers via TFTP
🔌 lansds SerDes & MAC toolkit
🛡 loopback Loopback‑detect settings
⚙️ ethstatus / ethdebug / ethmirror Ethernet diagnostics
🛰 rtkbosa BOSA optics tuning
🛠 rtl8686gmac, rg, rgdump, rgshow Driver/register utilities
🔑 vsEncrypt Vendor encryption tool
🪪 vsproduct Product/licence management
🗜 flash Flash & U‑Boot variables
🔐 dns_permit / dnsv6_permit DNS lock pools
🕳 sarmirror ATM VC mirroring
💡 led LED test‑blinking
👥 login / logout User management / exit
🌞 dsttime Daylight‑Saving Time rules

3 · Command Details & Examples

💾 save

Save the running‑config (RAM) to flash (startup‑config).

AP# save
Save current configuration to flash? (y/n)[n]: y
Saving...OK

🗂 all

Dump the entire onboard MIB tree (huge). Useful for forensic backups.

AP# all
## MIB DUMP ############
[MIB] board_info ...

📝 set / get

Directly modify or read a single MIB leaf.

AP# set sysContact 0 "[email protected]"
AP# get sysContact 0
[email protected]

🔧 configuration

Enter global‑configuration mode, make changes, exit, then save.

AP# configuration
AP(config)# hostname VSOL-Home
AP(config)# exit
AP# save

📉 cpuocpy

Instantaneous CPU occupancy.

AP# cpuocpy
cpu occupancy 7%

🧠 memory

Sub‑cmd Purpose Example
show <addr> Hex‑dump from address memory show 0x80500000
set <addr> <val> Poke a 32‑bit word memory set 0x80500004 0x1

🐞 debug / undebug

Enable selective logging for troubleshooting.

debug arp
debug pppoe
undebug all       # turn everything off

Key topics include: arp, ppp, pppoe, icmp, ipsec, macfilter, fastpath, vsproduct, ... (debug ? lists all).


👁 clear

Reset runtime tables/counters without rebooting.

clear arp-cache
clear counter         # interface/stat counters
clear mac-address-table

📤 copy

Copy files between flash, tftp, or running-config.

copy running-config tftp://192.168.1.10/backup.cfg
copy flash:firmware.bin flash:firmware.bak

🆔 cfgmib

Bulk MIB operations (import/export).

cfgmib show                  # list available profiles
cfgmib load factory-default  # apply default profile
cfgmib save mybackup         # create backup profile

🗜 flash

Sub‑cmd What it does Example
erase Delete startup‑config only flash erase
reset Factory‑reset all partitions flash reset
getenv / setenv U‑Boot env variables flash getenv bootdelay
read Raw flash dump flash read 0x0 64
resetlogo / resetloginlogo Restore splash/Login art flash resetlogo

(⚠️ flash reset is destructive.)


🔌 lansds

Complete SerDes / PHY toolkit.

Sub‑cmd Description Example
show SerDes status lansds show
show config Detailed config lansds show config
show vendor <reg> Dump vendor reg lansds show vendor 0x10
set ... Change params lansds set pll 125
initmac0 / detect_mac0_phy Init / detect PHY lansds detect_mac0_phy
reset_8221b Reset ext PHY lansds reset_8221b
initSdsMode <n> 1=SGMII 2=HiSGMII … lansds initSdsMode 2

lansds show config sample output:

LAN SDS mode = 0x5
Phy Speed=2500 duplex_full=1
Serdes link=1 SerdesMode=2(1:SGMII;2:HiSGMII;3:2500BASEX;4:USXGMII;5:NO_SDS)

👥 login / logout

login add admin2 password 0 P@ssw0rd
login show
logout           # end session

🌐 pppoe

pppoe start
pppoe show
pppoe stop

🔗 ping

ping 8.8.8.8 repeat 5 size 56

ping6 2001:4860:4860::8888

🔍 trace / tracert6

trace 8.8.8.8
tracert6 2001:4860:4860::8888

🚀 restart

Warm reboot without full power cycle.

restart

🛰 omcicli

omcicli get onu.gpon.onu-id
omcicli set gem.port 1 admin 1
omcicli dump

📡 tftp

tftp set server 192.168.1.10
tftp put backup.cfg
tftp get firmware.bin

🛡 loopback

Enable or configure loopback‑detect.

loopback enable port 1
loopback show

⚙️ ethstatus

Show per‑port link/speed/duplex.

ethstatus
Port 1: UP 1000FD
Port 2: DOWN

⚙️ ethdebug

ethdebug 1   # enable SAR RX/TX debug
ethdebug 0   # disable

⚙️ ethmirror

ethmirror eth0 1    # mirror eth0 packets to CPU
ethmirror eth0 0    # disable

🛰 rtkbosa

rtkbosa show         # display BOSA parameters
rtkbosa set bias 5   # adjust laser bias

🔑 vsEncrypt

Encrypt or decrypt files/partitions.

vsEncrypt encrypt flash:/config
vsEncrypt decrypt flash:/config.enc

🪪 vsproduct

vsproduct show           # display licence info
vsproduct set key ABC123 # apply key

🔐 dns_permit / dnsv6_permit

dns_permit 8.8.8.8
dnsv6_permit 2001:4860:4860::8888

🕳 sarmirror

Mirror ATM VC packets for capture.

sarmirror 8 35 3   # VPI 8 VCI 35 both directions

🌞 dsttime

Set Daylight‑Saving Time rules.

dsttime enable 2025-03-30 02:00 2025-10-26 03:00
dsttime disable

4 · Quick Cheat‑Sheet

# Save & back‑up
configuration
  hostname MyONU
exit
save
copy running-config tftp://192.168.1.10/onu.cfg

# Reset (careful!)
flash reset

# Network tests
ping 8.8.8.8
trace 8.8.8.8

# Hardware health
lansds show config
ethstatus

# Debug session
debug pppoe
undebug all

Press <Tab> or type ? any time for inline help. Have fun exploring!

@vitorioluiz-create
Copy link

Hello ankurpandeyvns,

I hope you are doing well. I found your post on GitHub about the Realtek RTL960x platform and the V-SOL devices, and it was very helpful. I am currently trying to recover a V-SOL V2802RH ONT that is stuck and no longer boots correctly.

Here’s what I have done so far:

I managed to obtain the official firmware from V-SOL (V2802RH_V1.1.8_241206_S1006.img).

I used binwalk, dd, and unblob to extract possible kernel and rootfs partitions.

I found JFFS2 and EXT4 signatures inside the image, but extracting a usable rootfs has been extremely difficult (pieces are fragmented, and some parts decompress into HTML/login pages instead of a filesystem).

I also confirmed the U-Boot environment via UART, and I can access the bootloader. The commands upk and upr are available to flash kernel and rootfs via TFTP.

The problem:
I cannot find a way to split the .img file into proper uImage (kernel) and rootfs files that the bootloader expects. V-SOL support only provided me with .img files, not .tar, and they stopped replying to my emails.

My question:
👉 Do you know how to properly extract the uImage and rootfs from this .img so I can load them into the device via UART/TFTP?
👉 Or is there already a method to use the .img directly with U-Boot that I am missing?

I would really appreciate any guidance you could provide. I have been trying for weeks, and your experience seems to be exactly what I need to finally move forward.

Thank you very much in advance for your time and help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment