This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

pc-ble-driver API and compiled dynamic / static libraries

Hi,

I am developing central device application which shall run on Win7 PC + nRF52840 dongle / equivalent nRF52840 DK

I intend to develop in C# / C++ and call PC-BLE-driver lib without python / JS binding.

Is there an instructions or APIs list?

Is there a compiled dynamic / static libs which can be downloaded instead of compiling from source files?

BTW:

I was able to program connectivity FW using nrfjprog on nRF52840 DK (PCA10056) but not on nRF52840 dongle (PCA10059) due to different CDC drivers (PCA10056- Segger's "Jlink CDC UART Port" vs. PCA10059- "nRF Connect USB CDC ACM")

What is the difference between those drivers?

Thanks in advance

Parents Reply Children
  • Due to the fact that nRF52840 dongle is only DK and can't be used as commercial product and I don't want to design and manufacture my own dongle

    Can I use OEM usb dongle i.e. commercial usb dongle which includes Nordic's nRF52840 with pc-ble-driver

    Can I program connectivity FW on it with nrfjprog?

  • Does somebody use pc-ble-driver without js/py binding on windows environment and can share his/her experience?

    I intend to use c/c++/c# for the application with Visual studio. I try to build VS project from the hr collector example and it seems that VS has a few unresolved symbols despite I add the precompiled pc-ble-driver lib files to project 

    <Link>
          <GenerateDebugInformation>true</GenerateDebugInformation>
          <EnableCOMDATFolding>true</EnableCOMDATFolding>
          <OptimizeReferences>true</OptimizeReferences>
          <AdditionalLibraryDirectories>C:\Users\yes\Desktop\BLE\artifacts\windows64;C:\Users\yes\Desktop\BLE\artifacts\windows32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
          <ShowProgress>LinkVerbose</ShowProgress>
          <AdditionalDependencies>pc_ble_driver_shared_sd_api_v2.lib;pc_ble_driver_static_sd_api_v2.lib;%(AdditionalDependencies)</AdditionalDependencies>
        </Link>

    Thanks in advance

    Below is my full VS project file

    <?xml version="1.0" encoding="utf-8"?>
    <Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
      <ItemGroup Label="ProjectConfigurations">
        <ProjectConfiguration Include="Debug|Win32">
          <Configuration>Debug</Configuration>
          <Platform>Win32</Platform>
        </ProjectConfiguration>
        <ProjectConfiguration Include="Release|Win32">
          <Configuration>Release</Configuration>
          <Platform>Win32</Platform>
        </ProjectConfiguration>
      </ItemGroup>
      <PropertyGroup Label="Globals">
        <ProjectGuid>{29F0A9F6-691E-443D-948F-115C047285CF}</ProjectGuid>
        <RootNamespace>BLEscanner</RootNamespace>
      </PropertyGroup>
      <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
        <ConfigurationType>Application</ConfigurationType>
        <UseDebugLibraries>true</UseDebugLibraries>
        <PlatformToolset>v110</PlatformToolset>
        <CharacterSet>MultiByte</CharacterSet>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
        <ConfigurationType>Application</ConfigurationType>
        <UseDebugLibraries>false</UseDebugLibraries>
        <PlatformToolset>v120</PlatformToolset>
        <WholeProgramOptimization>true</WholeProgramOptimization>
        <CharacterSet>MultiByte</CharacterSet>
      </PropertyGroup>
      <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
      <ImportGroup Label="ExtensionSettings">
      </ImportGroup>
      <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
        <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
      </ImportGroup>
      <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
        <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
      </ImportGroup>
      <PropertyGroup Label="UserMacros" />
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
        <LibraryPath>C:\Users\yes\Desktop\BLE\artifacts\windows32;$(LibraryPath)</LibraryPath>
        <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);c:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\include\common\sdk_compat;C:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers;C:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\include\common</IncludePath>
      </PropertyGroup>
      <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
        <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath);c:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\include\common\sdk_compat;C:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers;C:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\include\common</IncludePath>
      </PropertyGroup>
      <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
        <ClCompile>
          <WarningLevel>Level3</WarningLevel>
          <Optimization>Disabled</Optimization>
          <SDLCheck>true</SDLCheck>
          <AdditionalIncludeDirectories>C:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\include\common\sdk_compat;C:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers;C:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\include\common</AdditionalIncludeDirectories>
          <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
          <PrecompiledHeader>Use</PrecompiledHeader>
        </ClCompile>
        <Link>
          <GenerateDebugInformation>true</GenerateDebugInformation>
          <AdditionalLibraryDirectories>C:\Users\yes\Desktop\BLE\artifacts\windows64;C:\Users\yes\Desktop\BLE\artifacts\windows32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
          <ShowProgress>LinkVerbose</ShowProgress>
          <AdditionalDependencies>pc_ble_driver_shared_sd_api_v3.lib;pc_ble_driver_static_sd_api_v3.lib;%(AdditionalDependencies)</AdditionalDependencies>
        </Link>
        <ProjectReference>
          <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>
        </ProjectReference>
      </ItemDefinitionGroup>
      <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
        <ClCompile>
          <WarningLevel>Level3</WarningLevel>
          <Optimization>MaxSpeed</Optimization>
          <FunctionLevelLinking>true</FunctionLevelLinking>
          <IntrinsicFunctions>true</IntrinsicFunctions>
          <SDLCheck>true</SDLCheck>
          <AdditionalIncludeDirectories>C:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\include\common\sdk_compat;C:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers;C:\Users\yes\Desktop\BLE\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\include\common</AdditionalIncludeDirectories>
          <PreprocessorDefinitions>_MBCS;%(PreprocessorDefinitions);_CRT_SECURE_NO_WARNINGS</PreprocessorDefinitions>
          <PrecompiledHeader>Use</PrecompiledHeader>
        </ClCompile>
        <Link>
          <GenerateDebugInformation>true</GenerateDebugInformation>
          <EnableCOMDATFolding>true</EnableCOMDATFolding>
          <OptimizeReferences>true</OptimizeReferences>
          <AdditionalLibraryDirectories>C:\Users\yes\Desktop\BLE\artifacts\windows64;C:\Users\yes\Desktop\BLE\artifacts\windows32;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
          <ShowProgress>LinkVerbose</ShowProgress>
          <AdditionalDependencies>pc_ble_driver_shared_sd_api_v2.lib;pc_ble_driver_static_sd_api_v2.lib;%(AdditionalDependencies)</AdditionalDependencies>
        </Link>
        <ProjectReference>
          <UseLibraryDependencyInputs>true</UseLibraryDependencyInputs>
        </ProjectReference>
      </ItemDefinitionGroup>
      <ItemGroup>
        <ClCompile Include="..\..\src\main.c" />
      </ItemGroup>
      <ItemGroup>
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\ble.h" />
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\ble_err.h" />
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\ble_gap.h" />
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\ble_gatt.h" />
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\ble_gattc.h" />
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\ble_gatts.h" />
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\ble_hci.h" />
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\ble_l2cap.h" />
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\ble_ranges.h" />
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\ble_types.h" />
        <ClInclude Include="..\..\..\pc-ble-driver-2.3.2\pc-ble-driver-2.3.2\src\sd_api_v3\sdk\components\softdevice\s132\headers\nrf_error.h" />
      </ItemGroup>
      <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
      <ImportGroup Label="ExtensionTargets">
      </ImportGroup>
    </Project>

  • This will depend on the Dongle. You will have to check with the manufacturer.

  • What is required from the dongle for using it with pc-ble-driver library i.e. what is required for programming connectivity FW on it if I the interface is USB and probably can't use FOTA?

  • Our Dongle use serial DFU solution for updating firmware. I do not know what commercial alternatives will support. The pc-ble-driver library requires a UART connection. This can be achieved using CDC ACM over USB.

Related