jacky

A technique blog for jacky

here are my artitles about work(embeded system develop, docker, etc.) and life(cook, hiking)


debug bluez5 on raspberrypi 3

pi@scmbot:~ $ sudo bluetoothctl
[NEW] Controller 00:1B:DC:0F:5A:0C scmbot [default]
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# agent on
Agent registered
[bluetooth]# pairable on
Changing pairable on succeeded
[bluetooth]# scan on
Discovery started
[CHG] Controller 00:1B:DC:0F:5A:0C Discovering: yes
[NEW] Device DC:2C:26:41:B8:10 MEDION MD86853
[bluetooth]# scan off
[CHG] Device DC:2C:26:41:B8:10 RSSI is nil
Discovery stopped
[CHG] Controller 00:1B:DC:0F:5A:0C Discovering: no
[bluetooth]# pair DC:2C:26:41:B8:10
Attempting to pair with DC:2C:26:41:B8:10
[CHG] Device DC:2C:26:41:B8:10 Connected: yes
[agent] PIN code: XXXXXX
[CHG] Device DC:2C:26:41:B8:10 Modalias: usb:v04E8p7021d011B
[CHG] Device DC:2C:26:41:B8:10 UUIDs:
00001000-0000-1000-8000-00805f9b34fb
00001124-0000-1000-8000-00805f9b34fb
00001200-0000-1000-8000-00805f9b34fb
[CHG] Device DC:2C:26:41:B8:10 Paired: yes
Pairing successful
[CHG] Device DC:2C:26:41:B8:10 Connected: no
[bluetooth]# trust DC:2C:26:41:B8:10
[CHG] Device DC:2C:26:41:B8:10 Trusted: yes
Changing DC:2C:26:41:B8:10 trust succeeded
[bluetooth]# connect DC:2C:26:41:B8:10 
Attempting to connect to DC:2C:26:41:B8:10
[CHG] Device DC:2C:26:41:B8:10 Connected: yes
Connection successful
[CHG] Device DC:2C:26:41:B8:10 Connected: no
[CHG] Device DC:2C:26:41:B8:10 Class: 0x000540
[CHG] Device DC:2C:26:41:B8:10 Icon: input-keyboard
[CHG] Device DC:2C:26:41:B8:10 Connected: yes
[bluetooth]# quit
Agent unregistered
[DEL] Controller 00:1B:DC:0F:5A:0C scmbot [default]
pi@scmbot:~ $

Now here’s the trick. Bluez PNAT is not needed and breaks things, so edit main.conf:

Code: Select all

sudo nano /etc/bluetooth/main.conf

and add this line towards the top:

Code: Select all

DisablePlugins = pnat

Receive files on Raspberry Pi 3 with bluetooth

sudo nano /etc/systemd/system/dbus-org.bluez.service

and add a ‘ -C’ flag at the end of the ExecStart= line. Reboot, and try to start obexpushd again. Try with sudo if that does not work.

bluetoothctl代替了bluez-simple-agent

bluetoothctl怎么配对?

Bluez-utils has been removed in the Bluez 5 package

Bluez-simple-agent is renamed, to simple-agent (I think) but bluetoothctl has been added for managing devices. It’s a sweet little CLI used for various tasks like pairing and trusting

fix “Failed to pair: org.bluez.Error.AlreadyExists”

##配对成功(iPhone 6s)

root@edison:~# rfkill unblock bluetooth   
root@edison:~# bluetoothcutl   
power on
[bluetooth]# agent KeyboardDiasplay   
[bluetooth]# default-agent
[bluetooth]# scan on   
[bluetooth]# scan off   
[bluetooth]# pair <device>
Failed to connect: org.bluez.Error.Failed
最近的文章

Test bluez 5.x on arm Linux with kernel 4.1.x

test bluez 5.x on arm-linux platform from zsjsh /etc/enable_bt.shcd /usr/libexec/bluetooth/./bluetoothd -C &hciconfig hci0 uphciconfig hci0 piscan#不执行会报错 (Using X11 for dbus-daemon autolaunch was disabled at compile time, set your DBUS_SESSIO...…

继续阅读
更早的文章

怎么转换srtm hgt数据到osm

怎么转换SRTM hgt数据到OSM​ -jacky推荐使用工具 phyghtmap 主页 使用手册参考环境Ubuntu16.04 python3.5第一步 搭建使用环境搭建python3.5开发环境验证首先验证当前python版本,验证方法如下:打开终端(control + alt + T),输入这是python2.7的版本,phyghtmap不依赖2.7的版本,只需要3.x的版本jacklin@ubuntu:~$ python --versionPyth...…

继续阅读