brunch

You can make anything
by writing

C.S.Lewis

by Master Seo Apr 03. 2020

9. 스마트폰에서 라즈베리파이4 연결하기

스마트폰에서 라즈베리파이4 연결해보자.



1. 라즈베리파이에 putty로 로그온 


2. 디바이스 확인
root@raspberrypi:/home/pi# hcitool dev
Devices:
hci0 DC:A6:32:0D:1B:3C


3. 설정 변경
root@raspberrypi:/home/pi# vi /etc/systemd/system/dbus-org.bluez.service

[Unit]
Description=Bluetooth service
Documentation=man:bluetoothd(8)
ConditionPathIsDirectory=/sys/class/bluetooth

[Service]
Type=dbus
BusName=org.bluez
ExecStart=/usr/lib/bluetooth/bluetoothd -C


4. 설정 확인
[bluetooth]# show
Controller DC:A6:32:0D:1B:3C (public)
Name: raspberrypi
Alias: raspberrypi
Class: 0x00480000
Powered: yes
Discoverable: no



5.  스마트폰으 블루투스 찾을수 있게 ON 시키기
[bluetooth]# discoverable on

Changing discoverable on succeeded

[CHG] Controller DC:A6:32:0D:1B:3C Discoverable: yes


[bluetooth]# show
Controller DC:A6:32:0D:1B:3C (public)
Name: raspberrypi
Alias: raspberrypi
Class: 0x00480000
Powered: yes
Discoverable: yes


6. 스마트폰에서 연결하기



Modalias: usb:v1D6Bp0246d0532
Discovering: no
[NEW] Device 94:8B:C1:2F:26:F3 Galaxy S8+


[CHG] Device 94:8B:C1:2F:26:F3 ServicesResolved: yes
[CHG] Device 94:8B:C1:2F:26:F3 Paired: yes
[CHG] Device 94:8B:C1:2F:26:F3 ServicesResolved: no
[CHG] Device 94:8B:C1:2F:26:F3 Connected: no
[bluetooth]#



7. 통신 연결 하기


[bluetooth]# trust 94:8B:C1:2F:26:F3
[CHG] Device 94:8B:C1:2F:26:F3 Trusted: yes
Changing 94:8B:C1:2F:26:F3 trust succeeded




https://brunch.co.kr/@topasvga/1378



감사합니다.

브런치는 최신 브라우저에 최적화 되어있습니다. IE chrome safari