293 Star 1.6K Fork 379

GVP合宙Luat / LuatOS

 / 详情

[🐛Bug]: Air601 UDP通信丢包严重

待办的
创建于  
2024-03-26 15:29

描述一下这个bug / Describe the bug

Air601 UDP通信上报数据只有很小概率可以成功,
同样的UDP代码,在air780模块上通信正常

复现步骤 / To Reproduce

Air601 UDP通信改为TCP通信,数据包不会丢失,改为UDP后很小概率可以成功。外网服务器和内网服务器都是一样的情况。

如果正常,应该是什么样 / Expected behavior

UDP小概率丢包可以,内网中也不应该小概率不丢包呀

截图 / Screenshots

local txqueue = {}
local taskName = "SOCKET"
sysplus.taskInitEx(sockettask, taskName, netCB, taskName, txqueue)
while 1 do
local result, tp, data = sys.waitUntil("sockettopic", 10000)
if tp == "uplink" then
table.insert(txqueue, data)
sys_send(taskName, socket.EVENT, 0)
log.info("socket", "发送数据", data)
elseif tp == "downlink" then

    elseif tp == "connect" then
        log.info("连接成功")
        local tx = {DEVID = ID}
        sys.publish("sockettopic", "uplink", json.encode(tx, "2f"))
    end
end

日志 / Logs

[2024-03-26 14:56:03.153] I/user.socket 发送数据 {"DEVID":"C2C67DAB9A"}
[2024-03-26 14:56:03.153] I/user.libnet wait true true nil
[2024-03-26 14:56:03.153] I/user.libnet 发送数据的结果 true false

PACK包版本 / Version

LuatOS-SoC_V1022_AIR601.soc

验证

  • 检查过该问题,之前没有人提过 / Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • 提供了最小可复现工程或详细的复现步骤,确保开发者可以复现 / The provided reproduction is a minimal reproducible example of the bug.
  • 已经提供了完整的报错信息、日志、截图,没有经过删减。

评论 (1)

hanhuliang 创建了任务
hanhuliang 修改了描述
hanhuliang 修改了描述
展开全部操作日志

云编译个最新固件试试

登录 后才可以发表评论

状态
负责人
项目
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
预计工期 (小时)
参与者(2)
4674 wendal 1578914274
Lua
1
https://gitee.com/openLuat/LuatOS.git
git@gitee.com:openLuat/LuatOS.git
openLuat
LuatOS
LuatOS

搜索帮助