找回密码
 立即注册
img_loading
智能检测中

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888广告投放联系QQ68610888
glinet
查看: 2407|回复: 40

[小米其它网络设备] 中枢网关固件提取(更新至v0.8.9)

[复制链接]
发表于 2025-3-15 23:51 | 显示全部楼层 |阅读模式
小米中枢网关固件,提取自Xiaomi全屋路由BE3600 Pro套装RN04主路由,是一个Docker镜像,在此备份,有时间研究看下怎么移植。

中枢网关镜像:
序号
镜像名称
版本标签
网盘地址
密码
备注
1
central_software_pack
v0.7.6
6666
20240607出厂预设版本
2
central_software_pack
v0.8.9
6666
20250210更新 3月发布
极客页面更新至1.6版本
支持Xiaomi Home Integration for Home Assistant



启动网关脚本:
  1. #!/bin/sh

  2. export PATH="$PATH:/data/docker"

  3. CONTAINER_NAME=miot_central
  4. IMAGE_NAME=micr.cloud.mioffice.cn/central_software_pack/central_software_pack
  5. DEFAULT_IMAGE=/data/central/default_image.tar.xz
  6. PLATFORM_CONFIG=/etc/central_software_pack/platform.conf
  7. EXTERNAL_SOCK_DIR=/tmp/miot_central
  8. CONTAINER_DATA_DIR=/data/other/central
  9. FIRST_START_AFTER_OTA=$([ -f /tmp/.post_ota_boot ] && [ ! -f /tmp/.central_software_pack_tried_update ] && echo "Y")
  10. EXTRA_CONTINAER_OPTIONS="--memory=256m --cpus=1"

  11. central_software_pack_start(){
  12.     # if $1 is present, delay for $1 seconds, this is used for waiting dockerd auto-restart
  13.     if [ ! -z "$1" ]; then
  14.         sleep "$1"
  15.     fi
  16.     # prepare directories
  17.     mkdir -p "$EXTERNAL_SOCK_DIR"
  18.     mkdir -p "$CONTAINER_DATA_DIR"
  19.     # if this start is the first one after ota reboot, try update from the default image
  20.     if [ ! -z "$FIRST_START_AFTER_OTA" ]; then
  21.         touch /tmp/.central_software_pack_tried_update
  22.         echo "Try update image after ota reboot"
  23.         # try update, if update is successful, the image will be running, exit
  24.         miot_centralctld_hook.sh update "$DEFAULT_IMAGE" host_path && exit 0
  25.     fi
  26.     # check if the container is already running
  27.     container_id=$(docker ps --filter "name=$CONTAINER_NAME" -q)
  28.     if [ ! -z "$container_id" ]; then
  29.         echo "Central software pack is already running"
  30.         exit 1
  31.     fi
  32.     # check if there is any stopped container (there should not be)
  33.     container_id=$(docker ps -a --filter "name=$CONTAINER_NAME" -q -l)
  34.     if [ ! -z "$container_id" ]; then
  35.         echo "Restart stopped central software pack"
  36.         docker restart "$container_id"
  37.         exit 0
  38.     fi
  39.     # check if there is any image
  40.     image_id=$(docker image ls "$IMAGE_NAME" -q)
  41.     if [ -z "$image_id" ]; then
  42.         # load the default image
  43.         docker load -i "$DEFAULT_IMAGE"
  44.         if [ $? -ne 0 ]; then
  45.             echo "Can not load the default image"
  46.             exit 1
  47.         fi
  48.     fi
  49.     image_id=$(docker image ls "$IMAGE_NAME" -q | head -n 1)
  50.     echo "Start image: $image_id"
  51.     docker run -d $EXTRA_CONTINAER_OPTIONS --restart=unless-stopped --network=host --tmpfs /tmp --tmpfs /run -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro -v "$PLATFORM_CONFIG:/etc/platform.conf:ro" -v "$EXTERNAL_SOCK_DIR:/tmp/external" -v /var/run/mdnsd:/var/run/mdnsd -v "$CONTAINER_DATA_DIR:/data" --name "$CONTAINER_NAME"  "$image_id" busybox init
  52. }

  53. central_software_pack_stop(){
  54.     container_id=$(docker ps --filter "name=$CONTAINER_NAME" -q)
  55.     if [ ! -z "$container_id" ]; then
  56.         docker stop "$container_id"
  57.     fi
  58. }

  59. central_software_pack_rm(){
  60.     # remove the container
  61.     container_id=$(docker ps --filter "name=$CONTAINER_NAME" -a -q)
  62.     if [ ! -z "$container_id" ]; then
  63.         docker rm -f "$container_id"
  64.     fi
  65.     # remove container data
  66.     rm -rf "$CONTAINER_DATA_DIR"
  67. }

  68. if [ -z "$1" ]; then
  69.     echo "Method not provided, Usage: central_software_pack.sh method"
  70.     exit 1
  71. fi

  72. if [ "$1" = "start" ]; then
  73.     shift
  74.     central_software_pack_start "$@"
  75. elif [ "$1" = "stop" ]; then
  76.     shift
  77.     central_software_pack_stop "$@"
  78. elif [ "$1" = "rm" ]; then
  79.     shift
  80.     central_software_pack_rm "$@"
  81. else
  82.     echo "Unsupported method $1"
  83.     exit 1
  84. fi
