内网app显示在线,手机用4G就显示设备不在线-Arduino中文社区 - Powered by Discuz!

Arduino中文社区

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1701|回复: 7

[已解答] 内网app显示在线,手机用4G就显示设备不在线

[复制链接]
发表于 2020-8-17 23:15 来自手机 | 显示全部楼层 |阅读模式
内网app显示在线(同在一个wifi下),手机用4G就显示设备不在线
发表于 2020-8-18 00:02 | 显示全部楼层
看调试信息
 楼主| 发表于 2020-8-18 16:58 | 显示全部楼层
6:57:25.285 -> [135582] ERROR: Print data is not Json! {"data":{"b1":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"日光模式开启"},"b2":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"夜光模式开启"},"b3":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"温馨模式开启"},"b4":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"电脑模式开启"},"b5":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"电视模式开启"},"b6":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"阅读模式开启"},"b7":{"swi":"off","clr":"#FF0000"}},"fromDevice":"6CE4F5666T3QL2KY7I3GMVFI","toDevice":"736542dcbc1e11ea9a655254","deviceType":"OwnApp"}
 楼主| 发表于 2020-8-18 17:59 | 显示全部楼层
ERROR: Print data is not Json! {"data":{"state":"online","timer":"000","version":"0.1.0","b1":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"日光模式开启"},"b2":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"夜光模式开启"},"b3":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"温馨模式开启"},"b4":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"电脑模式开启"},"b5":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"电视模式开启"},"b6":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"阅读模式开启"},"humi":{"val":56.00,"clr":"#00DE00","uni":"%RH(舒适)"},"temp":{"val":34.90,"clr":"#DC143C","uni":"℃(炎热)"}},"fromDevice":"6CE4F5666T3QL2KY7I3GMVFI","toDevice":"736542dcbc1e11ea9a655254","deviceType":"OwnApp"}
请问这是什么问题:如果用内网WIFI可以,但用4G就报错!!!!!
void heartbeat()  //心跳包使得我们每次打开APP都可以看到实时的最新湿度数据

{
   button_clear();   
   HUMI.print(humi_read);      
   TEMP.print(temp_read);   
}
void button_clear()
{
if (openState == 1){
  Button1.text("日光模式关闭");
  Button1.color("#00ffFF");  
  Button1.icon("far fa-lightbulb-on");
  Button1.print("on");      //发送按键参数
  
  Button2.print("off");
  Button3.print("off");
  Button4.print("off");
  Button5.print("off");
  Button6.print("off");
  //Button7.print("off");
  //Button8.print("off");
  Button2.color("#FF0000");
  Button3.color("#FF0000");
  Button4.color("#FF0000");
  Button5.color("#FF0000");
  Button6.color("#FF0000");
  //Button7.color("#FF0000");
   
  }
else if (openState == 2)
{
  Button2.text("夜光模式关闭");
  Button2.icon("far fa-lightbulb-on");
  Button2.color("#00ffFF");  
  Button2.print("on");      //发送按键参数   
  
  
  
  Button1.print("off");
  Button3.print("off");
  Button4.print("off");
  Button5.print("off");
  Button6.print("off");
  //Button7.print("off");
  //Button8.print("off");
  Button1.color("#FF0000");
  Button3.color("#FF0000");
  Button4.color("#FF0000");
  Button5.color("#FF0000");
  Button6.color("#FF0000");
// Button7.color("#FF0000");
   
  }
else if (openState == 3)
{
Button3.text("温馨模式关闭");
Button3.icon("far fa-lightbulb-on");
Button3.color("#00ffFF");  
Button3.print("on");      //发送按键参数  
  
  Button1.print("off");
  Button2.print("off");
  Button4.print("off");
  Button5.print("off");
  Button6.print("off");
  //Button7.print("off");
  //Button8.print("off");
  Button1.color("#FF0000");
  Button2.color("#FF0000");
  Button4.color("#FF0000");
  Button5.color("#FF0000");
  Button6.color("#FF0000");
  //Button7.color("#FF0000");
   
  }
 楼主| 发表于 2020-8-18 19:03 | 显示全部楼层

ERROR: Print data is not Json! {"data":{"state":"online","timer":"000","version":"0.1.0","b1":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"日光模式开启"},"b2":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"夜光模式开启"},"b3":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"温馨模式开启"},"b4":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"电脑模式开启"},"b5":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"电视模式开启"},"b6":{"swi":"off","ico":"far fa-lightbulb","clr":"#FF0000","tex":"阅读模式开启"},"humi":{"val":56.00,"clr":"#00DE00","uni":"%RH(舒适)"},"temp":{"val":34.90,"clr":"#DC143C","uni":"℃(炎热)"}},"fromDevice":"6CE4F5666T3QL2KY7I3GMVFI","toDevice":"736542dcbc1e11ea9a655254","deviceType":"OwnApp"}
请问这是什么问题:如果用内网WIFI可以,但用4G就报错!!!!!
void heartbeat()  //心跳包使得我们每次打开APP都可以看到实时的最新湿度数据

