title: iBeacon Dynamic Minor Value
body: <p>I am using a Raspberry Pi as an iBeacon by creating a LaunchService that runs on startup executing the following (using BlueZ):</p>
  
  <pre><code>sudo hciconfig hci0 up
  sudo hcitool -i hci0 cmd 0x08 0x0006 40 [...] 00
  sudo hcitool -i hci0 cmd 0x08 0x000A 01
  sudo hcitool -i hci0 cmd 0x08 0x0008 1E [...] 02 C0 00 00 00 00 C5 00
  </code></pre>
  
  <p>So far this has worked beautifully. The service runs and as long as the Pi is powered, the iBeacon is advertised.</p>
  
  <p>Now I would like to send some Information with the advertising data. I have a brightness sensor wired up to the Pi that simply returns <code>true</code> if a certain threshold of brightness has been exceeded. </p>
  
  <p>My idea is to use the Minor identifier and use <code>1</code> to represent "it is bright" and <code>0</code>to represent "it is dark". My app can then interpret this without having to poll the Pi via a network request what the current sensor status is.</p>
  
  <p>But since I set the advertisement package statically, I won't be able to use this approach going forward I believe. </p>
  
  <p>I have no idea how else to do this however, so I was hoping someone might have some insight and could point me in the right direction.</p>
  
  <p>Thanks for your time!</p>