
openwrt
dashanque
这个作者很懒,什么都没留下…
展开
-
open wrt netifd netlink
static voidhandle_hotplug_msg(char *data, int size){ const char *subsystem = NULL, *interface = NULL; char *cur, *end, *sep; struct device *dev; int skip; bool add; if (!strncmp(data, "add@"...原创 2022-03-31 15:34:07 · 640 阅读 · 0 评论 -
openwrt 将编译后的库和头文件放入staging中
主Makefile增加define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(CP) $(PKG_BUILD_DIR)/uci{,_config,_blob,map}.h $(1)/usr/include $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_BUILD_DIR)/libuci.so* $(1)/usr/lib $(CP) $(PKG_BUILD_DIR)/lib...原创 2022-02-23 13:31:45 · 1245 阅读 · 0 评论 -
openwrt ntp
NTP时间蜂窝网络连上后通过notify传给 router/etc/init.d/sysntpd stop && /etc/init.d/sysntpd start原创 2022-01-16 14:02:53 · 512 阅读 · 0 评论 -
uci 使用
uci 使用uci_ctx_router = uci_alloc_context(); //创建操作句柄uci_foreach_element(&local_ctx->root, e) //遍历句柄,已经uci_load的package。入参为root,找到后需要转换成package:p = uci_to_package(e);uci_load(local_ctx, DDNS, &p); //加载一个package,返回操作句柄&pu...原创 2022-01-16 14:01:39 · 1718 阅读 · 0 评论 -
openwrt fota
fota 将所fota包的内容都放在OTA备份分区中。OTA数据覆盖到主分区方法不详。 UBUS_METHOD("download", download_func, download_policy), //UBUS_METHOD("query", query_func, query_policy), UBUS_METHOD("new_query", new_query_func, query_policy), UBUS_METHOD_NOARG("abandon_che...原创 2022-01-16 14:00:34 · 424 阅读 · 0 评论 -
openwrt mgui模块 led灯控
led灯控1.ap侧将开启、关闭、闪烁等配置设到驱动里面,让驱动去做具体的逻辑。/sys/class/leds 属性文件:trigger、brightness、delay_on、delay_off2.20s灭灯逻辑由应用定时器做。3.自动探测充电、ril、wifi、sms模块...原创 2022-01-16 13:57:08 · 444 阅读 · 0 评论 -
无名管道使用
无名管道用于有亲缘关系的进程间通信,如果需要双向通信最好创建两条管道。使用方法fd[2]pipe(fd)使用场景:1.父子进程通信。2.进程和事件回调函数之间通信。原创 2022-01-16 13:55:36 · 119 阅读 · 0 评论 -
openwrt hotplug.d
OpenWrt中的热拔插Hotplug.d中的脚本_flexman09的专栏-优快云博客_hotplug openwrt额外:会在/etc/rc.d目录下创建对应的开机脚本文件。原创 2022-01-12 13:09:46 · 537 阅读 · 0 评论 -
openwrt 启动流程
Openwrt内核启动流程及相关脚本简易分析_猫瑾的博客-优快云博客set -x 调试shell脚本,查看shell执行过程,但命令并未真正执行。原创 2022-01-11 14:36:57 · 279 阅读 · 0 评论 -
ubus 三种通信方式
[openwrt] ubus实现进程间通信举例_落尘纷扰的专栏-优快云博客_ubus_invoke等待数据客户端 ubus中转服务器 产生数据客户端 直接调用 返回调用结果订阅后等待notify ubusd服务器 ...原创 2022-01-09 23:13:54 · 1199 阅读 · 0 评论 -
ubus 数据包格式
原始数据头 struct { struct ubus_msghdr hdr; struct blob_attr data; } hdrbuf;枚举struct ubus_msghdr { uint8_t version; uint8_t type; uint16_t seq; uint32_t peer;} __packetdata;enum ubus_msg_type { /* initial se...原创 2022-01-09 01:25:12 · 361 阅读 · 0 评论 -
epool
https://man7.org/linux/man-pages/man7/epoll.7.htmlepoll是一个服务器编程工具。主要作用是优化了poll性能。原创 2022-01-08 23:58:00 · 95 阅读 · 0 评论 -
openwrt blob与blobmsg
libubox-blob/blobmsg - yuxi_o - 博客园blob是用于描述一组二进制数据的抽象结构,二进制数据由TLV格式组成。blobmsg是对blob的扩展在L和V之间增加了Value值的名称。在解析blobmsg数据需要注意,第一层在解析时获取待解析数据使用blob_data获取待解析数据长度使用blob_len....原创 2022-01-08 23:11:39 · 889 阅读 · 0 评论 -
umg模块
enum DEFAULT_ROUTE FORBIDDEN_BIT FORBIDDEN_BY QOS_ #define USER_MAX_COUNT 100 #define PCTL_MAX_COUNT 5 数据结构 parental_ctrl_t monitored_user_t user_manager_t 功能 FORBIDDEN_BY_USER_LIST = 0, 最大用户数量100,...原创 2021-12-28 00:26:06 · 248 阅读 · 0 评论 -
openwrt 编译
OpenWRT添加模块 Makefile和Config.in - 小青年% - 博客园原创 2021-12-04 17:37:23 · 74 阅读 · 0 评论 -
asr 功能记录
1.usb检测操作系统类型1826 dvc.docx2.关闭modemASR1802SL和ASR1826如何不起CP.docx3.user模式与production模式ASR1826 production和user模式如何切换.pdf4.fota包制作ASR1826 平台如何制作FOTA包和进行测试.pdf原创 2021-12-04 17:35:11 · 1116 阅读 · 0 评论