{
   button_clear();   
   HUMI.print(humi_read);      
   TEMP.print(temp_read);   
}
void button_clear()
{
if (openState == 1){
  Button1.text("日光模式关闭");
  Button1.color("#00ffFF");  
  Button1.icon("far fa-lightbulb-on");
  Button1.print("on");      //发送按键参数
  
  Button2.print("off");
  Button3.print("off");
  Button4.print("off");
  Button5.print("off");
  Button6.print("off");
  //Button7.print("off");
  //Button8.print("off");
  Button2.color("#FF0000");
  Button3.color("#FF0000");
  Button4.color("#FF0000");
  Button5.color("#FF0000");
  Button6.color("#FF0000");
  //Button7.color("#FF0000");
   
  }
else if (openState == 2)
{
  Button2.text("夜光模式关闭");
  Button2.icon("far fa-lightbulb-on");
  Button2.color("#00ffFF");  
  Button2.print("on");      //发送按键参数   
  
  
  
  Button1.print("off");
  Button3.print("off");
  Button4.print("off");
  Button5.print("off");
  Button6.print("off");
  //Button7.print("off");
  //Button8.print("off");
  Button1.color("#FF0000");
  Button3.color("#FF0000");
  Button4.color("#FF0000");
  Button5.color("#FF0000");
  Button6.color("#FF0000");
// Button7.color("#FF0000");
   
  }
else if (openState == 3)
{
Button3.text("温馨模式关闭");
Button3.icon("far fa-lightbulb-on");
Button3.color("#00ffFF");  
Button3.print("on");      //发送按键参数  
  
  Button1.print("off");
  Button2.print("off");
  Button4.print("off");
  Button5.print("off");
  Button6.print("off");
  //Button7.print("off");
  //Button8.print("off");
  Button1.color("#FF0000");
  Button2.color("#FF0000");
  Button4.color("#FF0000");
  Button5.color("#FF0000");
  Button6.color("#FF0000");
  //Button7.color("#FF0000");
   
  }

点评

确保你的blinker lib和8266 package都是最新  详情 回复 发表于 2020-8-18 19:34
发表于 2020-8-18 19:34 | 显示全部楼层
18038802360 发表于 2020-8-18 19:03
ERROR: Print data is not Json! {"data":{"state":"online","timer":"000","version":"0.1.0","b1":{"sw ...

确保你的blinker lib和8266 package都是最新
 楼主| 发表于 2020-8-19 12:46 来自手机 | 显示全部楼层
是esp32模块的
 楼主| 发表于 2020-8-19 12:47 来自手机 | 显示全部楼层
在你们官方链接下载的不知道是不是最新的
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|Archiver|手机版|Arduino中文社区

GMT+8, 2024-11-28 11:46 , Processed in 0.097958 second(s), 17 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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