小安派烧录好示例一段时间会卡屏

[复制链接]
查看499 | 回复11 | 2024-6-25 15:40:11 | 显示全部楼层 |阅读模式

本帖最后由 云梦 于 2024-6-25 15:40 编辑

烧录好之后连接wifi会卡屏,wifi信息烧录后一直存在,循环卡屏.串口信息反馈


root@cloud:~/AiPi-Open-Kits/ai-pi_-hzy_-weather# picocom /dev/ttyUSB0 -b 2000000
picocom v3.1port is        : /dev/ttyUSB0
flowcontrol    : none
baudrate is    : 2000000
parity is      : none
databits are   : 8
stopbits are   : 1
escape is      : C-a
local echo is  : no
noinit is      : no
noreset is     : no
hangup is      : no
nolock is      : no
send_cmd is    : sz -vv
receive_cmd is : rz -vv -E
imap is        :
omap is        :
emap is        : crcrlf,delbs,
logfile is     : none
initstring     : none
exit_after is  : not set
exit is        : noType [C-a] [C-h] to see available commands
Terminal ready
[F][MAIN] [MAIN:157]heap_size-------> 4277992
[F][MAIN] [MAIN:157]heap_size-------> 4277988
[F][MAIN] [MAIN:157]heap_size-------> 4277904
addr@0xa02363dc is xip flash, size 5
addr@0xa02363dc is xip flash, size 5
[F][MAIN] [MAIN:157]heap_size-------> 4277988
addr@0xa0236478 is xip flash, size 5
addr@0xa0236480 is xip flash, size 9
[queue_task]:ssid=***O password:12*****
start connecting ...
Exec key_mgmt WPA-PSK WPA-PSK-SHA256 SAE
Exec pairwise TKIP CCMP GCMP GCMP-256 CCMP-256
Exec group TKIP CCMP GCMP GCMP-256 CCMP-256
Exec ieee80211w 0
Exec scan_ssid 1
Exec ssid "OPPO"
Exec psk "12345678"
WPA network 0: created and configuredStarting AP scan for specific SSID: OPPO, ssid_len:4
[F][MAIN] [MAIN:157]heap_size-------> 4260712
�[WPA] CTRL-EVENT-BSS-ADDED 0 BE:0D:A9:C9:C5:BA
�[WPA] CTRL-EVENT-SCAN-RESULTS
�[WPA] Trying to associate with BE:0D:A9:C9:C5:BA (SSID='****' freq=2472 MHz)
--- OPT rxu_mgmt_ind is detected
[FU]Set timer,state is 5,ongoing++
[FU]Tx cfm ongoing--, value is 0
[FL]RECV AUTH,sn:107
[FU]RECV AUTH,sn:107
[FU]Rx handler,state:5,fctl:0xb0
[FU]Clear timer in auth handler
[FU]Set timer,state is 8,ongoing++
[FU]Tx cfm ongoing--, value is 0
[FL]RECV ASSOCRSP,sn:108
[FU]RECV ASSOCRSP,sn:108
[FU]Rx handler,state:8,fctl:0x10
[FU]Clear timer in assoc rsp handler
�[WPA] Associated with BE:0D:A9:C9:C5:BA
�[WPA] CTRL-EVENT-SUBNET-STATUS-UPDATE status=0
[FU] rcv eapol 888e
[FU] rcv eapol 888e
�[WPA] WPA: Key negotiation completed with BE:0D:A9:C9:C5:BA [PTK=CCMP GTK=CCMP]
�[WPA] CTRL-EVENT-CONNECTED - Connection to BE:Status
[AT][RX]   status_code 0
[AT][RX]   reason_code 0
[AT]tus detail: sm connect ind ok
T][RX]   aid 3 BE:0D:A9:C9:C5:BA
[AT][RX]   band 2.4G
[AT][RX]   channel 13
===Key Len  VLan ID  Default        Key Hexdump(16Bytes MAX)
[00] F-Bit    00        0
[04] FF:FF:FF:FF:FF:FF  64-Bit    00       5:BA  64-Bit    01        0
[09] FF:FF:FF:FF:FF:FF  64-Bit    0AC Address =========================
MAC B4:0E:CF:39:CC:CD wpa_supplicant_ctrl_iface_msg_cb: cmd send succeded, txt is CTRL-EVENT-CONNECTED - Connection to BE:0D:A9:C9:C5:BA completed [id=0 id_str=]
IP:192.168.223.99
MASK: 255.255.255.0
Gateway: 192.168.223.212
[F][MAIN] [MAIN:157]heap_size-------> 4262016
[0] wl1: MAC=b4:0e:cf:39:cc:cd ip=192.168.223.99/24 UP,CONNECTED
wifi connened ****,IP:192.168.223.99
addr@0xa00ffa84 is xip flash, size 4
addr@0xa0236414 is xip flash, size 4
[queue_task] ipv4 addr=192.168.223.99
[I][HTTP] Host:v0.yiketianqi.com, Server ip Address : 43.142.61.38:80[I][HTTP] allocated socketAssertion "sys_timeout: tline 311 in /root/AiPi-Open-Kits/aithinker_Ai-M6X_SDK/components[I][HTTP] HTTP client connect server success![I][HTTP] request send OK[F][HTTP] Handler byte=132
GET /free/week?unescape=1&appid=****&appsecret=**** HTTP/1.0
Host: v0.yiketianqi.com:80
User-Agent: AiPi-DSL_Dashboard[F][HTTP]
HTTP/1.1 200 OK
Server: Tengine
Date: Tue, 25 Jun 2024 06:17:55 GMT
Content-Type: application/json
Connec�","update_time":"2024-06-25 14:03:43","data":[{"date":"2024-06-:"25","win":"南风","win_speed":"<3级"},{"date":"2024-06-27","":"晴","wea_img":"qing","tem_day":"36","tem_night":"26","win":"m_night":"24","win":"东南风","win_speed":"3-4级转<3级"},{","wea_img":"yin","tem_day":"33","tem_night":"25","win":"西南风","win_speed":"<3级"},{"date":m_night":"25","win":"无持续风向","win_speed":"<3级"}]}TP/1.1 200 OK
Server: Tengine
Date: Tue, 25 Jun 2024 06:17:55 GMT
Content-Type: application/json
Connection: close
Acc4-06-25 14:03:43","data":[{"date":"2024-06-25","wea":"晴","wea_":"36","tem_night":"25","win":"南风","win_speed":"<3级"},{"da":"2024-06-28","wea":"晴","wea_img":"qing","tem_day":"36","tem_night":"26","win":"东南风","win_speed":"3-4级转<3级"},{"date":"2024-06-29","wea":"多云","wea_img":"yun","tem_day":"31","tem_night":"24","win":"东南风ay":"33","tem_night":"25","win":"西南风","win_speed":"<3级"},{"date":"2024-07-01","wea":"小雨","wea_img":"yu","tem_day":"338000005
mepc:a00e66ba
mtval:00000000
Load access fault

最后一行

image.png

load access fault>>负载访问故障

如何解决?

回复

使用道具 举报

wxlinus | 2024-6-27 13:45:33 | 显示全部楼层
wxlinus 发表于 2024-6-27 13:41
烧录的是不是那个天气站的,那个代码有bug,内存溢出了,还有空指针,很多问题 ...

这个代码改成我这个,就能解决卡屏问题
  1. /**
  2. * @brief HTTP解析请求数据
  3. *
  4. * @param https_request_data
  5. * @return char*
  6. */
  7. static char* https_get_data(const char* https_request_data)
  8. {
  9.     char* request_data = https_request_data;
  10.     static char* https_data;
  11.     https_data = pvPortMalloc(1024*4);
  12.     memset(https_data, 0, 1024*2);
  13.     char* date = pvPortMalloc(64);
  14.     char* request_value = strtok(request_data, "\n");
  15.     for (size_t i = 0; i < 8; i++)
  16.     {
  17.         printf("%s\r\n", request_value);
  18.         if (i==2) strcpy(date, request_value);
  19.         request_value = strtok(NULL, "\n");
  20.     }
  21.     get_https_date(date);
  22.     if (request_value != NULL) {
  23.         strcpy(https_data, request_value);
  24.     }
  25.     vPortFree(date);
  26.     return https_data;
  27. }
复制代码


一直显示周五的问题
  1. typedef struct {
  2.     char city[16];
  3.     char date[12];
  4.     char week[10];
  5.     char wea[24];
  6.     char wea_img[8];
  7.     char tem[4];
  8.     char tem_day[4];
  9.     char tem_night[4];
  10.     char win[24];
  11.     char win_speed[24];
  12.     char win_meter[12];
  13.     char air[4];
  14.     char pressure[8];
  15.     char humidity[8];
  16. } dayweather_t;
复制代码

这个代码质量有点差,但是页面和外壳还不错
回复 支持 1 反对 0

使用道具 举报

爱笑 | 2024-6-25 16:06:55 | 显示全部楼层
你这个烧录的哪个板子?
用心做好保姆工作
回复 支持 反对

使用道具 举报

云梦 | 2024-6-25 16:47:40 | 显示全部楼层
爱笑 发表于 2024-6-25 16:06
你这个烧录的哪个板子?

s1还有scp2.4都这样
回复 支持 反对

使用道具 举报

爱笑 | 2024-6-25 16:51:26 | 显示全部楼层
云梦 发表于 2024-6-25 16:47
s1还有scp2.4都这样

给你找技术解决!
用心做好保姆工作
回复 支持 反对

使用道具 举报

云梦 | 2024-6-25 16:52:12 | 显示全部楼层
爱笑 发表于 2024-6-25 16:51
给你找技术解决!

回复 支持 反对

使用道具 举报

云梦 | 2024-6-25 18:24:50 | 显示全部楼层
本帖最后由 云梦 于 2024-6-25 18:26 编辑

。。。。。
回复

使用道具 举报

爱笑 | 2024-6-26 08:38:04 | 显示全部楼层

这个需要修复的,我们这边正在整理新的SDK,后续会同步更新。
用心做好保姆工作
回复 支持 反对

使用道具 举报

iiv | 2024-6-26 20:16:24 | 显示全部楼层
回复

使用道具 举报

云梦 | 2024-6-26 23:24:31 | 显示全部楼层
爱笑 发表于 2024-6-26 08:38
这个需要修复的,我们这边正在整理新的SDK,后续会同步更新。

催一催
回复 支持 反对

使用道具 举报

WT_0213 | 2024-6-27 11:27:02 | 显示全部楼层
估计得等一段时间呢
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则