{"id":23867,"date":"2018-06-18T17:00:06","date_gmt":"2018-06-18T22:00:06","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=23867"},"modified":"2019-09-04T09:26:43","modified_gmt":"2019-09-04T14:26:43","slug":"pairing","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/pairing\/","title":{"rendered":"Pairing"},"content":{"rendered":"<h2>Start bluetoothctl and pair an Android phone<\/h2>\n<p>In this particular example, we use an Android phone to pair with your\u00a0mLinux<sup>\u2122\u00a0<\/sup>device. Of course, you can use\u00a0other bluetooth-enabled devices for pairing.<\/p>\n<h3>Using bluetoothctl on the device<a title=\"Edit section: Using bluetoothctl on the device\" href=\"http:\/\/sw.multitech.prv\/mediawiki\/index.php?title=Bluez_5_PAN_setup&amp;action=edit&amp;section=18\"><br \/>\n<\/a><\/h3>\n<pre class=\"brush:shell\">$ sudo bluetoothctl\r\n[bluetooth] power on\r\n[bluetooth] discoverable on\r\n[bluetooth] pairable on\r\n[bluetooth] agent KeyboardOnly\r\n[bluetooth] default-agent<\/pre>\n<p>Enter the following command to show services:<\/p>\n<pre class=\"brush:shell\">[bluetooth]show<\/pre>\n<p>Now the system lists the services on the device.<\/p>\n<pre class=\"brush:shell\">Controller 00:23:A7:49:43:C1\r\n        Name: MTCDT-LORA-Bluez\r\n        Alias: MTCDT-LORA-Bluez\r\n        Class: 0x00020000\r\n        Powered: yes\r\n        Discoverable: yes\r\n        Pairable: yes\r\n        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)\r\n        UUID: NAP                       (00001116-0000-1000-8000-00805f9b34fb)\r\n        UUID: A\/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)\r\n        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)\r\n        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)\r\n        UUID: A\/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)\r\n        Modalias: usb:v1D6Bp0246d052F\r\n        Discovering: no<\/pre>\n<h3>Initial setup of phone<\/h3>\n<ol>\n<li>Go into the bluetooth menu of your phone and this should make your phone discoverable.<\/li>\n<li>Turn scan on the device. You should see the name of the device that was entered in main.conf (assuming you made the device discoverable).<\/li>\n<\/ol>\n<h3>Scan and trust on device<\/h3>\n<pre class=\"brush:shell\">scan on<\/pre>\n<p>Wait until you see the following message (for your device):<\/p>\n<pre class=\"brush:shell\">[NEW] Device DC:74:A8:05:39:77 Test Cell Phone<\/pre>\n<p>Now turn scan off and trust the device:<\/p>\n<pre class=\"brush:shell\">[bluetooth] scan off\r\nDiscovery stopped\r\n[bluetooth] trust DC:74:A8:05:39:77\r\n[CHG] Device DC:74:A8:05:39:77 Trusted: yes\r\nChanging DC:74:A8:05:39:77 trust succeeded<\/pre>\n<h3>Pairing from mLinux device<\/h3>\n<p>This operation must be done rapidly due to timeouts on pairing. The pairing must immediately be accepted from the phone. Now pair the device (note the passkey number):<\/p>\n<pre class=\"brush:shell\">[bluetooth] pair DC:74:A8:05:39:77\r\nAttempting to pair with DC:74:A8:05:39:77\r\n[CHG] Device DC:74:A8:05:39:77 Connected: yes\r\nRequest confirmation\r\n[agent] Confirm passkey 021168 (yes\/no): yes\r\n[CHG] Device DC:74:A8:05:39:77 Modalias: bluetooth:v0075p0100d0200\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 00001105-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 0000110a-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 0000110c-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 00001112-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 00001115-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 00001116-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 0000111f-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 0000112f-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 00001132-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 00001200-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 00001800-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 UUIDs: 00001801-0000-1000-8000-00805f9b34fb\r\n[CHG] Device DC:74:A8:05:39:77 ServicesResolved: yes\r\n[CHG] Device DC:74:A8:05:39:77 Paired: yes\r\nPairing successful\r\n[CHG] Device DC:74:A8:05:39:77 ServicesResolved: no\r\n[CHG] Device DC:74:A8:05:39:77 Connected: no\r\n[bluetooth]<\/pre>\n<p>If you have not done discovery for a while, or if the phone is not discoverable, you may see this response:<\/p>\n<pre class=\"brush:shell\">Device DC:74:A8:05:39:77 not available<\/pre>\n<h3>Response example on an Android Phone<\/h3>\n<p>You should see the same passkey number from the mLinux output displayed on the Android phone (the other connecting device in this example).<\/p>\n<p>Quickly confirm the passkey number to accept the request on the phone OS.<\/p>\n<p>If done in time, you should now see the device listed under Paired\u00a0Devices (or Bluetooth &gt; My Devices if using iOS)\u00a0 in the phone OS.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Start bluetoothctl and pair an Android phone In this particular example, we use an Android phone to pair with your\u00a0mLinux\u2122\u00a0device. Of course, you can use\u00a0other bluetooth-enabled devices for pairing. Using bluetoothctl on the device $ sudo bluetoothctl [bluetooth] power on [bluetooth] discoverable on [bluetooth] pairable on [bluetooth] agent KeyboardOnly [bluetooth] default-agent Enter the following command [&hellip;]<\/p>\n","protected":false},"author":1478,"featured_media":0,"parent":9184,"menu_order":8,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-23867","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/23867","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/1478"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=23867"}],"version-history":[{"count":29,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/23867\/revisions"}],"predecessor-version":[{"id":23870,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/23867\/revisions\/23870"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/9184"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=23867"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}