复制代码


启动时的附加参数:
  1. # /etc/central_software_pack/platform.conf
  2. ro.sys.name=Xiaomi router BE3600Pro
  3. ro.sys.model=xiaomi.router.rn04
  4. ro.sys.vendor=xiaomi
  5. ro.sys.priority=160.0.0
  6. ro.sys.rsyncport=873
  7. ro.sys.mipsport=8884
  8. ro.sys.webcfgport=8086
  9. ro.sys.mqttport=18883
  10. ro.sys.veventsiid=7
  11. ro.sys.phylist=[{"name":"br-lan","type":"ethernet"}]
  12. ro.sys.loopback=[]
复制代码


只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
发表于 2025-3-16 10:43 | 显示全部楼层
谢谢楼主分享,恩山有你更精彩!!!
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2025-3-16 12:24 | 显示全部楼层
支持大佬
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2025-3-16 21:57 | 显示全部楼层
马住
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2025-3-16 22:11 | 显示全部楼层
期待大佬测试移植到飞牛nas中,这样就不用再买一个中枢网关了
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2025-3-17 07:28 | 显示全部楼层
感谢大佬提供的信息资料,我在openwrt路由器上测试了一下无法启动,卡在 docker run 。。。的 busybox init这了。麻烦能告知一下您这个启动脚本的存放位置吗?

点评

镜像能跑起来,但是在外缺少米家接口,无法正常使用。  详情 回复 发表于 2025-3-17 20:13
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2025-3-17 20:13 | 显示全部楼层
玩在这里 发表于 2025-3-17 07:28
感谢大佬提供的信息资料,我在openwrt路由器上测试了一下无法启动,卡在 docker run 。。。的 busybox init ...
  1. docker run -d \
  2.   --memory=256m \
  3.   --cpus=1 \
  4.   --restart=unless-stopped \
  5.   --network=host \
  6.   --tmpfs /tmp \
  7.   --tmpfs /run \
  8.   -v /etc/timezone:/etc/timezone:ro \
  9.   -v /etc/localtime:/etc/localtime:ro \
  10.   -v /etc/central_software_pack/platform.conf:/etc/platform.conf:ro \
  11.   -v /tmp/miot_central:/tmp/external \
  12.   -v /var/run/mdnsd:/var/run/mdnsd \
  13.   -v /data/other/central:/data \
  14.   --name "miot_central" \
  15.   "$(docker images | grep central_software_pack | awk '{print $3}')" \
  16.   busybox init
复制代码

镜像能跑起来,但是在外缺少米家接口,无法正常使用。

点评

感觉需要配网过程,用米家扫描没有扫描到,如果配网成功了,基本上就是成功了。  详情 回复 发表于 2025-3-18 16:37
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2025-3-18 12:02 | 显示全部楼层
看不懂,不影响膜拜
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2025-3-18 16:27 | 显示全部楼层
/tmp/miot_central 和 /data/other/central 目录有什么文件么

点评

/tmp/miot_central是一些套接字: /data/other/centra是一些运行的配置文件和数据:  详情 回复 发表于 2025-3-19 14:39
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2025-3-18 16:37 | 显示全部楼层
DavidDengHui 发表于 2025-3-17 20:13
镜像能跑起来,但是在外缺少米家接口,无法正常使用。

