飞凌嵌入式
直播中

8888811111

2年用户 28经验值
擅长:可编程逻辑
私信 关注
[技术]

【飞凌嵌入式OK3568-C开发板试用体验】飞凌OK3568开发板与手机互传文件

    朋友刚通过微信传给我1个精彩的程序,怎么样才能快速传到开发板
    开发板成功编译了1个程序,赶快告诉合作方,如何才能及时传到手机
    别慌,飞凌OK3568开发板的功能太多了!可快速、方便地实现开发板与手机之间互传文件。
1 参照笔者“飞凌OK3568开发板硬件搭建”的帖子,进行开发板的其它硬件连接,参见1.jpg。

2 参照笔者“飞凌OK3568开发板硬件搭建”的帖子,配置Hyper Terminal,参见2.jpg。

3打开开发板的电源,开发板成功启动后,在HyperTerminal程序输入ls,可显示文件列表,如3.jpg:


4 Hyper Terminal程序窗口输入:
[root@ok3568:/]#bluetoothctl //打开bluez蓝牙工具
Agent registered
[bluetooth]# power on //启动蓝牙设备
[CHG] Controller 36:DC:25:54:7C:CB Class: 0x00100000
Changing power on succeeded
[CHG] Controller 36:DC:25:54:7C:CB Powered: yes
[bluetooth]# pairable on //设置为配对模式
Changing pairable on succeeded
[bluetooth]# discoverable on //设置为可发现模式
Changing discoverable on succeeded
[CHG] Controller 36:DC:25:54:7C:CB Discoverable: yes
[bluetooth]# agent on //启动代理
Agent is already registered
[bluetooth]# default-agent
Default agent request successful
5  打开手机蓝牙进行扫描,如果长时间未扫描到请重复执行。
[bluetooth]# discoverable on //设置当前代理为默认
//点击BlueZ 5.50进行配对,手机端和开发板分别进行密码验证,选择YES
[NEW] Device C4:FE:5B:17:C7:78 OPPO Reno3 元气版5G
Request confirmation
[agent] Confirm passkey 508432 (yes/no): yes
[CHG] Device C4:FE:5B:17:C7:78 Modalias: bluetooth:v001Dp1200d1436
[CHG] Device C4:FE:5B:17:C7:78 UUIDs:00001105-0000-1000-8000-00805f9b34fb
[CHG] Device C4:FE:5B:17:C7:78 UUIDs:0000110a-0000-1000-8000-00805f9b34fb
[CHG] Device C4:FE:5B:17:C7:78 UUIDs:0000110c-0000-1000-8000-00805f9b34fb
[CHG] Device C4:FE:5B:17:C7:78 UUIDs:0000110e-0000-1000-8000-00805f9b34fb
[CHG]Device C4:FE:5B:17:C7:78 UUIDs: 00001112-0000-1000-8000-00805f9b34fb
[CHG]Device C4:FE:5B:17:C7:78 UUIDs: 00001115-0000-1000-8000-00805f9b34fb
E:5B:17:C7:78UUIDs: 0000111f-0000-1000-8000-00805f9b34fbb34fb
[CHG]Device C4:FE:5B:17:C7:78 UUI-8000-00805f9b34fb
[CHG]Device C4:FE:5B:17:C7:78-1000-8000-00805f9b34fb
[CHG]Device C4:FE:5B:17:C7:700-1000-8000-00805f9b34fb
[OPPOReno3 元气版5G]#viceC4:FE:5B:17:C7:78 UUIDs: 0000aa15-0000-1000-8000-008[CHG] DeviceC4:FE:5B:17:C7:95c-9f4f-bb80a90cdf00
ice C4:FE:5B:17:C7:78 ServicesResolved: yes
[CHG] Device C4:FE:5B:17:C7:78 Paired: yes
[CHG] Controller 36:DC:25:54:7C:CB Discoverable: no
[CHG] Device C4:FE:5B:17:C7:78 ServicesResolved: no
[CHG] Device C4:FE:5B:17:C7:78 Connected: no
6 配对成功后,可以将手机端的文件通过蓝牙分享到开发板,参见4.jpg。


6 输入quit退出bluetoothctl,接收到的文件位于/root目录
[bluetooth]# quit
[root@ok3568:/]# ls /root/
wx_camera_1581992646090.jpg
7 同时,我们也可以将开发板上的文件发送到手机端,参见5.jpg,在Hyper Terminal程序窗口输入:
[root@ok3568:/] # fltest_obexctl.sh
[obex]# connect C4:FE:5B:17:C7:78
Attempting to connect to C4:FE:5B:17:C7:78
[NEW] Session /org/bluez/obex/client/session0 [default]
[NEW] ObjectPush /org/bluez/obex/client/session0
Connection successful
[C4:FE:5B:17:C7:78]# send /home/forlinx/audio/test.mp3
Attempting to send /home/forlinx/audio/test.mp3 to/org/bluez/obex/client/session0
[NEW] Transfer /org/bluez/obex/client/session0/transfer0
Transfer /org/bluez/obex/client/session0/transfer0
Status: queued
Name: test.mp3
Size: 4818092
Filename: /home/forlinx/audio/test.mp3
Session: /org/bluez/obex/client/session0
[CHG]Transfer /org/bluez/obex/client/session0/transfer0 Status: active
[CHG]Transfer /org/bluez/obex/client/session0/transfer0 Transferred: 8046 (@8KB/s09:57)



  • 5.jpg
  • 4.jpg
  • 3.jpg
  • 2.jpg
  • 1.jpg

更多回帖

发帖
×
20
完善资料,
赚取积分