1. 05 Feb, 2019 1 commit
  2. 16 Jan, 2019 2 commits
  3. 09 Jan, 2019 2 commits
  4. 08 Jan, 2019 1 commit
  5. 20 Dec, 2018 1 commit
  6. 19 Dec, 2018 2 commits
  7. 18 Dec, 2018 2 commits
  8. 14 Dec, 2018 2 commits
  9. 13 Dec, 2018 1 commit
  10. 12 Dec, 2018 1 commit
    • Ken A. Redergård's avatar
      Consolidate SoftDevice APIs (#176) · 236d10fc
      Ken A. Redergård authored
      * Consolidate SoftDevice API v2, v3, v5 and v6
      We've had feedback from users telling us that it is not easy to
      know what version of pc-ble-driver to use towards a given SoftDevice
      API version.
      We have also experienced that it is time consuming when maintaining
      the pc-ble-driver project to have separate releases of pc-ble-driver for
      different major versions.
      This commit starts a strategy where we release all
      SoftDevice API versions in every release of pc-ble-driver.
      It also reuse parts of the codecs from the nRF5 SDK for SoftDevice
      API v3 and onwards since parts of those are backwards compatible.
      * Port connectivity firmware build script to cmake (#136, ++)
      New build system for connectivity firmware
      The previous way of building the connectivity firmware was a lot of manual steps supported by Windows .bat files and Cygwin/msys bash scripts.
      The new build system has the following changes:
      - uses a directory structure convention to automatically determine what and how to build the connectivity firmware
      - supports Windows, Linux and macOS
      The build system does the following:
      - Downloads nRF5 SDK
      - Applies patches to nRF5 SDK
      - Searches for connectivity firmware projects
      - Compiles connectivity firmware for combinations of SoftDevice API version, nRF family and transports (usb, 115k2, 1m)
      - Merges connectivity with SoftDevice (by invoking mergehex)
      - Creates DFU packages where relevant (by invoking nrfutil)
      * Replace boost::asio with ASIO and remove boost dependency (#131)
      The boost library is large and only the serial port
      part is used. This commit removes the boost
      dependency by using ASIO instead of pulling
      in large portions of the boost library.
      * Add custom SD RPC error codes (#146)
      Previously NRF_ERROR_INTERNAL was returned for all errors.
      Adding a custom range of error codes for SD RPC errors makes it easier to triage bugs.
      This is a breaking change to the API since NRF_ERROR_INTERNAL is not returned on SD RPC errors.
      * Add clang tidy and format configuration
      * Remove union name in structs
      SWIG has a bug that when using a named union in a struct,
      see swig/swig#1305.
      * Automatically setup and run integration tests (#134)
      This adds the ability to run the integration tests
      automatically with the use of CMake targets.
      The CMake targets program the development kits with the correct
      connectivity firmware and then runs the relevant tests
      for the development kit type and SoftDevice API version.
      * Upgrade connectivity to nRF5 SDK 15.2 (#149, ++)
      * Add non-standard baud-rates on macOS (#152)
      * Add support for 64-bit architecture on app side
      Bug fixes:
      * Fix nRF52840 open close reset issue (#162)
      * Fix bugs in GAP state when using two or more BLE adapters:
       - BLE security keys are overwritten
       - Advertisement data received are blocked (SDv6)
       - Invoking a different adapter in another adapter's callback make encoding/decoding confused
      * Fix/SEGGER J-Link-OB hardware flow control detection (#172)
      * Fix deadlock issue that may happen if open/close is called successively
      * Fix segfault on reception of ACK packet
      * Handle packets states without exit criteria (#144)
  11. 29 Oct, 2018 2 commits
  12. 07 Aug, 2018 1 commit
  13. 06 Aug, 2018 1 commit
  14. 20 Jul, 2018 1 commit
  15. 19 Jul, 2018 1 commit
    • Ken A. Redergård's avatar
      Fix GH issue #112 Writing more than 20 bytes to peripheral crashes driver (#126) · 71b620ed
      Ken A. Redergård authored
      When writing more than 20 bytes to a connected peripheral the connectivity firmware crash.
      The issue is in the serialization codecs and is fixed in nRF5 SDK version 15 (SDKv15).
      The fix requires the codecs for the connectivity firmware (connfw) to be updated.
      To make this maintainable we align connfw for SoftDevice API v3 and v5 on SDKv15.
      The build scripts and patch files are changed to make this happen.
      The codecs on PC side is updated with codecs from SDKv15 since the codecs need to match the ones in connfw.
      A test is implemented to verify that the issue is resolved.
      Issues related to initialization of the H5Transport class and handling of unknown packets and state was discovered during fixing this issue.
      This commit address these issues and reported linting issues in files affected.
  16. 16 Jul, 2018 1 commit
    • Ken A. Redergård's avatar
      Reduce boiler-plate code in tests (#125) · f0542c4e
      Ken A. Redergård authored
      * Reduce boiler-plate code in tests
      There is a lot of boiler-plate coded needed when writing tests.
      This commit reduces the boiler plate code by introducing a wrapper around adapter_t.
      Improved conversion from structs/enums to text are added.
      Tests are updated to use these improvements.
      Files affected by the change has been linted.
      The tests are now built for all supported SoftDevice API versions making it easier to detect if the tests are working for the versions supported.
  17. 11 Jul, 2018 4 commits
    • Ken A. Redergård's avatar
      Move reusable test functionality into separate file (#119) · 15a5e753
      Ken A. Redergård authored
      The baud rate and ble_address_to_string_convert is reusable across different tests. Moving functionality to use default platform baudrate and converting BLE address to a header file where it can be reused.
    • mathiasap's avatar
      Free memory used by exitCriterias (#117) · b4bd96d4
      mathiasap authored
      * Delete exitCriterias objects on h5_transport deconstruct
      * Using unique pointers for exit criterias
    • Ken A. Redergård's avatar
      Support compilation with VS 15 2017 (#118) · 46876ba8
      Ken A. Redergård authored
      Compiling pc-ble-driver with Visual Studio 15 2017 was not possible:
      * The  Microsoft proprietary std::_USE is not defined anymore.
      In VS 15 2017 the C++ Standard Libraryi std::use_facet shall be used.
      There was UTF-8 encoding problem in stdstring.h comments. This is now fixed.
    • Ken A. Redergård's avatar
      Fix H5Transport timeout issues (#116) · 807d64ed
      Ken A. Redergård authored
      * Fix H5Transport timeout issues
      This commit addresses timeout issues that sometimes occur when calling sd_rpc_open.
      The problem is identified to be in the transport layers.
      The issue is addressed by:
          - Improving the state machine in H5Transport and improving UartBoost implementation
          - Requiring latest version of Boost (1.67). This to make sure all fixes in Boost ASIO serialport are included.
      State machine
      The H5Transport is now waiting for the internal state machine to be ready before opening the serial port that sets state machine values.
      The state machine transitions cover more exit criterias and the order of evaluating the exit criterias are improved.
      Two new states are added: STATE_CLOSED and STATE_NO_RESPONSE. 
      The state machine enters STATE_CLOSED when the user close the transport.
      The state machine enters STATE_NO_RESPONSE when the device does not reply on packets sent after n number of retries.
      The new states are used to give a more precise return value from sd_rpc_open.
      toString methods on ExitCriterias based classes are added to simplify
      Integrations tests
      Integration tests for open close functionality has been added for pc-ble-driver, H5Transport and UartBoost.
      The integration tests are implemented with the use of Catch2, a header file library test framework.
      Initially Boost Test Library was used, but since we are considering moving away from Boost, we try not to add more Boost dependencies.
      The old test that tested the Boost serial port implementation is removed.
      Build system
      The Boost library file names made by jam (boost build system) has changed for Windows builds.
      For cmake to find the libraries one need to use a recent version of cmake.
      We have tested it with cmake 3.11 and set it as a requirement.
      Other changes
      * General changes to the source code:
          - Added const-ness where applicable
          - Where applicable, changed pointers to type pointed to or *_ptr
          - Made payload into an alias (from std::vector<uint8_t>)
          - Expose methods and functions to facilitate integration testing
          - Typedefs changes to using
          - Changed callback names to make it clearer if callback was intended for local transport or upper transport
      Branch workflow
      We are now changing the pc-ble-driver git workflow.
      Fixes and improvements that are relevant for all major versions of the driver are fixed in master then cherry picked into the major version branches.
      To get to this state, this commit contains cherry picked commits from different branches.
      Here is a table of cherry picked commits:
      Uart boost fixes:
      H5Transport fixes:
      Spurious wakeup fixes and state machine fixes:
  18. 18 May, 2018 2 commits
  19. 09 Apr, 2018 3 commits
  20. 12 Mar, 2018 1 commit
  21. 11 Mar, 2018 1 commit
  22. 14 Feb, 2018 3 commits
  23. 09 Feb, 2018 1 commit
  24. 08 Feb, 2018 1 commit
  25. 18 Jan, 2018 1 commit
  26. 16 Jan, 2018 1 commit