感觉需要配网过程,用米家扫描没有扫描到,如果配网成功了,基本上就是成功了。

点评

是的,路由器上启动的逻辑也是先判断是否绑定米家,绑定成功了了才会触发启用中枢容器的操作。  详情 回复 发表于 2025-3-19 14:40
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2025-3-19 14:39 | 显示全部楼层
googlewell 发表于 2025-3-18 16:27
/tmp/miot_central 和 /data/other/central 目录有什么文件么

/tmp/miot_central是一些套接字:
  1. root@XiaoQiang:~# ls /tmp/miot_central -all -iR -F
  2. /tmp/miot_central:
  3.   22985 drwxrwxrwx    2 root     root           120 Mar 17 22:24 ./
  4.    3595 drwxrwxrwt   38 root     root          1660 Mar 19 14:36 ../
  5. 232078 srwxrwxrwx    1 root     root             0 Mar 17 22:24 bridge_service.sock=
  6. 234653 srwxrwxrwx    1 root     root             0 Mar 17 22:24 bt_gateway_server.sock=
  7. 232007 srwxrwxrwx    1 root     root             0 Mar 17 22:23 centralCtl.sock=
  8. 232435 srwxrwxrwx    1 root     root             0 Mar 17 22:24 central_proxy.sock=
复制代码


/data/other/centra是一些运行的配置文件和数据:
  1. root@XiaoQiang:~# ls /data/other/central -all -iR -F
  2. /data/other/central:
  3.      48 drwxr-xr-x    5 root     root          1024 Mar 17 22:23 ./
  4.       2 drwxr-xr-x    8 root     root          1024 Mar 17 22:23 ../
  5.   32283 drwxr-xr-x    7 root     root          1024 Mar 17 22:24 local/
  6.   32351 drwxr-xr-x    3 root     root          1024 Mar 17 22:23 log/
  7.   32358 drwxr-xr-x    4 root     root          1024 Mar 17 22:24 share/

  8. /data/other/central/local:
  9.   32283 drwxr-xr-x    7 root     root          1024 Mar 17 22:24 ./
  10.      48 drwxr-xr-x    5 root     root          1024 Mar 17 22:23 ../
  11.   32375 drwxrwxrwx    3 root     root          1024 Mar 17 22:24 autoLocal/
  12.   32364 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 central_service/
  13.   32380 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 hotdatasync/
  14.   32289 drwxr-xr-x    2 root     root          1024 Mar 18 05:04 miio_prop/
  15.   32363 drwxrwxrwx    2 root     root          1024 Mar 17 22:23 monitor/

  16. /data/other/central/local/autoLocal:
  17.   32375 drwxrwxrwx    3 root     root          1024 Mar 17 22:24 ./
  18.   32283 drwxr-xr-x    7 root     root          1024 Mar 17 22:24 ../
  19.   32376 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 log/

  20. /data/other/central/local/autoLocal/log:
  21.   32376 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 ./
  22.   32375 drwxrwxrwx    3 root     root          1024 Mar 17 22:24 ../
  23.   32398 -rw-rw-rw-    1 root     root        248951 Mar 19 14:17 0.log

  24. /data/other/central/local/central_service:
  25.   32364 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 ./
  26.   32283 drwxr-xr-x    7 root     root          1024 Mar 17 22:24 ../
  27.   32369 -rw-rw-rw-    1 root     root          4187 Mar 17 22:24 acl.json
  28.   32370 -rw-rw-rw-    1 root     root          1157 Mar 17 22:24 ca.crt
  29.   32372 -rw-rw-rw-    1 root     root           729 Mar 17 22:24 device.crt
  30.   32371 -rw-rw-rw-    1 root     root           241 Mar 17 22:24 device.key

  31. /data/other/central/local/hotdatasync:
  32.   32380 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 ./
  33.   32283 drwxr-xr-x    7 root     root          1024 Mar 17 22:24 ../
  34.   32382 -rw-r--r--    1 root     root         73728 Mar 19 12:54 hot_data_v2.db
  35.   32385 -rw-r--r--    1 root     root         32768 Mar 19 14:34 hot_data_v2.db-shm
  36.   32383 -rw-r--r--    1 root     root       2076512 Mar 19 14:35 hot_data_v2.db-wal

  37. /data/other/central/local/miio_prop:
  38.   32289 drwxr-xr-x    2 root     root          1024 Mar 18 05:04 ./
  39.   32283 drwxr-xr-x    7 root     root          1024 Mar 17 22:24 ../
  40.   32357 -rw-r--r--    1 root     root         12288 Mar 18 05:04 persist.db

  41. /data/other/central/local/monitor:
  42.   32363 drwxrwxrwx    2 root     root          1024 Mar 17 22:23 ./
  43.   32283 drwxr-xr-x    7 root     root          1024 Mar 17 22:24 ../

  44. /data/other/central/log:
  45.   32351 drwxr-xr-x    3 root     root          1024 Mar 17 22:23 ./
  46.      48 drwxr-xr-x    5 root     root          1024 Mar 17 22:23 ../
  47.   32352 drwxr-xr-x    2 root     root          1024 Mar 19 11:00 syslog/

  48. /data/other/central/log/syslog:
  49.   32352 drwxr-xr-x    2 root     root          1024 Mar 19 11:00 ./
  50.   32351 drwxr-xr-x    3 root     root          1024 Mar 17 22:23 ../
  51.   32423 -rw-r--r--    1 root     root         35593 Mar 19 14:17 0.messages.zst
  52.   32356 -rw-r--r--    1 root     root        504151 Mar 19 11:00 1.messages.zst

  53. /data/other/central/share:
  54.   32358 drwxr-xr-x    4 root     root          1024 Mar 17 22:24 ./
  55.      48 drwxr-xr-x    5 root     root          1024 Mar 17 22:23 ../
  56.   32359 drwxr-xr-x    8 root     root          1024 Mar 17 22:24 custom/
  57.   32366 drwxrwxrwx    4 root     root          1024 Mar 17 22:24 default/

  58. /data/other/central/share/custom:
  59.   32359 drwxr-xr-x    8 root     root          1024 Mar 17 22:24 ./
  60.   32358 drwxr-xr-x    4 root     root          1024 Mar 17 22:24 ../
  61.   32387 drwxrwxr-x    2 root     root          1024 Mar 17 22:24 appMsg/
  62.   32360 drwxr-xr-x    4 root     root          1024 Mar 17 22:24 autoLocal/
  63.   32390 drwxrwxr-x    4 root     root          1024 Mar 17 22:24 automation/
  64.   32365 drwxrwxrwx    2 root     root          1024 Mar 17 23:41 bt_service/
  65.   32377 drwxrwxr-x    2 root     root          1024 Mar 17 22:24 devInfo/
  66.   32386 drwxrwxr-x    4 root     root          1024 Mar 17 22:24 lightGroup/

  67. /data/other/central/share/custom/appMsg:
  68.   32387 drwxrwxr-x    2 root     root          1024 Mar 17 22:24 ./
  69.   32359 drwxr-xr-x    8 root     root          1024 Mar 17 22:24 ../
  70.   32394 -rw-rw-rw-    1 root     root           263 Mar 17 22:24 AllowAndBlockList.jsonz
  71.   32393 -rw-rw-rw-    1 root     root          3453 Mar 17 22:24 BLEScript.jsonz
  72.   32392 -rw-r--r--    1 root     root       1400832 Mar 17 22:24 appMsgDictionary.db

  73. /data/other/central/share/custom/autoLocal:
  74.   32360 drwxr-xr-x    4 root     root          1024 Mar 17 22:24 ./
  75.   32359 drwxr-xr-x    8 root     root          1024 Mar 17 22:24 ../
  76.   32399 -rw-rw-rw-    1 root     root            42 Mar 17 22:24 config.jsonz
  77.   32361 drwxr-xr-x    2 root     root          1024 Mar 19 14:17 graphs/
  78.   32395 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 holiday/

  79. /data/other/central/share/custom/autoLocal/graphs:
  80.   32361 drwxr-xr-x    2 root     root          1024 Mar 19 14:17 ./
  81.   32360 drwxr-xr-x    4 root     root          1024 Mar 17 22:24 ../
  82.   32362 -rw-r--r--    1 root     root             0 Mar 17 22:23 .upgraded
  83.   32411 -rw-rw-rw-    1 root     root           221 Mar 19 07:08 1742227508494.cfg
  84.   32415 -rw-rw-rw-    1 root     root          3324 Mar 19 07:08 1742227508494.jsonz
  85.   32416 -rw-rw-rw-    1 root     root           211 Mar 19 14:17 1742268925113.cfg
  86.   32417 -rw-rw-rw-    1 root     root          2046 Mar 19 14:17 1742268925113.jsonz
  87.   32419 -rw-rw-rw-    1 root     root           209 Mar 19 06:41 1742271085375.cfg
  88.   32420 -rw-rw-rw-    1 root     root          2693 Mar 19 06:41 1742271085375.jsonz
  89.   32421 -rw-rw-rw-    1 root     root           221 Mar 19 06:51 1742279233099.cfg
  90.   32422 -rw-rw-rw-    1 root     root           885 Mar 19 06:51 1742279233099.jsonz

  91. /data/other/central/share/custom/autoLocal/holiday:
  92.   32395 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 ./
  93.   32360 drwxr-xr-x    4 root     root          1024 Mar 17 22:24 ../
  94.   32397 -rw-rw-rw-    1 root     root           140 Mar 17 22:24 settings.jsonz

  95. /data/other/central/share/custom/automation:
  96.   32390 drwxrwxr-x    4 root     root          1024 Mar 17 22:24 ./
  97.   32359 drwxr-xr-x    8 root     root          1024 Mar 17 22:24 ../
  98.   32391 drwxrwxrwx    2 root     root          1024 Mar 18 00:40 cloudGraphs/
  99.   32401 -rw-rw-rw-    1 root     root            42 Mar 17 22:24 config.jsonz
  100.   32396 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 holiday/

  101. /data/other/central/share/custom/automation/cloudGraphs:
  102.   32391 drwxrwxrwx    2 root     root          1024 Mar 18 00:40 ./
  103.   32390 drwxrwxr-x    4 root     root          1024 Mar 17 22:24 ../
  104.   32404 -rw-rw-rw-    1 root     root           366 Mar 17 22:24 1874580712808665089.jsonz
  105.   32405 -rw-rw-rw-    1 root     root           365 Mar 17 22:24 1874585243021893632.jsonz
  106.   32406 -rw-rw-rw-    1 root     root           366 Mar 17 22:24 1874585861786595328.jsonz
  107.   32407 -rw-rw-rw-    1 root     root           366 Mar 17 22:24 1874586195430891522.jsonz
  108.   32408 -rw-rw-rw-    1 root     root           329 Mar 17 22:24 1875453437508997122.jsonz
  109.   32409 -rw-rw-rw-    1 root     root           359 Mar 17 22:24 1880505119033401344.jsonz
  110.   32410 -rw-rw-rw-    1 root     root           233 Mar 17 22:24 1900616706297577472.jsonz
  111.   32412 -rw-rw-rw-    1 root     root           232 Mar 17 22:24 1900778617856991232.jsonz
  112.   32413 -rw-rw-rw-    1 root     root           231 Mar 17 22:24 1900779014818521088.jsonz
  113.   32414 -rw-rw-rw-    1 root     root           235 Mar 17 22:24 1900794412448501760.jsonz

  114. /data/other/central/share/custom/automation/holiday:
  115.   32396 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 ./
  116.   32390 drwxrwxr-x    4 root     root          1024 Mar 17 22:24 ../
  117.   32400 -rw-rw-rw-    1 root     root           140 Mar 17 22:24 settings.jsonz

  118. /data/other/central/share/custom/bt_service:
  119.   32365 drwxrwxrwx    2 root     root          1024 Mar 17 23:41 ./
  120.   32359 drwxr-xr-x    8 root     root          1024 Mar 17 22:24 ../
  121.   32368 -rw-r--r--    1 root     root         12288 Mar 17 22:24 bt_service_kv.db
  122.   32373 -rw-r--r--    1 root     root         12288 Mar 17 23:41 bt_service_nwk.db
  123.   32374 -rw-r--r--    1 root     root        102400 Mar 17 23:24 bt_service_rpc.db

  124. /data/other/central/share/custom/devInfo:
  125.   32377 drwxrwxr-x    2 root     root          1024 Mar 17 22:24 ./
  126.   32359 drwxr-xr-x    8 root     root          1024 Mar 17 22:24 ../
  127.   32378 -rw-r--r--    1 root     root          4096 Mar 17 22:24 devInfo.db
  128.   32384 -rw-r--r--    1 root     root         32768 Mar 18 05:24 devInfo.db-shm
  129.   32379 -rw-r--r--    1 root     root        173072 Mar 18 04:16 devInfo.db-wal

  130. /data/other/central/share/custom/lightGroup:
  131.   32386 drwxrwxr-x    4 root     root          1024 Mar 17 22:24 ./
  132.   32359 drwxr-xr-x    8 root     root          1024 Mar 17 22:24 ../
  133.   32388 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 instances/
  134.   32389 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 timeouts/

  135. /data/other/central/share/custom/lightGroup/instances:
  136.   32388 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 ./
  137.   32386 drwxrwxr-x    4 root     root          1024 Mar 17 22:24 ../

  138. /data/other/central/share/custom/lightGroup/timeouts:
  139.   32389 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 ./
  140.   32386 drwxrwxr-x    4 root     root          1024 Mar 17 22:24 ../

  141. /data/other/central/share/default:
  142.   32366 drwxrwxrwx    4 root     root          1024 Mar 17 22:24 ./
  143.   32358 drwxr-xr-x    4 root     root          1024 Mar 17 22:24 ../
  144.   32367 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 bt_service/
  145.   32381 drwxrwxr-x    2 root     root          1024 Mar 17 22:24 central_service/

  146. /data/other/central/share/default/bt_service:
  147.   32367 drwxrwxrwx    2 root     root          1024 Mar 17 22:24 ./
  148.   32366 drwxrwxrwx    4 root     root          1024 Mar 17 22:24 ../

  149. /data/other/central/share/default/central_service:
  150.   32381 drwxrwxr-x    2 root     root          1024 Mar 17 22:24 ./
  151.   32366 drwxrwxrwx    4 root     root          1024 Mar 17 22:24 ../
