<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title><![CDATA[Dobrica Pavlinušić's random unstructured stuff: bluetooth]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?action=weblog_display;category=bluetooth</link>
<description></description>
<pubDate>Sat, 24 Sep 2016 17:37:33 -0000</pubDate>
<webMaster>root@saturn.ffzg.hr</webMaster>
<generator>Socialtext Workspace v2.19.0.2</generator>

<item>
<title><![CDATA[Bluetooth]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?bluetooth</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div>Tags: bluetooth, hid</div><hr/><div class="wiki">
<p>
This page will try to document my long-living dream of having bluetooth software keyboard HID<br />
serial port and other stuff</p>
<ul>
<li><a target="_blank" title="(external link)" href="https://wiki.archlinux.org/index.php/bluetooth">https://wiki.archlinux.org/index.php/bluetooth</a></li>
</ul>
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#xkbd_bthid_a_software_bluetooth_hid_keyboard">Dobrica Pavlinušić's random unstructured stuff (xkbd-bthid : a software Bluetooth HID Keyboard)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] xkbd-=bthid : a software Bluetooth HID Keyboard} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#my_changes">Dobrica Pavlinušić's random unstructured stuff (My Changes)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] My Changes} --></span></li>
</ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#serial_sp">Dobrica Pavlinušić's random unstructured stuff (serial SP)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] serial SP} --></span></li>

<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#modify_systemd_script">Dobrica Pavlinušić's random unstructured stuff (modify systemd script)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] modify systemd script} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#bring_up_device_and_make_it_discoverable">Dobrica Pavlinušić's random unstructured stuff (bring up device and make it discoverable)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] bring up device and make it discoverable} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#serial_server">Dobrica Pavlinušić's random unstructured stuff (serial server)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] serial server} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#serial_client">Dobrica Pavlinušić's random unstructured stuff (serial client)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] serial client} --></span></li>
</ul></ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="xkbd_bthid_a_software_bluetooth_hid_keyboard">xkbd-bthid : a software Bluetooth HID Keyboard</h1>
<ul>
<li><a target="_blank" title="(external link)" href="http://mulliner.org/bluetooth/xkbdbthid.php">http://mulliner.org/bluetooth/xkbdbthid.php</a></li>
</ul>
<h2 id="my_changes">My Changes</h2>
<div class="nlw_phrase"><div class="fetchrss_box">
  <div class="fetchrss_titlebox">
    
 <div class="fetchrss_title">
     fetchrss: http://git.rot13.org/?p=xkbdbthid.git;a=rss
 </div>

  </div>
  
<ul class="fetchrss_item">
  <li class="fetchrss_item">
    There was an error: Cannot detect feed type

  </li>
</ul>

</div>
















<!-- wiki: {fetchrss: http://git.rot13.org/?p==xkbdbthid.git;a==rss}
--></div><br /><br /><hr class="rule-medium" />
<h1 id="serial_sp">serial SP</h1>
<h2 id="modify_systemd_script">modify systemd script</h2>
<pre>
tab:~# sdptool browese local
Failed to connect to SDP server on FF:FF:FF:00:00:00: No such file or directory

tab:~# vi /etc/systemd/system/bluetooth.target.wants/bluetooth.service 

#ExecStart=/usr/lib/bluetooth/bluetoothd
# make sdptool browse local work again!
ExecStart=/usr/lib/bluetooth/bluetoothd --compat

tab:~# systemctl daemon-reload
tab:~# systemctl restart bluetooth.service


</pre>
<br /><h2 id="bring_up_device_and_make_it_discoverable">bring up device and make it discoverable</h2>
<pre>
root@rpi2:~# hciconfig 
hci0:   Type: BR/EDR  Bus: UART
        BD Address: B8:27:EB:A3:88:32  ACL MTU: 1021:8  SCO MTU: 64:1
        DOWN 
        RX bytes:9088 acl:39 sco:0 events:343 errors:0
        TX bytes:8208 acl:44 sco:0 commands:265 errors:0

root@rpi2:~# hciconfig hci0 up

root@rpi2:~# hciconfig 
hci0:   Type: BR/EDR  Bus: UART
        BD Address: B8:27:EB:A3:88:32  ACL MTU: 1021:8  SCO MTU: 64:1
        UP RUNNING PSCAN 
        RX bytes:9784 acl:39 sco:0 events:382 errors:0
        TX bytes:8967 acl:44 sco:0 commands:304 errors:0

root@rpi2:~# hciconfig hci0 piscan
</pre>
<br /><h2 id="serial_server">serial server</h2>
<pre>
root@nuc:~# sdptool browse local | grep SP
root@nuc:~# sdptool add --channel=3 SP
Serial Port service registered
root@nuc:~# mknod -m 666 /dev/rfcomm0 c 216 0
root@nuc:~# rfcomm watch /dev/rfcomm0 3 /sbin/agetty rfcomm0 115200 linux
Waiting for connection on channel 3
Connection from B8:27:EB:A3:88:32 to /dev/rfcomm0
Press CTRL-C for hangup
Disconnected
Waiting for connection on channel 3

</pre>
<br /><h2 id="serial_client">serial client</h2>
<pre>
root@rpi2:~# sdptool browse local | grep SP
root@rpi2:~# hcitool scan
Scanning ...
        E0:2A:82:90:2D:7B       nuc
root@rpi2:~# sdptool add --channel=3 SP
Serial Port service registered
root@rpi2:~# rfcomm connect /dev/rfcomm0 E0:2A:82:90:2D:7B 3
Connected /dev/rfcomm0 to E0:2A:82:90:2D:7B on channel 3
Press CTRL-C for hangup
</pre>
</div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category>bluetooth, hid</category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?bluetooth</guid>
<pubDate>Sat, 24 Sep 2016 17:37:33 -0000</pubDate>
</item>
</channel>
</rss>