开发板支持蓝牙连接开发板,并用蓝牙进行下载程序。
在连接设备页面下,选择蓝牙,可以看到列表下已经有一个CH9141BLE2U的设备了,直接可以进行连接。
连接成功后,会显示已连接
下载程序时,可以选择用蓝牙进行下载。
蓝牙下载程序是比较慢的,而且下载时,网页会全部白一下并转几个圈圈。
当使用蓝牙下载程序、连接开发板时,不要再在代码里操作蓝牙外设,否则会导致开发板的蓝牙连接断开的问题。
如果想用电脑连接蓝牙传输数据,可能就会有一些问题了。
断开蓝牙,把网页刷新一下,重新插拔一下开发板,用USB连接上电脑。
在电脑上找到蓝牙后,点连接,会让输入PIN码,而这个码目前不知道。
手机连接也是一样的。
如下,手机与电脑上通过蓝牙搜索来连接开发板的蓝牙都是会配对失败的。
但是,用BleUart工具连接,却可以连接上,也不需要输入PIN码。
连接上后,蓝牙的状态灯也不会闪烁了。
在软件上,进行数据发送,每发送一次,开发板上的蓝牙状态灯会闪一次。
但却收不到蓝牙的数据。
开发板串口的输出如下,目前不知道是哪里的问题,技术人员也是非常的繁忙,还没有回复。
ready to OS start
sdk ver:Hi3861V100R001C00SPC030 2021-06-11 18:00:00
FileSystem mount ok.
wifi init success!
[dt4sw] DTPython_Demo_Entry()
MAIN_TASK start
addr : 0x48, val : 0x89,data2send 0x89
hiview init success.00 00:00:00 0 4 D 0/HIVIEW: log limit init success.
00 00:00:00 0 4 I 1/SAMGR: Bootstrap core services(count:3).
00 00:00:00 0 4 I 1/SAMGR: Init service:0x4e3fcc TaskPool:0xf31bc
00 00:00:00 0 4 I 1/SAMGR: Init service:0x4e3fd8 TaskPool:0xf31dc
00 00:00:00 0 4 I 1/SAMGR: Init service:0x4e6724 TaskPool:0xf31fc
00 00:00:00 0 136 I 1/SAMGR: Init service 0x4e3fd8 success!
00 00:00:00 0 36 I 1/SAMGR: Init service 0x4e3fcc success!
00 00:00:00 0 236 I 1/SAMGR: Init service 0x4e6724 success!
00 00:00:00 0 236 I 1/SAMGR: Initialized all core system services!
00 00:00:00 0 36 I 1/SAMGR: Bootstrap system and application services(count:0).
00 00:00:00 0 36 I 1/SAMGR: Initialized all system and application services!
00 00:00:00 0 36 I 1/SAMGR: Bootstrap dynamic registered services(count:0).
ERR. extern 32k crystal not stable[80000002]
ch455 i2c write success cycledtimes : 487
addr : 0x68, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
addr : 0x6a, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
addr : 0x6c, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
addr : 0x6e, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
str is 0000000000001000000000000000
pic2disp = 512
addr : 0x68, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
addr : 0x6a, val : 0x2,data2send 0x2
ch455 i2c write success cycledtimes : 1
addr : 0x6c, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
addr : 0x6e, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
str is 0000001110010100111000000000
pic2disp = 1860865
addr : 0x68, val : 0x1,data2send 0x1
ch455 i2c write success cycledtimes : 1
addr : 0x6a, val : 0x65,data2send 0x65
ch455 i2c write success cycledtimes : 1
addr : 0x6c, val : 0x1c,data2send 0x1c
ch455 i2c write success cycledtimes : 1
addr : 0x6e, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
str is 1111110001100011000111111000
pic2disp = 2019760254
addr : 0x68, val : 0x7e,data2send 0x7e
ch455 i2c write success cycledtimes : 1
addr : 0x6a, val : 0x18,data2send 0x18
ch455 i2c write success cycledtimes : 1
addr : 0x6c, val : 0x63,data2send 0x63
ch455 i2c write success cycledtimes : 1
addr : 0x6e, val : 0x78,data2send 0x78
ch455 i2c write success cycledtimes : 1
str is 1111111111110111111111111000
pic2disp = 2021621119
addr : 0x68, val : 0x7f,data2send 0x7f
ch455 i2c write success cycledtimes : 1
addr : 0x6a, val : 0x7d,data2send 0x7d
ch455 i2c write success cycledtimes : 1
addr : 0x6c, val : 0x7f,data2send 0x7f
ch455 i2c write success cycledtimes : 1
addr : 0x6e, val : 0x78,data2send 0x78
ch455 i2c write success cycledtimes : 1
str is 1111111111111111111111111000
pic2disp = 2021621631
addr : 0x68, val : 0x7f,data2send 0x7f
ch455 i2c write success cycledtimes : 1
addr : 0x6a, val : 0x7f,data2send 0x7f
ch455 i2c write success cycledtimes : 1
addr : 0x6c, val : 0x7f,data2send 0x7f
ch455 i2c write success cycledtimes : 1
addr : 0x6e, val : 0x78,data2send 0x78
ch455 i2c write success cycledtimes : 1
addr : 0x68, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
addr : 0x6a, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
addr : 0x6c, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
addr : 0x6e, val : 0,data2send 0
ch455 i2c write success cycledtimes : 1
'math.py' is existed!
Bluetooth_uart_demo, Initialize uart driver
Bluetooth test start...
BleConfig : AT...
Initialize uart demo successfully...
[ack rcvd] : OK
len : 4
ble config ok
BleConfig : AT+INITIO=7F
[ack rcvd] : OK
len : 4
BleConfig : AT+BLEMODE=2
ble config ok
[ack rcvd] : OK
len : 4
BleConfig : AT+GPIO7=0
ble config ok
[ack rcvd] : OK
len : 4
BleConfig : AT+GPIO5=1
ble config ok
[ack rcvd] : OK
len : 4
BleConfig : AT+RESET
ble config ok
[ack rcvd] : OK
len : 4
ble config ok
Ble Reset
Python Code Begin
Traceback (most recent call last):
File "math.py"
SyntaxError: invalid syntax
Python Code End