鸿蒙设备开发二|编译-烧录 原创
经过第一步的开箱和环境搭建开箱和环境搭建
现在进入关键的灵活编译和烧录,因为确实不会写代码,直接从咱们的官方仓库下载即可。
之前的环境采用纯windows,一直编译失败,
这次采用官方推荐的,ubuntu编译,windows 烧录
烧录工具还是很简洁的。
pegasus@ubuntu:~/harmonyos/openharmony$ ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.22.101 netmask 255.255.255.0 broadcast 192.168.22.255
inet6 fe80::5f44:6237:b39f:fed6 prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:46:fd:8a txqueuelen 1000 (Ethernet)
RX packets 791 bytes 1018723 (1.0 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 686 bytes 81341 (81.3 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
inet 192.168.81.128 netmask 255.255.255.0 broadcast 192.168.81.255
inet6 fe80::af4e:4fc8:ec4f:bcfe prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:05:97:a3 txqueuelen 1000 (Ethernet)
RX packets 1005 bytes 1058985 (1.0 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 490 bytes 55296 (55.2 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Microsoft Windows [版本 10.0.10240]
© 2015 Microsoft Corporation. All rights reserved.
C:\Users\z>ping 192.168.81.128
正在 Ping 192.168.81.128 具有 32 字节的数据:
来自 192.168.81.128 的回复: 字节=32 时间<1ms TTL=64
来自 192.168.81.128 的回复: 字节=32 时间=1ms TTL=64
来自 192.168.81.128 的回复: 字节=32 时间<1ms TTL=64
来自 192.168.81.128 的回复: 字节=32 时间<1ms TTL=64
192.168.81.128 的 Ping 统计信息:
数据包: 已发送 = 4,已接收 = 4,丢失 = 0 (0% 丢失),
往返行程的估计时间(以毫秒为单位):
最短 = 0ms,最长 = 1ms,平均 = 0ms
CStartBurn
total size:0xB4050
Execution Successful
============================================
erase flash 0x1FA000 0x6000
Ready for download
CCCtotal size:0x6000
Execution Successful
============================================
Wait connect success flag (hisilicon) overtime.
[14:24:39.448]收←◆AT+HELPbusy!
+HELP:
AT AT+RST AT+MAC AT+HELP
AT+SYSINFO AT+DHCP AT+DHCPS AT+NETSTAT
AT+PING AT+PING6 AT+DNS AT+DUMP
AT+IPSTART AT+IPLISTEN AT+IPSEND AT+IPCLOSE
AT+XTALCOM AT+RDTEMP AT+STOPSTA AT+SCAN
AT+SCANCHN AT+SCANSSID AT+SCANPRSSID AT+SCANRESULT
AT+CONN AT+FCONN AT+DISCONN AT+STASTAT
AT+RECONN AT+STARTAP AT+SETAPADV AT+STOPAP
AT+SHOWSTA AT+DEAUTHSTA AT+APSCAN AT+RXINFO
AT+CC AT+TPC AT+TRC AT+SETRATE
AT+ARLOG AT+VAPINFO AT+USRINFO AT+SLP
AT+WKGPIO AT+USLP AT+ARP AT+PS
AT+ND AT+CSV AT+FTM AT+FTMERASE
AT+SETUART AT+IFCFG AT+STARTSTA AT+ALTX
AT+ALRX AT+CALFREQ AT+SETRPWR AT+RCALDATA
AT+SETIOMODE AT+GETIOMODE AT+GPIODIR AT+WTGPIO
AT+RDGPIO
OK
AT+STARTSTA - 启动STA模式
AT+SCAN - 扫描周边AP
AT+SCANRESULT - 显示扫描结果
AT+CONN=“SSID“,2,“PASSWORD“ - 连接指定AP,其中SSID/PASSWORD为待连接的热点名称和密码——注意符合的中英文
AT+STASTAT - 查看连接结果
AT+DHCP=wlan0,1 - 通过DHCP向AP请求wlan0的IP地址
3、查看WLAN模组与网关联通是否正常
AT+IFCFG - 查看模组接口IP
烧录成功,重启
操作很简单
大功告成 成功入网
烧录方面楼主也可以直接参考下官方文档:https://device.harmonyos.com/cn/docs/documentation/guide/ide-hi3518-upload-0000001057313128