Air202 - 如何从uart.ATC读取数据?

欢迎您! 我来自波兰。 我在AliExpress买了Air202。

我有这样的剧本。
I have a script like that.

attachments-2019-01-I0AQlleu5c2f0ba62ebb5.PNG

何从uart.ATC data ==“NO ANSWER”端口读取数据并打印“OK”?
How to read data from the uart.ATC data == "NO ANSWER" port and print "OK"?

attachments-2019-01-39DFM7Mk5c2f0be9b9d9f.PNG

请先 登录 后评论

最佳答案 2019-01-04 20:36

hi.

if you want to get "NO ANSWER" status, that's very easy.

try add to your code:

--require"ril.lua"

require"ril"


--a new function to receive data from vAT

--if vAT returns "NO ANSWER", means NO ANSWER

local function ccurc(data,prefix)

    if data == "NO ANSWER" then

    print("NO ANSWER")

    end

end


--reg a function to receive data from vAT

--function name is ccurc

ril.regurc("NO ANSWER",ccurc)


--still don't understand?try to read cc.lua in lib directory.

--or contact  me  via email: qiming@openluat.com

请先 登录 后评论

其它 0 个回答