2017-02-23 75 views
1

我試圖使用http.get(url,headers,function)從Firebase獲取數據。NodeMCU,Lua http.get()「與錯誤8斷開連接」 - 什麼是錯誤8?

Othersites(也HTTPS站點)做工精細,我得到我期待的迴應,但火力給了我一個錯誤8.

我無法找到此錯誤的任何文件(或任何錯誤) - 沒有人知道是什麼它的意思是?

http.get("https://<my-firebaseID>.com/somefile.json", "", function(code, data) 
    if (code < 0) then 
     print("HTTP request failed") 
    else 
     print(code, data) 
    end 
    end) 


NodeMCU custom build by frightanic.com 
    branch: master 
    commit: b96e31477ca1e207aa1c0cdc334539b1f7d3a7f0 
    SSL: true 
    modules: adc,bit,cjson,file,gpio,http,i2c,net,node,pwm,spi,struct,tmr,uart,websocket,wifi,wps,tls 
build built on: 2017-02-23 10:24 
powered by Lua 5.1.4 on SDK 2.0.0(656edbf) 



HTTP client: Disconnected with error: 8 
HTTP client: Connection timeout 
HTTP client: Connection timeout 

感謝

回答

0

我可以提供一個正確的,但仍不滿意的答案 - 這是一個已知的問題,請參見https://github.com/nodemcu/nodemcu-firmware/issues/1707。如果您在啓用調試的情況下構建固件,則可能會看到類似於該問題中報告的消息。

+0

好吧,那太糟糕了。我嘗試一種不同的方法。 –

+0

使用網絡模塊稍微麻煩一些。 –