惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

F
Fortinet All Blogs
Recent Announcements
Recent Announcements
H
Help Net Security
Y
Y Combinator Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
有赞技术团队
有赞技术团队
小众软件
小众软件
Last Week in AI
Last Week in AI
U
Unit 42
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
H
Hackread – Cybersecurity News, Data Breaches, AI and More
J
Java Code Geeks
Microsoft Security Blog
Microsoft Security Blog
G
Google Developers Blog
N
Netflix TechBlog - Medium
Blog — PlanetScale
Blog — PlanetScale
云风的 BLOG
云风的 BLOG
V
V2EX
博客园 - 聂微东
人人都是产品经理
人人都是产品经理
博客园 - 三生石上(FineUI控件)
阮一峰的网络日志
阮一峰的网络日志
爱范儿
爱范儿

博客园 - lsgxeva

SD 卡 / T F卡(Micro SD)检测工具解析:如何用硬件工具确保存储介质可靠性? 第一个案例策略 不用#ifdef写跨平台代码 Windbg常用调试命令 全频段阻塞 Practical Clean Architecture in Typescript, Rust & Python 摄像头配置 ClickToRunSvc logiccircuit help Python 模块 NumPy 影像处理 AI协作 Python 函数和类 Python 入门 VisionLink-RT VisionLink-AI-Glasse RK3588 firefly net n2n config OpenWrt 集成 openNDS 进行 强制门户(Captive Portal) 认证 eh.h acu100 bridge vlan config 卫星天线(KA 0.85m 4W_BUC)使用 SatBox331-20 Modem 的性能情况 OpenSpec OPSX 完整指南 Claude Skill Creator 2.0 完整上手攻略 Auto-Memory + CLAUDE.md Conductor 完整上手攻略 GitNexus 完整上手攻略 code-review-graph 完整上手攻略 Claude Code Hooks 完整开发者指南 Openwrt switch vlan配置 llm-course Claude Code 入门教程
OpenWrt 集成 easycwmpd 成为 TR-069协议中的设备端(CPE)
lsgxeva · 2026-06-17 · via 博客园 - lsgxeva

easycwmpd 是 EasyCwmp 这个开源 CWMP(CPE WAN Management Protocol) 客户端软件的核心后台守护进程(daemon)

easycwmp 支持通过 --json-input 参数,以交互式JSON命令的方式模拟ACS的RPC调用,非常适合用来测试特定参数的 get 和 set 脚本逻辑是否正确

easycwmpd 通过 ubus 与OpenWrt系统通信。如果 ubus list 输出中看不到 tr069,说明通信可能有问题,可以尝试手动设置 ubus 套接字路径后重启服务

root@LWrt:~# 
root@LWrt:~# cat /etc/config/easycwmp 

config local
        option enable '1'
        option interface 'wan'
        option port '7547'
        option ubus_socket '/var/run/ubus.sock'
        option date_format '%FT%T%z'
        option username 'easycwmp'
        option password 'easycwmp'
        option authentication 'Digest'
        option logging_level '3'

config acs
        option url 'http://192.168.1.110:8080/openacs/acs'
        option username 'easycwmp'
        option password 'easycwmp'
        option periodic_enable '1'
        option periodic_interval '100'
        option periodic_time '0001-01-01T00:00:00Z'

config device
        option manufacturer 'LWrt'
        option oui '9483C4'
        option product_class 'Generic'
        option serial_number '9483C40C47E6'
        option hardware_version 'v0'
        option software_version 'r37854-4b24da3b4c5c'

root@LWrt:~# 
root@LWrt:~# ps -ef | grep easycwmp
 7242 root      8344 S    /usr/sbin/easycwmpd -f --boot
31319 root      1424 S    grep easycwmp
root@LWrt:~# 
root@LWrt:~# easycwmp -h
USAGE: /usr/sbin/easycwmp command [parameter] [values]
command:
  get [value|notification|name]
  set [value|notification]
  apply [value|notification|object|service]
  add [object]
  delete [object]
  download
  upload
  factory_reset
  reboot
  inform [parameter|device_id]
  --json-input
