{"id":4945,"date":"2021-12-27T10:40:05","date_gmt":"2021-12-27T01:40:05","guid":{"rendered":"https:\/\/now0930.pe.kr\/wordpress\/?p=4945"},"modified":"2021-12-27T10:41:42","modified_gmt":"2021-12-27T01:41:42","slug":"raspberry-pi4-bluetooth-pairing-with-cli","status":"publish","type":"post","link":"https:\/\/now0930.pe.kr\/wordpress\/raspberry-pi4-bluetooth-pairing-with-cli\/","title":{"rendered":"raspberry pi4 bluetooth pairing with cli"},"content":{"rendered":"\n<p>\uc0b4\ub2e4 \ubcf4\uba74 \ud130\ubbf8\ub110\ub85c \ube14\ub8e8\ud22c\uc2a4 \ud398\uc774\ub9c1\uc744 \ud560 \ud544\uc694\uac00 \uc788\ub2e4. bluetoothctl\uac00 \uc81c\uacf5\ud558\ub294 scan on, pair, trust, connect\ub85c \uac00\ub2a5\ud558\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[bluetooth]# pair 34:88:5D:5C:C2:65\nDevice 34:88:5D:5C:C2:65 not available\n[bluetooth]# scan on\nDiscovery started\n[CHG] Controller AA:AA:AA:AA:AA:AA Discovering: yes\n[CHG] Device 74:31:32:C6:8F:67 RSSI: -72\n[CHG] Device 74:31:32:C6:8F:67 TxPower: 12\n[CHG] Device 00:17:55:B0:CF:2E RSSI: -84\n[CHG] Device 5F:B7:26:83:54:58 RSSI: -73\n[CHG] Device 5F:B7:26:83:54:58 TxPower: 26\n[CHG] Device 75:CB:B4:32:0F:29 RSSI: -85\n[CHG] Device 5F:5C:FD:38:FC:36 RSSI: -84\n[CHG] Device 5F:5C:FD:38:FC:36 TxPower: 6\n[CHG] Device 68:47:92:B1:39:9C RSSI: -73\n[CHG] Device 68:47:92:B1:39:9C TxPower: 8\n[CHG] Device 58:7B:3E:E0:3F:F5 RSSI: -72\n[CHG] Device 58:7B:3E:E0:3F:F5 TxPower: 7\n[CHG] Device 42:39:EF:80:06:A0 RSSI: -71\n[CHG] Device 42:39:EF:80:06:A0 TxPower: 12\n[CHG] Device 00:17:55:B0:CF:2C RSSI: -89\n[CHG] Device 00:17:55:B0:CC:14 RSSI: -79\n[CHG] Device 7D:72:08:EE:56:18 RSSI: -72\n[CHG] Device 7D:72:08:EE:56:18 TxPower: 24\n[CHG] Device 42:39:EF:80:06:A0 AdvertisingFlags:\n  00                                               .               \n[CHG] Device 00:17:55:B0:C3:AA RSSI: -88\n[CHG] Device 43:AF:C1:01:A4:9E RSSI: -73\n[CHG] Device 43:AF:C1:01:A4:9E TxPower: 7\n[CHG] Device 00:17:55:B0:CF:27 RSSI: -89\n[CHG] Device 00:17:55:B0:CC:16 RSSI: -91\n[CHG] Device 43:AF:C1:01:A4:9E AdvertisingFlags:\n  00                                               .               \n[CHG] Device 00:17:55:B0:CC:16 AdvertisingFlags:\n  00                                               .               \n[CHG] Device 00:17:55:B0:CF:27 AdvertisingFlags:\n  00                                               .               \n[CHG] Device 53:02:B7:C1:DA:EF RSSI: -90\n[CHG] Device 00:17:55:B0:CF:2C AdvertisingFlags:\n  00                                               .               \n[CHG] Device 53:02:B7:C1:DA:EF AdvertisingFlags:\n  00                                               .               \n[NEW] Device 34:88:5D:5C:C2:65 Keyboard K480\n[CHG] Device DC:B5:4F:0A:1B:C7 RSSI: -79\n[bluetooth]# pair 34:88:5D:5C:C2:65\nAttempting to pair with 34:88:5D:5C:C2:65\nFailed to pair: org.bluez.Error.ConnectionAttemptFailed\n[CHG] Device 42:39:EF:80:06:A0 AdvertisingFlags:\n  1a                                               .               \n[CHG] Device 00:17:55:B0:CC:16 AdvertisingFlags:\n  06                                               .               \n[CHG] Device 2E:23:6D:1E:EC:1A RSSI: -85\n[CHG] Device 43:AF:C1:01:A4:9E AdvertisingFlags:\n  1a                                               .               \n[CHG] Device 00:17:55:B0:CF:27 AdvertisingFlags:\n  06                                               .               \n[CHG] Device 70:4A:71:F9:0C:89 RSSI: -92\n[CHG] Device 70:4A:71:F9:0C:89 TxPower: 7\n[CHG] Device 70:4A:71:F9:0C:89 AdvertisingFlags:\n  1a                                               .               \n[CHG] Device 53:02:B7:C1:DA:EF AdvertisingFlags:\n  02                                               .               \n[CHG] Device 68:47:92:B1:39:9C RSSI: -86\n[CHG] Device 75:CB:B4:32:0F:29 RSSI: -97\n[NEW] Device 00:17:55:B0:CE:F5 44881938.01000222\n[CHG] Device 53:02:B7:C1:DA:EF AdvertisingFlags:\n  00                                               .               \n[CHG] Device 00:17:55:B0:CF:2C AdvertisingFlags:\n  06                                               .               \n[bluetooth]# pair 34:88:5D:5C:C2:65\nAttempting to pair with 34:88:5D:5C:C2:65\n[CHG] Device 34:88:5D:5C:C2:65 Connected: yes\n[agent] Passkey: 091237\n[agent] Passkey: 091237\n[agent] Passkey: 091237\n[agent] Passkey: 091237\n[agent] Passkey: 091237\n[agent] Passkey: 091237\n[agent] Passkey: 091237\n[CHG] Device 34:88:5D:5C:C2:65 Modalias: usb:v046DpB33Cd2802\n[CHG] Device 34:88:5D:5C:C2:65 UUIDs: 00001000-0000-1000-8000-00805f9b34fb\n[CHG] Device 34:88:5D:5C:C2:65 UUIDs: 00001124-0000-1000-8000-00805f9b34fb\n[CHG] Device 34:88:5D:5C:C2:65 UUIDs: 00001200-0000-1000-8000-00805f9b34fb\n[CHG] Device 34:88:5D:5C:C2:65 ServicesResolved: yes\n[CHG] Device 34:88:5D:5C:C2:65 Paired: yes\nPairing successful\n[CHG] Device 34:88:5D:5C:C2:65 ServicesResolved: no\n[CHG] Device 34:88:5D:5C:C2:65 Connected: no\n[CHG] Device 00:17:55:B0:CC:14 RSSI: -89\n[CHG] Device 53:02:B7:C1:DA:EF AdvertisingFlags:\n  02                                               .               \n[CHG] Device 68:47:92:B1:39:9C RSSI: -78\n[CHG] Device 5F:5C:FD:38:FC:36 ManufacturerData Key: 0x004c\n[CHG] Device 5F:5C:FD:38:FC:36 ManufacturerData Value:\n  10 06 7e 1e 2a 4b a0 b5                          ..~.*K..        \n[CHG] Device 75:CB:B4:32:0F:29 RSSI: -88\n[CHG] Device 75:CB:B4:32:0F:29 AdvertisingFlags:\n  00                                               .               \n[CHG] Device 74:31:32:C6:8F:67 RSSI: -87\n[CHG] Device 7F:70:C6:B1:18:7B RSSI: -90\n[CHG] Device 7F:70:C6:B1:18:7B TxPower: 12\n[CHG] Device 00:17:55:B0:CF:27 AdvertisingFlags:\n  00                                               .               \n[bluetooth]# trust 34:88:5D:5C:C2:65\n[CHG] Device 34:88:5D:5C:C2:65 Trusted: yes\nChanging 34:88:5D:5C:C2:65 trust succeeded\n[CHG] Device 74:31:32:C6:8F:67 RSSI: -71\n[CHG] Device 00:17:55:B0:CC:14 RSSI: -80\n[CHG] Device 75:CB:B4:32:0F:29 AdvertisingFlags:\n  02                                               .               \n[NEW] Device 79:2D:EA:FA:C8:07 79-2D-EA-FA-C8-07\n[CHG] Device 43:AF:C1:01:A4:9E AdvertisingFlags:\n  00                                               .               \n[CHG] Device 42:39:EF:80:06:A0 AdvertisingFlags:\n  00                                               .               \n[CHG] Device 68:47:92:B1:39:9C AdvertisingFlags:\n  00                                               .               \n[CHG] Device 53:02:B7:C1:DA:EF AdvertisingFlags:\n  00                                               .               \n[CHG] Device 00:17:55:B0:C3:D0 RSSI: -94\n[CHG] Device 00:17:55:B0:CF:27 AdvertisingFlags:\n  06                                               .               \n[DEL] Device 7D:72:08:EE:56:18 7D-72-08-EE-56-18\n[DEL] Device 00:17:55:B0:CF:2E 44881995.01000222\n[DEL] Device 5F:B7:26:83:54:58 5F-B7-26-83-54-58\n[DEL] Device 72:1E:96:C2:47:34 72-1E-96-C2-47-34\n[DEL] Device 74:31:32:C6:8F:67 74-31-32-C6-8F-67\n[DEL] Device 5F:5C:FD:38:FC:36 5F-5C-FD-38-FC-36\n[DEL] Device 58:7B:3E:E0:3F:F5 58-7B-3E-E0-3F-F5\n[DEL] Device 68:47:92:B1:39:9C 68-47-92-B1-39-9C\n[DEL] Device 00:17:55:B0:CC:14 44881201.01000222\n[DEL] Device 42:39:EF:80:06:A0 42-39-EF-80-06-A0\n[DEL] Device 2E:23:6D:1E:EC:1A 2E-23-6D-1E-EC-1A\n[DEL] Device 52:16:A9:CA:B5:11 52-16-A9-CA-B5-11\n[DEL] Device 00:17:55:B0:CF:27 44881988.01000222\n[DEL] Device 7F:70:C6:B1:18:7B 7F-70-C6-B1-18-7B\n[DEL] Device 50:1E:AF:D4:17:76 50-1E-AF-D4-17-76\n[DEL] Device 00:17:55:B0:C3:AA 44879047.01000222\n[DEL] Device 6F:3D:D3:F2:4A:31 6F-3D-D3-F2-4A-31\n[DEL] Device DC:B5:4F:0A:1B:C7 Mike Bouchon\n[DEL] Device 00:17:55:B0:CC:16 44881203.01000222\n[DEL] Device 6F:44:C7:02:3B:D0 6F-44-C7-02-3B-D0\n[DEL] Device 4A:41:FE:14:FE:2A 4A-41-FE-14-FE-2A\n[DEL] Device 00:17:55:B0:CF:17 00-17-55-B0-CF-17\n[DEL] Device 40:CC:C6:57:E4:40 40-CC-C6-57-E4-40\n[DEL] Device 00:17:55:B0:CF:25 44881986.01000222\n[DEL] Device 70:4A:71:F9:0C:89 70-4A-71-F9-0C-89\n[DEL] Device 00:17:55:B0:CF:2C 44881993.01000222\n[DEL] Device 00:17:55:B0:C3:D0 00-17-55-B0-C3-D0\n[DEL] Device 76:7F:82:5E:9F:77 76-7F-82-5E-9F-77\n[DEL] Device 53:02:B7:C1:DA:EF 53-02-B7-C1-DA-EF\n[DEL] Device 57:09:04:A4:37:BD 57-09-04-A4-37-BD\n[DEL] Device 75:CB:B4:32:0F:29 75-CB-B4-32-0F-29\n[DEL] Device 43:AF:C1:01:A4:9E 43-AF-C1-01-A4-9E\n[DEL] Device 00:17:55:B0:CE:F5 44881938.01000222\n[DEL] Device 79:2D:EA:FA:C8:07 79-2D-EA-FA-C8-07\n[NEW] Device 7F:70:C6:B1:18:7B 7F-70-C6-B1-18-7B\n[bluetooth]# connect 34:88:5D:5C:C2:65\nAttempting to connect to 34:88:5D:5C:C2:65\n[CHG] Device 34:88:5D:5C:C2:65 Connected: yes\nConnection successful\n[NEW] Device DC:B5:4F:0A:1B:C7 Mike Bouchon\n[CHG] Device 34:88:5D:5C:C2:65 ServicesResolved: yes\n[NEW] Device 43:AF:C1:01:A4:9E 43-AF-C1-01-A4-9E\n[NEW] Device 5F:B7:26:83:54:58 5F-B7-26-83-54-58\n[NEW] Device 53:02:B7:C1:DA:EF 53-02-B7-C1-DA-EF\n[NEW] Device 7D:72:08:EE:56:18 7D-72-08-EE-56-18\n[NEW] Device 68:47:92:B1:39:9C 68-47-92-B1-39-9C\n[NEW] Device 10:B8:5D:5C:03:7E 10-B8-5D-5C-03-7E\n[NEW] Device 6F:1D:B5:96:AE:86 6F-1D-B5-96-AE-86\n[NEW] Device 74:31:32:C6:8F:67 74-31-32-C6-8F-67\n[NEW] Device 00:17:55:B0:CF:2E 44881995.01000222\n[NEW] Device 75:CB:B4:32:0F:29 75-CB-B4-32-0F-29\n[NEW] Device 42:39:EF:80:06:A0 42-39-EF-80-06-A0\n[NEW] Device 79:2D:EA:FA:C8:07 79-2D-EA-FA-C8-07\n[NEW] Device 00:17:55:B0:CF:27 44881988.01000222\n[NEW] Device 6F:3D:D3:F2:4A:31 6F-3D-D3-F2-4A-31\n[NEW] Device 00:17:55:B0:CC:14 44881201.01000222\n[NEW] Device 00:17:55:B0:C3:AA 44879047.01000222\n[CHG] Device 00:17:55:B0:CF:27 AdvertisingFlags:\n  00                                               .               \n[NEW] Device 00:17:55:B0:CF:2C 44881993.01000222\n[NEW] Device 00:17:55:B0:CC:16 44881203.01000222\n[CHG] Device DC:B5:4F:0A:1B:C7 RSSI: -80\n<\/pre>\n\n\n\n<p>\ucc98\uc74c \ube14\ub8e8\ud22c\uc2a4\ub97c \uc2e4\ud589\ud558\uba74 \uc798 \uc548\ub418\ub294\ub370, <a href=\"https:\/\/raspberrypi.stackexchange.com\/questions\/40839\/sap-error-on-bluetooth-service-status\">\uc5ec\uae30<\/a>\ub97c \ucc38\uc870\ud588\ub2e4. ExecStart\uc5d0 \uc635\uc158\uc744 \uc798 \ub123\uc5b4\uc8fc\uba74 \ub41c\ub2e4.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"shell\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">pi@raspberrypi:\/etc\/systemd\/system\/bluetooth.target.wants $ pwd\n\/etc\/systemd\/system\/bluetooth.target.wants\npi@raspberrypi:\/etc\/systemd\/system\/bluetooth.target.wants $ cat bluetooth.service bluetooth.service \n[Unit]\nDescription=Bluetooth service\nDocumentation=man:bluetoothd(8)\nConditionPathIsDirectory=\/sys\/class\/bluetooth\n\n[Service]\nType=dbus\nBusName=org.bluez\n#ExecStart=\/usr\/lib\/bluetooth\/bluetoothd\nExecStart=\/usr\/lib\/bluetooth\/bluetoothd --compat --noplugin=sap -E \nNotifyAccess=main\n#WatchdogSec=10\n#Restart=on-failure\nCapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE\nLimitNPROC=1\nProtectHome=true\nProtectSystem=full\n\n[Install]\nWantedBy=bluetooth.target\nAlias=dbus-org.bluez.service\n[Unit]\nDescription=Bluetooth service\nDocumentation=man:bluetoothd(8)\nConditionPathIsDirectory=\/sys\/class\/bluetooth\n\n[Service]\nType=dbus\nBusName=org.bluez\n#ExecStart=\/usr\/lib\/bluetooth\/bluetoothd\nExecStart=\/usr\/lib\/bluetooth\/bluetoothd --compat --noplugin=sap -E \nNotifyAccess=main\n#WatchdogSec=10\n#Restart=on-failure\nCapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE\nLimitNPROC=1\nProtectHome=true\nProtectSystem=full\n\n[Install]\nWantedBy=bluetooth.target\nAlias=dbus-org.bluez.service<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\uc0b4\ub2e4 \ubcf4\uba74 \ud130\ubbf8\ub110\ub85c \ube14\ub8e8\ud22c\uc2a4 \ud398\uc774\ub9c1\uc744 \ud560 \ud544\uc694\uac00 \uc788\ub2e4. bluetoothctl\uac00 \uc81c\uacf5\ud558\ub294 scan on, pair, trust, connect\ub85c \uac00\ub2a5\ud558\ub2e4. \ucc98\uc74c \ube14\ub8e8\ud22c\uc2a4\ub97c \uc2e4\ud589\ud558\uba74 \uc798 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[12],"tags":[1021,798],"class_list":["post-4945","post","type-post","status-publish","format-standard","hentry","category-12","tag-bluetooth","tag-raspberry"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts\/4945","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/comments?post=4945"}],"version-history":[{"count":2,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts\/4945\/revisions"}],"predecessor-version":[{"id":4948,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/posts\/4945\/revisions\/4948"}],"wp:attachment":[{"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/media?parent=4945"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/categories?post=4945"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/now0930.pe.kr\/wordpress\/wp-json\/wp\/v2\/tags?post=4945"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}