반응형

Raspberry pi 에서 BLE 띄우기

일단 깔아준다.

pi@raspberrypi:~ $ sudo apt install libusb-dev libdbus-1-dev libglib2.0-dev libudev-dev libical-dev libreadline-dev libdbus-glib-1-dev
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
libglib2.0-dev is already the newest version (2.58.3-2+deb10u2).
libglib2.0-dev 패키지는 수동설치로 지정합니다.
The following additional packages will be installed:
  gir1.2-ical-3.0 libdb-dev libdb5.3-dev libdbus-glib-1-dev-bin libncurses-dev
제안하는 패키지:
  db5.3-doc ncurses-doc readline-doc
다음 새 패키지를 설치할 것입니다:
  gir1.2-ical-3.0 libdb-dev libdb5.3-dev libdbus-1-dev libdbus-glib-1-dev libdbus-glib-1-dev-bin libical-dev libncurses-dev libreadline-dev libudev-dev libusb-dev
0개 업그레이드, 11개 새로 설치, 0개 제거 및 0개 업그레이드 안 함.
1,923 k바이트 아카이브를 받아야 합니다.
이 작업 후 10.2 M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] Y

하나 더
ubuntu@ubuntu:~$ sudo apt install bluez python-bluez

test해보기

git clone github.com/switchdoclabs/iBeacon-Scanner-


pi@raspberrypi:~/iBeacon-Scanner- $ sudo python ./testblescan.py
ble thread started
----------
44:23:7c:32:a0:0f,44130201060fff8f030a10e003000da0,12924,9028,-40,-70
21:d9:df:c8:d4:49,df82cf6c804115d6ba399b4ec7c41f81,56455,15436,76,-49
ec:55:4a:7c:64:8f,0c82071e2802010405ecaa253e32c7ec,43557,15922,-56,-82
66:0e:de:f4:d6:b4,0213151780020ad40303b9fe081b00d3,31664,10638,12,-77
77:71:5f:12:fe:5b,71771202011a020a0c0bff4c0010064d,7834,7605,56,-80
77:37:37:e8:44:af,fe000000000000000000000000000000,0,0,0,-45
7c:be:7f:2b:cc:f0,fe000000000000000000000000000000,0,0,0,-79
21:d9:df:c8:d4:49,df82cf6c804115d6ba399b4ec7c41f81,56455,15436,76,-46
ec:55:4a:7c:64:8f,0c82071e2802010405ecaa253e32c7ec,43557,15922,-56,-80
----------
70:eb:f4:0a:55:3a,f4eb701102011a020a060aff4c001005,792,48679,24,-73
44:23:7c:32:a0:0f,44130201060fff8f030a10e003000da0,12924,9028,-40,-70
44:23:7c:32:a0:0f,44130201060fff8f030a10e003000da0,12924,9028,-40,-70
04:cf:8c:24:88:1d,04130201060fff8f030a104803001b88,9356,52996,-127,-83
20:fa:bb:06:87:41,62d634905143efaac64c2fbc08085048,16718,21583,77,-64
a4:c1:38:d2:68:68,a4130201060f1695fe30585b05f86868,53816,49572,8,-59
50:ec:50:8c:53:4c,538c50ec500f0201060b16cdfd080d4c,21388,20716,80,-89
04:cf:8c:24:88:1d,88248ccf040f0201060b16cdfd080d1d,34852,36047,4,-92
ec:55:4a:7c:64:8f,0c82071e2802010405ecaa253e32c7ec,43557,15922,-56,-76
77:71:5f:12:fe:5b,71771202011a020a0c0bff4c0010064d,7834,7605,56,-62

줄줄줄 나온다.

반응형

'Embeded' 카테고리의 다른 글

ros2 Navigation2  (0) 2021.02.02
raspberry pi BLE test  (0) 2020.11.20
raspberry pi bluetooth a2dp sink 동작하기  (0) 2020.11.20
Posted by Real_G