复制代码


只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2025-3-19 14:40 | 显示全部楼层
googlewell 发表于 2025-3-18 16:37
感觉需要配网过程,用米家扫描没有扫描到,如果配网成功了,基本上就是成功了。 ...

是的,路由器上启动的逻辑也是先判断是否绑定米家,绑定成功了了才会触发启用中枢容器的操作。
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2025-3-19 16:07 | 显示全部楼层
那怀疑是通过 /tmp/miot_central 下套接字进行通信的,进行初始化一些信息。
/data/other/centra 应该是容器内各种服务产生的数据。


在容器内通过logread可以读取日志信息,我这错误信息是一直是这个
  1. Wed Mar 19 15:22:48 2025 user.err ot_service: Error in main [line:126]: ot_client_connect(app->tev,on_ot_message,NULL,on_ot_disconnected,NULL)==0
复制代码


容器内的服务是通过perp进行管理的
http://b0llix.net/perp/

感觉以下是切换服务状态,未绑定、绑定、主网关、从网关、关闭服务
gw_runlevel -s unbind
gw_runlevel -s bind
gw_runlevel -s primary
gw_runlevel -s secondary
gw_runlevel -s none

默认启动是unbind,然后检测状态再切换响应的服务。

再深入需要逆向了,这个就无能为力了。
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2025-3-19 18:25 | 显示全部楼层
在下班路上突然感觉,这个报错应该就是和容器外主机通信的,主机上没有,才报错的。主机上通信的估计是一个sh脚本创建的,明天上班想办法确认一下。名字可能有helper或者nomqtt什么的。
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

发表于 2025-3-19 19:40 | 显示全部楼层
找到了,可能就是linux sdk中的脚本

https://iot.mi.com/new/doc/acces ... nt/sdk/sdk-overview

可以比对路由器中的查找
只谈技术、莫论政事!(点击见详情) | 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛

只谈技术、莫论政事!切勿转播谣言!为了你也为了他人。
只谈技术、莫论政事!(点击见详情) 切记不要随意传播谣言,把自己的日子过安稳了就行,为了自己好也为了大家好。 恩山无线论坛欢迎您的来访,请互相尊重、友善交流,建议保持一颗平常心看待网友的评论,切勿过度反应。

查看 »

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2025-5-29 03:23

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com

快速回复 返回顶部 返回列表