mqtt连接机场后,每秒有几十条消息

Completed

Comments

34 comments

  • pingwping

    连了一个机场,统计了一下,一秒钟有上百条消息,这是什么原因?

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 正常现象。state只要属性变化就会上报 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • pingwping

    部分版本信息

    {
        "tid": "57a35de9-ec50-4baf-86e0-b73b34f5e72d",
        "bid": "e2142f21-1efe-4ac1-aa51-f2a97460f6ad",
        "timestamp": 1724732223102,
        "data": {
            "firmware_version": "10.01.1607",
            "compatible_status": 0,
            "firmware_upgrade_status": 0
        },
        "gateway": "XXX"
    }

    {
        "tid": "9789b188-77fd-4c5a-ba74-c5281c8ef4e9",
        "bid": "3a43eca3-935b-4537-9094-3983c5ee5678",
        "timestamp": 1724739147047,
        "method": "update_topo",
        "data": {
            "domain": "3",
            "type": 2,
            "sub_type": 0,
            "device_secret": "XXX",
            "nonce": "XXX",
            "thing_version": "1.3.0",
            "sub_devices": [
                {
                    "sn": "XXX",
                    "domain": "0",
                    "type": 91,
                    "sub_type": 0,
                    "index": "A",
                    "device_secret": "XXX",
                    "nonce": "XXX",
                    "thing_version": "1.3.0"
                }
            ]
        }
    }

    0
    Comment actions Permalink
  • pingwping

    我观察了,属性没有变化。譬如,下面这个,一直是空,但是一次发上百条。

    thing/product/XXX/state
    2024-08-27.15:29:01,247 DEBUG devmaster:109 {
        "bid": "baad2e16-36bf-4070-8f8f-b40c69ff89cb",
        "data": {
            "dongle_infos": []
        },
        "tid": "72c08781-9aec-4ece-959e-549b932c91de",
        "timestamp": 1724743739646,
        "gateway": "XXX"
    }

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 机场和无人机固件都是最新配套版本吗?有三方负载吗?您重启机场后重新上云试下 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • pingwping

    机场 "10.01.1607",

    无人机"01.00.00.80",

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 无人机是什么机型,没有这个固件版本,无人机应该是10.01.1607和机场一致 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • pingwping

    无人机上报是这样的,固件什么版本不确定

     [
                {
                    "sn": "XXX",
                    "domain": "0",
                    "type": 91,
                    "sub_type": 0,
                    "index": "A",
                    "device_secret": "XXX",
                    "nonce": "XXX",
                    "thing_version": "1.3.0"
                }
            ]

    0
    Comment actions Permalink
  • pingwping

    找到了,飞机也是10.01.1607。没有负载。

     

    thing/product/飞机sn/state
    2024-08-27.17:22:47,427 DEBUG devmaster:109 {
        "tid": "8e984f7a-0405-4a71-99a7-dd48ef76eb4d",
        "bid": "006bc7f9-83ad-4291-a779-46ba397101e4",
        "timestamp": 1724750567317,
        "data": {
            "firmware_version": "10.01.1607",
            "compatible_status": 0,
            "firmware_upgrade_status": 0
        },
        "gateway": "网关sn"
    }

    0
    Comment actions Permalink
  • pingwping

    重启后,开始正常。后来慢慢state消息增多。我用emqx监控,飞机osd主题才50几条,飞机state主题就800多条了。

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 正常情况state属性变化才会上报,有做什么操作吗?使用的第三方云还是司空 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • pingwping

    开发中的第三方云。就是按协议回复了几个requests的消息,然后就监听osd/state主题。然后主题osd的频率正常,但是state的主题特别多。重启后一秒10几次,过了半小时后,一秒几十到几百次。实在是无法调试下去了。

    0
    Comment actions Permalink
  • pingwping

    特别是,从消息的tid看,都是不一样的tid,明显是程序构造出来的。

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 您使用demo1.10搭建的吗?还是自研的? 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • pingwping

    自研的。不是demo1.10。

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 这边使用demo测试无法复现,自研代码您需要自行debug测试下。 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • pingwping

    这个是机场重复发消息的问题,不是demo或云端可以复现的,不能让机场固件的开发来判断一下吗?

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 state上报频率异常暂时未出现过,所以这边建议使用demo复测下,也可以拉取机场和无人机日志进一步排查。 这边确认下,您重启机场后未进行相关操作state也会不断上报吗?还是说在调试中state会不断上报。 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • pingwping

    感谢这么晚还在回复。

    重启后,就是回复了几个requests的消息。譬如:storage_config_get,config,airport_bind_status。然后就开始接收osd/state。因为只在测试通信是否正常,所以没有主动发起消息。

    我的疑问是,即使上面几个requests的消息,回复的格式或内容有问题。会导致机场的异常吗。

    另外,我看到requests主题的config方法有规律的每25秒收到一次,storage_config_get方法每5秒收到一次。

    我检查我的回复,好像也是正常的,bid和tid是原请求的内容

    Topic: thing/product/——————/requests_reply
    2024-08-27.17:11:02,452 DEBUG devmaster:119 {
        "bid": "2da2201b-89b7-4f98-ba2a-2dd9b4b393cb",
        "data": {
            "output": {
                "bucket": "————",
                "credentials": {
                    "access_key_id": "STS.————————————————",
                    "access_key_secret": "————————————",
                    "expire": 3600,
                    "security_token": "————————"
                },
                "endpoint": "https://oss-cn-shenzhen.aliyuncs.com",
                "object_key_prefix": null,
                "provider": "ali",
                "region": "cn-shenzhen"
            },
            "result": 0
        },
        "method": "storage_config_get",
        "need_reply": 0,
        "tid": "46ae3ff4-0827-4466-9e90-f10c7543c9b6",
        "timestamp": 1724749862451,
        "gateway": "——————"
    }

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 未涉及到媒体上传storage_config_get可以先不用回,只关注上云时序即可。 config应该只需要在上云的时候请求一次,重复请求需要看下回复的消息是否正确。 相关文档地址:https://developer.dji.com/doc/cloud-api-tutorial/cn/feature-set/dock-feature-set/dock-access-to-cloud.html 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • pingwping

    开发的第三方云服务,从消息通道看到config/topo/osd/state等等消息都是正常的。但是机场本地调试的界面上显示的“未登录云服务”? 和这个有关系吗。

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 不影响,只要能够正常接收osd就说明机场已经正常上云。config在上云后有再次收到吗? 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • pingwping

    如果第3方云服务返回的config内容不对,后面机场就应该不会发osd/state,现在是一直发大量的state,有规律的25秒定时发config等等。这个估计问一下研发组的,看看有没有这种机制,什么情况下导致这种机制?

    0
    Comment actions Permalink
  • pingwping

    config固定27秒收到一次,state就更恐怖了,一秒几十条到几百条。

        "bid": "b971c661-8b36-4774-9850-92936d017f31",
        "timestamp": 1724816958925,
        "method": "config",
    --
        "bid": "d0afa6a7-1bc9-4619-8694-d9f6d127c017",
        "timestamp": 1724816995545,
        "method": "config",
    --
        "bid": "d0afa6a7-1bc9-4619-8694-d9f6d127c017",
        "timestamp": 1724816995613,
        "method": "config",
    --
        "bid": "eb56f774-9de9-4c64-92d0-7c7541bb5026",
        "timestamp": 1724817023640,
        "method": "config",
    --
        "bid": "eb56f774-9de9-4c64-92d0-7c7541bb5026",
        "timestamp": 1724817023720,
        "method": "config",
    --
        "bid": "00575112-1ed6-42ce-8323-8551e536853d",
        "timestamp": 1724817050388,
        "method": "config",
    --
        "bid": "00575112-1ed6-42ce-8323-8551e536853d",
        "timestamp": 1724817050471,
        "method": "config",
    --
        "bid": "3fc9c1be-2473-429b-814f-c6b48432b241",
        "timestamp": 1724817077210,
        "method": "config",

     

    0
    Comment actions Permalink
  • pingwping

    从emqx统计的,一个小时时间,机场的osd是1946条,而state是136527条,平均一秒37条state

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 云服务会主动断开吗?如果不回复config,osd能正常上报吗?机场是内网还是外网部署 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 这边已确认,25秒定时发config这个不存在,只会请求一次,需要您自行排查下代码。 如果用demo测试也是该效果,可以拉下机场和无人机日志看下 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink
  • pingwping

    1、配置服务器

    2. 绑定组织

    3. 然后就直接到第三个图片了。显示的是”未登录云服务“

     

    机场界面这样是正常的吗?

    0
    Comment actions Permalink
  • pingwping

    第三个图片

    0
    Comment actions Permalink
  • DJI Developer Support
    尊敬的开发者, 您好,感谢您联系DJI 大疆创新。 不正常,正常现象是可以成功登录云服务。机场未成功上云可以通过以下文档排查:机场无法上云 希望我们的解决方案能够帮到您,感谢您的邮件,祝您生活愉快! Best Regards, DJI 大疆创新SDK技术支持
    0
    Comment actions Permalink

Please sign in to leave a comment.