Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
# Author: John McEleney
# The main purpose of this script is to enable netmode4 on Xiaomi RB01 routers.
# To do this the script poses as a mesh slave, which causes the mesh master to enable netmode4.
# It does this by blindly sending HEX strings captured from an actual mesh negotiation between
# two RB01 routers.
# Enabling netmode is needed as one step in unlocking the router and flashing OpenWrt.
# The router should already have been taken through basic set-up before running this script.
#
@jmceleney
jmceleney / xiaomi-enable-mesh-telnet.py
Last active May 6, 2024 13:54
Python3 file that enables netmode4 on a Xiaomi RB01 AX3200 router
import ssl
import socket
# This script simply replays one side of an intercepted conversation between two Xiaomi
# RB01 (International) AX3200 routers negotiating meshing.
# In effect the script poses as a mesh slave, which causes the mesh master to enable netmode4.
# Enabling netmode is needed as one step in unlocking the router and flashing OpenWrt.
# The router should already have been taken through basic set-up before running this script.
# Netmode4 can be confirmed with curl by requesting the following URL, where ${token} is the "stok"
# variable from your admin session: