Skip to content

baddinosaur-kyle/Laerdal.Dfu

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laerdal.Dfu

This is an Xamarin binding library for the Nordic Semiconductors Android library for updating the firmware of their devices over the air via Bluetooth Low Energy.

The Java library is located here: https://github.com/NordicSemiconductor/Android-DFU-Library

The native iOS Pod library is located here: https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library

Build status

NuGet Badge

Requirements

You'll need :

  • MacOS
    • with XCode
    • with Xamarin.iOS
    • with gradle
    • with Xamarin.Android
    • [with ObjectiveSharpie] (optional)
brew cask install objectivesharpie

More about Objective Sharpie

Steps to build on Local-Dev

1) Checkout

git clone https://github.com/Laerdal/Laerdal.Dfu.git

2) Comment out in the .csproj files any mention of Git-related properties

3) Set the MSBuild version to 15.0 in Rider's settings (MSBuild 17.0+ won't build)

4) Run build script

There are 2 sources for the iOS package : via building the release code or using the CocoaPods.

To build the nuget via building the source code, run :

./build.sh -v

You'll find the nuget in Laerdal.Dfu.Output/

Known issues

Fix : Laerdal/Laerdal.Dfu.iOS#3 (comment) |

#!/usr/bin/env sh
xcode_lib_path="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphoneos"
app_path=$1
app_name=<insert app name>
libs=("$app_path/Products/Applications/$app_name/Frameworks/"*.dylib)

for i in "${libs[@]}"
do
  cp "$xcode_lib_path/$(basename "$i")" "$app_path/SwiftSupport/iphoneos/"
  cp "$xcode_lib_path/$(basename "$i")" "$app_path/Products/Applications/$app_name/Frameworks/"
done

-- Thanks @OliverFlecke

Fix : You might need to add "--optimize=-remove-dynamic-registrar" to your apps mtouch args.

About

Xamarin binding library around @NordicSemiconductor's DFU library.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 97.4%
  • Shell 2.6%