1. 29 Jan, 2018 1 commit
  2. 17 Oct, 2017 4 commits
  3. 15 Aug, 2017 1 commit
  4. 31 Jul, 2017 1 commit
  5. 28 Jan, 2017 1 commit
    • moogle's avatar
      Replace hci.Stop() with hci.Close() · 4187da02
      moogle authored
      Stop() and Close() were used for the same thing
      so now the Stop() is gone and Close() will be used
      to stop/close hci.
      4187da02
  6. 14 Jan, 2017 1 commit
  7. 26 Sep, 2016 1 commit
    • Tzu-Jung Lee's avatar
      gatt: add ble.Client.Disconnected() <-chan struct{} · 0df5af5e
      Tzu-Jung Lee authored
      Since we've turned most of the GATT level API synchronous, the only
      asynchronous event is disconnected by remote peripheral, or the signal
      breaks up.
      
        // Disconnected returns a channel, which is closed when the client
        // disconnects.
        ble.Client.Disconnected() <-chan struct {}
      
      issue #14
      0df5af5e
  8. 01 Sep, 2016 1 commit
    • Tzu-Jung Lee's avatar
      update a few things · a80141fb
      Tzu-Jung Lee authored
      1. Introduce ble.Device interface, so we can mock it,
         and have other platform independent implmentation such
         as grpc-based one.
      
      2. Promote GATT stuff from ble/examples/lib/gatt to ble/
      
      3. Make API more synchronous:
      
        a. Remove StopAdvertising, StopScanning, ..
        b. Add context.Context in Scanning, AdvertiseXX API.
      
        So,  user can easily have a blocking advertising/scanning with
        optionally set timeout.
      
      4. Update current examples accordingly, and move them to
         lib/examples/basic/
      a80141fb
  9. 16 Aug, 2016 1 commit
  10. 11 Aug, 2016 1 commit
  11. 10 Aug, 2016 1 commit
  12. 22 Jul, 2016 1 commit
    • Tzu-Jung Lee's avatar
      hci: fix Advertising Data and Scan Response handling. · fe701591
      Tzu-Jung Lee authored
      AD and SR,if any, are delivered separately via HCI.
      Upon recieving an AD, we'll create an Advertisement and pass it
      to user's AdvHandler. If it's a scannable AD, which means there
      will be a Scan Response coming, we cache this AD, so when the
      SR is recieved, we associate it to the cached Advertisement,
      and pass it to the user.
      
      Normally, user will recieves Advertisement twice, the first one
      has AD only, and the second one has AD and SR.
      fe701591
  13. 20 Jul, 2016 1 commit
    • Tzu-Jung Lee's avatar
      linux: remove state machine handling out of hci. · c15a5369
      Tzu-Jung Lee authored
      A controller may have more than one instance of state machine to
      handle multiple concurrent connections. It's hard to maintain
      another state machine in the hci package, and try to keep it
      sync'ed with the controller's state.
      
      When a controller accepts a connection, it moves from advertising
      state back to idle/ready state. The host has to explicitly enable
      it to advertise again.
      
      In the 4.0 spec, where there is only ne connection at a time,
      this is plain simple; always re-enable advertising when the
      conecction disconnects.
      
      Things get much more complicated when it comes to supporting
      multiple connections. First of all, there's no way for the host to
      query how many connections the controller support.  What the host
      can do is to re-enable the advertising right after it accepts a
      connection. However, when the number of connecetions reaches to the
      limit of the controller, different controller may have different
      implementation/behaviour.
      
      One controller may return "command success" while it doesn't really
      re-enable advertising on the spot, but waits until the number of
      connections drops. Other controllers may return "command disallowed"
      and expect you to retry later, and the host would need to re-eanable
      advertising when a connection disconects.
      
      Given that we can't
      
        * learn how many connections a controller supports,
        * query if the controller is really advertising or not
        * different controllers may have different implementations
      
      the best we can do in the low-level package is probably to make it
      transparent to the users, passing errors with more context.
      
      Users should learn the capability of the controller from the vendor,
      datasheet, or product description. And figure out which case is the
      controller when it reaches to its maximum concurrent connection, and
      handle it accordingly - retry at the disconnect event or not.
      c15a5369
  14. 05 Jul, 2016 1 commit
    • Tzu-Jung Lee's avatar
      design: remove Server and Device · 6bed9e8d
      Tzu-Jung Lee authored
      These are not used in the OS X implementation.
      Not much meanning to keep them in the ble package, which supposed
      to be common or shared between platforms.
      
      examples/lib/gatt packages now can move on using linux/hci and
      linux/gatt packages directly. This frees us more freedom to implement
      linux-specific functions.
      6bed9e8d
  15. 01 Jul, 2016 1 commit
  16. 30 Jun, 2016 1 commit
  17. 28 Jun, 2016 2 commits
  18. 27 Jun, 2016 1 commit
  19. 23 Jun, 2016 2 commits
  20. 26 May, 2016 1 commit
    • Tzu-Jung Lee's avatar
      adv: rework adverisement · 87f246c4
      Tzu-Jung Lee authored
      1. Quick hack to make bt.Advertisement interface, have HCI implement it.
         Currently, it's too HCI-specific. So let's separate the interface and
         ipmlementation first. Later on, removed HCI-specific details from the
         interface, and keep the in the HCI implementation.
      
      2. Associate the Scan Response to the Advertising Data.
      87f246c4
  21. 19 May, 2016 2 commits
  22. 05 May, 2016 1 commit
  23. 02 May, 2016 1 commit
  24. 01 May, 2016 2 commits
  25. 30 Apr, 2016 2 commits
  26. 29 Apr, 2016 1 commit
  27. 28 Apr, 2016 3 commits
  28. 27 Apr, 2016 2 commits
  29. 20 Apr, 2016 1 commit