RT-Thread-packages / at_device

AT component porting or samples for different devices
Apache License 2.0
214 stars 181 forks source link

add at_device class & sample about m6315 #100

Closed HouqiLi closed 4 years ago

HouqiLi commented 4 years ago

1、已通过web_get_test/web_post_test自测 2、已通过iperf 8小时以上稳定自测

Lawlieta commented 4 years ago

感谢代码贡献,软件包根目录 README.md 文档也需要同步更新一下

Lawlieta commented 4 years ago

合并之前需要确保代码稳定性,确定一下下面软件包和网络功能是否测试通过:

HouqiLi commented 4 years ago

合并之前需要确保代码稳定性,确定一下下面软件包和网络功能是否测试通过:

  • webclient
  • mqtt
  • netutils(ntp、iperf)
  • mbedtls
  • onenet
  • network-samples(tcpclient、udpclient)

@Lawlieta 已确认以上软件包和网络功能均已测试通过,测试日志如下: 1、webclient 1.1 web_get_test [D/web] host address: www.rt-thread.com , port: 80

[2020-03-15 11:48:01.286]# RECV ASCII> [D/web] request header: [D/web] GET /service/rt-thread.txt HTTP/1.1 [D/web] Host: www.rt-thread.com [D/web] User-Agent: RT-Thread HTTP Agent

[D/web] response header:

[2020-03-15 11:48:02.143]# RECV ASCII> [D/web] HTTP/1.1 200 OK [D/web] Server: nginx/1.10.3 (Ubuntu) [D/web] Date: Sun, 15 Mar 2020 03:48:00 GMT [D/web] Content-Type: text/plain [D/web] Content-Length: 267 [D/web] Connection: keep-alive [D/web] Last-Modified: Tue, 18 Sep 2018 03:55:48 GMT [D/web] ETag: "10b-5761d43d95900" [D/web] Accept-Ranges: bytes [D/web] Vary: Accept-Encoding [D/web] get position handle response(200). webclient get response data: RT-Thread is an open source IoT operating system from China, which has strong scalability: from a tiny kernel running on a tiny core, for example ARM Cortex-M0, or Cortex-M3/4/7, to a rich feature system running on MIPS32, ARM Cortex-A8, ARM Cortex-A9 DualCore etc.

1.2 web_post_test web_post_test [D/web] host address: www.rt-thread.com , port: 80 [2020-03-15 16:20:33.037]# RECV ASCII> [D/web] request header: [D/web] POST /service/echo HTTP/1.1 [D/web] Content-Length: 60 [D/web] Content-Type: application/octet-stream [D/web] Host: www.rt-thread.com [D/web] User-Agent: RT-Thread HTTP Agent [D/web] Accept: /

[D/web] response header:

[2020-03-15 16:20:33.847]# RECV ASCII> [D/web] HTTP/1.1 200 OK [D/web] Server: nginx/1.10.3 (Ubuntu) [D/web] Date: Sun, 15 Mar 2020 08:20:32 GMT [D/web] Content-Type: text/html [D/web] Content-Length: 60 [D/web] Connection: keep-alive [D/web] X-Powered-By: PHP/5.5.9-1ubuntu4.25 [D/web] post handle response(200). webclient post response data: RT-Thread is an open source IoT operating system from China!

2、mqtt

mqtt_start [D/mqtt.sample] inter mqtt_connect_callback! [D/mqtt] ipv4 address port: 18831 [D/mqtt] HOST = 'mq.tongxinmao.com' msh /> msh />

[2020-03-15 16:20:40.248]# RECV ASCII> [I/mqtt] MQTT server connect success.

[2020-03-15 16:20:40.798]# RECV ASCII> [I/mqtt] Subscribe #0 /mqtt/test OK! [D/mqtt.sample] inter mqtt_online_callback!

[2020-03-15 16:20:41.418]# RECV ASCII> [D/mqtt.sample] mqtt sub callback: /mqtt/test Goodbye!

3、netutils

3.1 ntp_sync [2020-03-15 16:20:19.217]# RECV ASCII> Get local time from NTP server: Sun Mar 15 16:20:16 2020 AT+QICLOSE=0The system time is updated. Timezone is 8.

3.2 iperf -c 119.145.136.58 -p 5001 msh /> msh /> [2020-03-15 15:24:09.600]# RECV ASCII> Connect to iperf server successful! [2020-03-15 15:24:14.950]# RECV ASCII> 0.0730 Mbps! [2020-03-15 15:24:20.286]# RECV ASCII> 0.0730 Mbps! ……