invalid action '-h'
root@LWrt:~# 
root@LWrt:~# easycwmp get value
{ "parameter": "Device.DeviceInfo.SpecVersion", "value": "1.0" }
{ "parameter": "Device.DeviceInfo.ProvisioningCode", "value": "" }
{ "parameter": "Device.DeviceInfo.Manufacturer", "value": "LWrt" }
{ "parameter": "Device.DeviceInfo.ManufacturerOUI", "value": "9483C4" }
{ "parameter": "Device.DeviceInfo.ModelName", "value": "GL-MT300N-V2" }
{ "parameter": "Device.DeviceInfo.ProductClass", "value": "Generic" }
{ "parameter": "Device.DeviceInfo.SerialNumber", "value": "9483C40C47E6" }
{ "parameter": "Device.DeviceInfo.HardwareVersion", "value": "v0" }
{ "parameter": "Device.DeviceInfo.SoftwareVersion", "value": "r37854-4b24da3b4c5c" }
{ "parameter": "Device.DeviceInfo.UpTime", "value": "1328", "type": "xsd:unsignedInt" }
{ "parameter": "Device.DeviceInfo.DeviceLog", "value": "" }
{ "parameter": "Device.DeviceInfo.MemoryStatus.Total", "value": "250556" }
{ "parameter": "Device.DeviceInfo.MemoryStatus.Free", "value": "120244" }
{ "parameter": "Device.DHCPv4.Server.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.DHCPv4.Server.Pool.1.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.DHCPv4.Server.Pool.1.Status", "value": "Enabled" }
{ "parameter": "Device.DHCPv4.Server.Pool.1.Interface", "value": "Device.IP.Interface.2." }
{ "parameter": "Device.DHCPv4.Server.Pool.1.MinAddress", "value": "192.168.100.100" }
{ "parameter": "Device.DHCPv4.Server.Pool.1.MaxAddress", "value": "192.168.100.250" }
{ "parameter": "Device.DHCPv4.Server.Pool.1.SubnetMask", "value": "255.255.255.0" }
{ "parameter": "Device.DHCPv4.Server.Pool.1.DNSServers", "value": "" }
{ "parameter": "Device.DHCPv4.Server.Pool.1.IPRouters", "value": "192.168.100.1\/24" }
{ "parameter": "Device.DHCPv4.Server.Pool.1.LeaseTime", "value": "43200", "type": "xsd:int" }
{ "parameter": "Device.DHCPv4.Server.Pool.2.Enable", "value": "0", "type": "xsd:boolean" }
{ "parameter": "Device.DHCPv4.Server.Pool.2.Status", "value": "Disabled" }
{ "parameter": "Device.DHCPv4.Server.Pool.2.Interface", "value": "Device.IP.Interface.3." }
{ "parameter": "Device.DHCPv4.Server.Pool.2.MinAddress", "value": "192.168.110.0" }
{ "parameter": "Device.DHCPv4.Server.Pool.2.MaxAddress", "value": "192.168.110.0" }
{ "parameter": "Device.DHCPv4.Server.Pool.2.SubnetMask", "value": "255.255.255.0" }
{ "parameter": "Device.DHCPv4.Server.Pool.2.DNSServers", "value": "192.168.110.1" }
{ "parameter": "Device.DHCPv4.Server.Pool.2.IPRouters", "value": "192.168.110.93" }
{ "parameter": "Device.DHCPv4.Server.Pool.2.LeaseTime", "value": "0", "type": "xsd:int" }
{ "parameter": "Device.IP.Interface.1.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.IP.Interface.1.Name", "value": "loopback" }
{ "parameter": "Device.IP.Interface.1.Type", "value": "Loopback" }
{ "parameter": "Device.IP.Interface.1.IPv4AddressNumberOfEntries", "value": "1", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.1.IPv4Address.1.IPAddress", "value": "127.0.0.1" }
{ "parameter": "Device.IP.Interface.1.IPv4Address.1.AddressingType", "value": "Static" }
{ "parameter": "Device.IP.Interface.1.IPv4Address.1.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.IP.Interface.1.IPv4Address.1.SubnetMask", "value": "255.0.0.0" }
{ "parameter": "Device.IP.Interface.1.Stats.BytesSent", "value": "68316", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.1.Stats.BytesReceived", "value": "68316", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.1.Stats.PacketsSent", "value": "952", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.1.Stats.PacketsReceived", "value": "952", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.1.Stats.ErrorsSent", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.1.Stats.ErrorsReceived", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.1.Stats.DiscardPacketsSent", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.1.Stats.DiscardPacketsReceived", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.2.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.IP.Interface.2.Name", "value": "lan" }
{ "parameter": "Device.IP.Interface.2.Type", "value": "Normal" }
{ "parameter": "Device.IP.Interface.2.IPv4AddressNumberOfEntries", "value": "1", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.2.IPv4Address.1.IPAddress", "value": "192.168.100.1" }
{ "parameter": "Device.IP.Interface.2.IPv4Address.1.AddressingType", "value": "Static" }
{ "parameter": "Device.IP.Interface.2.IPv4Address.1.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.IP.Interface.2.IPv4Address.1.SubnetMask", "value": "255.255.255.0" }
{ "parameter": "Device.IP.Interface.2.Stats.BytesSent", "value": "4957296", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.2.Stats.BytesReceived", "value": "878582", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.2.Stats.PacketsSent", "value": "5201", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.2.Stats.PacketsReceived", "value": "4390", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.2.Stats.ErrorsSent", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.2.Stats.ErrorsReceived", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.2.Stats.DiscardPacketsSent", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.2.Stats.DiscardPacketsReceived", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.3.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.IP.Interface.3.Name", "value": "wan" }
{ "parameter": "Device.IP.Interface.3.Type", "value": "Normal" }
{ "parameter": "Device.IP.Interface.3.IPv4AddressNumberOfEntries", "value": "1", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.3.IPv4Address.1.IPAddress", "value": "192.168.110.93" }
{ "parameter": "Device.IP.Interface.3.IPv4Address.1.AddressingType", "value": "DHCP" }
{ "parameter": "Device.IP.Interface.3.IPv4Address.1.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.IP.Interface.3.IPv4Address.1.SubnetMask", "value": "255.255.255.0" }
{ "parameter": "Device.IP.Interface.3.Stats.BytesSent", "value": "964083", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.3.Stats.BytesReceived", "value": "4870554", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.3.Stats.PacketsSent", "value": "5440", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.3.Stats.PacketsReceived", "value": "6773", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.3.Stats.ErrorsSent", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.3.Stats.ErrorsReceived", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.3.Stats.DiscardPacketsSent", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Interface.3.Stats.DiscardPacketsReceived", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Diagnostics.IPPing.DiagnosticsState", "value": "None" }
{ "parameter": "Device.IP.Diagnostics.IPPing.Host", "value": "" }
{ "parameter": "Device.IP.Diagnostics.IPPing.NumberOfRepetitions", "value": "3", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Diagnostics.IPPing.Timeout", "value": "1000", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Diagnostics.IPPing.DataBlockSize", "value": "64", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Diagnostics.IPPing.SuccessCount", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Diagnostics.IPPing.FailureCount", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Diagnostics.IPPing.AverageResponseTime", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Diagnostics.IPPing.MinimumResponseTime", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.IP.Diagnostics.IPPing.MaximumResponseTime", "value": "0", "type": "xsd:unsignedInt" }
{ "parameter": "Device.ManagementServer.URL", "value": "http:\/\/192.168.1.110:8080\/openacs\/acs" }
{ "parameter": "Device.ManagementServer.Username", "value": "easycwmp" }
{ "parameter": "Device.ManagementServer.Password", "value": "" }
{ "parameter": "Device.ManagementServer.PeriodicInformEnable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.ManagementServer.PeriodicInformInterval", "value": "100", "type": "xsd:unsignedInt" }
{ "parameter": "Device.ManagementServer.PeriodicInformTime", "value": "0001-01-01T00:00:00Z", "type": "xsd:dateTime" }
{ "parameter": "Device.ManagementServer.ConnectionRequestURL", "value": "http:\/\/192.168.110.93:7547\/" }
{ "parameter": "Device.ManagementServer.ConnectionRequestUsername", "value": "easycwmp" }
{ "parameter": "Device.ManagementServer.ConnectionRequestPassword", "value": "" }
{ "parameter": "Device.ManagementServer.ParameterKey", "value": "" }
{ "parameter": "Device.WiFi.Radio.1.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.WiFi.Radio.1.Status", "value": "Up" }
{ "parameter": "Device.WiFi.Radio.1.Name", "value": "radio0" }
{ "parameter": "Device.WiFi.Radio.1.SupportedFrequencyBands", "value": "" }
{ "parameter": "Device.WiFi.Radio.1.OperatingFrequencyBand", "value": "" }
{ "parameter": "Device.WiFi.Radio.1.ChannelsInUse", "value": "" }
{ "parameter": "Device.WiFi.Radio.1.Channel", "value": "7", "type": "xsd:unsignedInt" }
{ "parameter": "Device.WiFi.Radio.1.AutoChannelSupported", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.WiFi.Radio.1.AutoChannelEnable", "value": "0", "type": "xsd:boolean" }
{ "parameter": "Device.WiFi.Radio.1.OperatingStandards", "value": "HT20" }
{ "parameter": "Device.WiFi.SSID.1.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.WiFi.SSID.1.Status", "value": "Up" }
{ "parameter": "Device.WiFi.SSID.1.Name", "value": "phy0-ap0" }
{ "parameter": "Device.WiFi.SSID.1.LowerLayers", "value": "Device.WiFi.Radio.1." }
{ "parameter": "Device.WiFi.SSID.1.SSID", "value": "WelcomeNDS" }
{ "parameter": "Device.WiFi.SSID.1.X_IPInterface", "value": "Device.IP.Interface.2." }
{ "parameter": "Device.WiFi.AccessPoint.1.Enable", "value": "1", "type": "xsd:boolean" }
{ "parameter": "Device.WiFi.AccessPoint.1.Status", "value": "Enabled" }
{ "parameter": "Device.WiFi.AccessPoint.1.SSIDReference", "value": "Device.WiFi.SSID.1." }
{ "parameter": "Device.WiFi.AccessPoint.1.Security.ModesSupported", "value": "None,WEP-64,WEP-128,WPA-Personal,WPA2-Personal,WPA-WPA2-Personal,WPA3-Personal,WP2-WPA3-Personal,WPA-Enterprise,WPA2-Enterprise,WPA-WPA2-Enterprise,WPA3-Enterprise" }
{ "parameter": "Device.WiFi.AccessPoint.1.Security.ModeEnabled", "value": "None" }
{ "parameter": "Device.WiFi.AccessPoint.1.Security.WEPKey", "value": "", "type": "xsd:hexBinary" }
{ "parameter": "Device.WiFi.AccessPoint.1.Security.PreSharedKey", "value": "", "type": "xsd:hexBinary" }
{ "parameter": "Device.WiFi.AccessPoint.1.Security.KeyPassphrase", "value": "" }
root@LWrt:~#