4、mbedtls tls_test MbedTLS test sample!

Memory usage before the handshake connection is established:

total memory: 59120 used memory : 22524 maximum allocated memory: 22524 Start handshake tick:7066 msh /> msh />

[2020-03-16 22:48:25.341]# RECV ASCII> Finish handshake tick:17086 MbedTLS connect success... Memory usage after the handshake connection is established:

total memory: 59120 used memory : 46996 maximum allocated memory: 52204 Writing HTTP request success... Getting HTTP response...

[2020-03-16 22:48:25.965]# RECV ASCII> HTTP/1.1 200 OK

Server: nginx/1.10.3 (Ubuntu)

Date: Mon, 16 Mar 2020 14:48:22 GMT

Content-Type: text/plain

Content-Length: 267

Last-Modified: Sat, 04 Aug 2018 02:14:51 GMT

Connection: keep-alive

ETag: "5b650c1b-10b"

Strict-Transport-Security: max-age=1800; includeSubdomains; preload

Accept-Ranges: bytes

RT-Thread is an open source IoT operating system from China, which has strong scalability: from a tiny kernel running on a tiny core, for example ARM Cortex-M0, or Cortex-M3/4/7, to a

[2020-03-16 22:48:26.028]# RECV ASCII> rich feature system running on MIPS32, ARM Cortex-A8, ARM Cortex-A9 DualCore etc.

[2020-03-16 22:48:26.152]# RECV ASCII> MbedTLS connection close success.

5、onenet onenet_mqtt_init [D/onenet.mqtt] Enter mqtt_connect_callback! [D/mqtt] ipv4 address port: 6002 [D/mqtt] HOST = '183.230.40.39' [I/onenet.mqtt] RT-Thread OneNET package(V1.0.0) initialize success. msh /> msh />

[2020-03-16 22:49:42.131]# RECV ASCII> [I/mqtt] MQTT server connect success. [D/onenet.mqtt] Enter mqtt_online_callback!

[2020-03-16 22:50:16.703]# SEND ASCII> onenet_upload_cycle

[2020-03-16 22:50:16.765]# RECV ASCII> onenet_upload_cycle [D/onenet.sample] buffer : {"temperature":76} [2020-03-16 22:50:21.773]# RECV ASCII> [D/onenet.sample] buffer : {"temperature":91} [2020-03-16 22:50:26.781]# RECV ASCII> [D/onenet.sample] buffer : {"temperature":91} [2020-03-16 22:50:31.773]# RECV ASCII> [D/onenet.sample] buffer : {"temperature":78} [2020-03-16 22:50:36.780]# RECV ASCII> [D/onenet.sample] buffer : {"temperature":18} ……

6、network-samples(tcpclient、udpclient) 6.1 tcp client tcpclient 119.145.136.58 5001 [2020-03-16 23:06:35.660]# RECV ASCII> Connect successful [2020-03-16 23:07:03.646]# RECV ASCII> Received data = 23131231

6.2 udpclient

udpclient 119.145.136.58 5001

udp sever log如下: 2020-03-16 23:08:50 CLIENT->SERVER 183.232.214.38:49642 This is UDP Client from RT-Thread. CLIENT->SERVER 183.232.214.38:49642 This is UDP Client from RT-Thread. CLIENT->SERVER 183.232.214.38:49642 This is UDP Client from RT-Thread. CLIENT->SERVER 183.232.214.38:49642 This is UDP Client from RT-Thread. CLIENT->SERVER 183.232.214.38:49642 This is UDP Client from RT-Thread. CLIENT->SERVER 183.232.214.38:49642 This is UDP Client from RT-Thread. CLIENT->SERVER 183.232.214.38:49642 This is UDP Client from RT-Thread. CLIENT->SERVER 183.232.214.38:49642 This is UDP Client from RT-Thread. CLIENT->SERVER 183.232.214.38:49642 This is UDP Client from RT-Thread. CLIENT->SERVER 183.232.214.38:49642 This is UDP Client from RT-Thread.

Lawlieta commented 4 years ago

好的,README.md 文档再同步更新一下就没问题了 @HouqiLi

HouqiLi commented 4 years ago

好的,README.md 文档再同步更新一下就没问题了 @HouqiLi

OK

Lawlieta commented 4 years ago

https://github.com/RT-Thread/packages 软件包索引还需要同步更新一下 @HouqiLi