Neosmartpen.Net 2.1.153

dotnet add package Neosmartpen.Net --version 2.1.153
NuGet\Install-Package Neosmartpen.Net -Version 2.1.153
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Neosmartpen.Net" Version="2.1.153" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Neosmartpen.Net --version 2.1.153
#r "nuget: Neosmartpen.Net, 2.1.153"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Neosmartpen.Net as a Cake Addin
#addin nuget:?package=Neosmartpen.Net&version=2.1.153

// Install Neosmartpen.Net as a Cake Tool
#tool nuget:?package=Neosmartpen.Net&version=2.1.153

Neo smartpen SDK for Windows Universal Platform(UWP)

Universal Windows Platform(UWP) SDK 2.0

UWP SDK for Windows 10. This library allows you to integrate the Neo smartpen into your app.

About Neo smartpen

The Neo smartpen is designed to seamlessly integrate the real and digital worlds by transforming what you write on paper - everything from sketches and designs to business meeting notes - to your iOS, Android and Windows devices. It works in tandem with N notebooks, powered by NeoLAB Convergence’s patented Ncode™ technology and the accompanying application, Neo Notes. Find out more at www.neosmartpen.com

About Ncode™: service development guide

‘Natural Handwriting’ technology based on Ncode™(Microscopic data patterns containing various types of data) is a handwriting stroke recovery technology that digitizes paper coordinates obtained by optical pen devices such as Neo smartpen. The coordinates then can be used to store handwriting stroke information, analyzed to extract meaning based on user preferences and serve as the basis for many other types of services.

Click the link below to view a beginners guide to Ncode technology. https://github.com/NeoSmartpen/Documentations/blob/master/Ncode™ Service Development Getting Started Guide v1.01.pdf

Requirements

  • Visual Studio 2017
  • Install the Universal Windows Platform tools provided by Microsoft
  • Min version [10.0; build 15063]
  • Need to MarkerMrtro.Unity.Ionic.Zlib library (Nuget Package)
  • Standard Bluetooth Dongles ( Bluetooth Specification Version 4.0 or later with Microsoft Bluetooth stack )

Dependencies

  • MarkerMrtro.Unity.Ionic.Zlib

Supported models

  • All models of Neo smartpen

Getting Started with Sample App

At first, download the zip file containing the current version. You can unzip the archive and open NeosmartpenSDK_UWP.sln in Visual Studio 2017.

download

Using SDK library

Just install Neosmartpen.Net package in the Nuget

Install-Package Neosmartpen.Net

Let's getting started using the API

Api References

SDK API references page : References

Sample Code

Notice

SDK handle data and commucation with peer device in other thread. So if you want data get from pen to appear in UI, than you have to execute in UI thread.

Create GenericBluetoothPenClient and PenController instance
// create PenController instance.
// PenController control all pen event method
var controller = new PenController();

// Create GenericBluetoothPenClient instance. and bind PenController.
// GenericBluetoothPenClient is implementation of bluetooth function.
var client = new GenericBluetoothPenClient(controller);
Find Bluetooth Devices

You can find bluetooth device using below methods. And get PenInformation object that has bluetooth device information.

Find device
List<PenInformation> penList = await client.FindDevices();
Using LE Advertisement Watcher
// bluetooth watcher event
client.onStopSearch += onStopSearch;
client.onUpdatePenController += onUpdatePenController;
client.onAddPenController += onAddPenController;

// start watcher
client.StartLEAdvertisementWatcher();

// Event that is called when a device is added by the watcher
private void onAddPenController(IPenClient sender, PenInformation args)
{
}

// Event that is called when a device is updated
private void onUpdatePenController(IPenClient sender, PenUpdateInformation args)
{
}

// Event that is called when the watcher operation has been stopped
private void onStopSearch(IPenClient sender, Windows.Devices.Bluetooth.BluetoothError args)
{
}
Connect with device
// penInfomation is PenInformation class object what can be obtained from find device method
bool result = await client.Connect(penInfomation);
After Connection is established.
// add event in init method
controller.Connected += connected;
controller.PasswordRequested += passwordRequested;
controller.Authenticated += authenticated;

// It is called when connection is established ( You cannot use function on your device without authentication )
private void connected(IPenClient sender, ConnectedEventArgs args)
{
	System.Diagnostics.Debug.WriteLine(String.Format("Mac : {0}\r\n\r\nName : {1}\r\n\r\nSubName : {2}\r\n\r\nFirmware Version : {3}\r\n\r\nProtocol Version : {4}", args.MacAddress, args.DeviceName, args.SubName, args.FirmwareVersion, args.ProtocolVersion));
}

// If your device is locked, it is called to input password.
private void passwordRequested(IPenClient sender, PasswordRequestedEventArgs args)
{
	System.Diagnostics.Debug.WriteLine($"Retry Count : {args.RetryCount}, ResetCount :  {args.ResetCount }");
    _controller.InputPassword(password);
}

// If your pen is not locked, or authentication is passed, it will be called.
// When it is called, You can use all function on your device.
private void authenticated(IPenClient sender, object args)
{
}
Handling a handwriting data from peer device
// add event in init method
controller.DotReceived += dotReceived;

// Identifier of note(paper) (it is consist of section and owner, note)
int section = 1;
int owner = 1;
int note = 102;

// Requests to set your note type.
controller.AddAvailableNote(section, owner, note);

// event that is called when writing data is received
private void dotReceived(IPenClient sender, DotReceivedEventArgs args)
{
// TODO : You should implements code using coordinate data.
}
Querying list of offline data in Smartpen's storage
// add event in init method
controller.OfflineDataListReceived += offlineDataListReceived;

// Request offline data list
controller.RequestOfflineDataList();

// Event method to receive offline data list
private void offlineDataListReceived(IPenClient sender, OfflineDataListReceivedEventArgs args)
{
}

Downloading offline data in Smartpen's storage
// add event in init method
controller.OfflineDataDownloadStarted += offlineDataDownloadStarted;
controller.OfflineStrokeReceived += offlineStrokeReceived;
controller.OfflineDownloadFinished += offlineDownloadFinished;

// it is invoked when begins downloading offline data
private void offlineDataDownloadStarted(IPenClient sender, object args)
{
}

// it is invoked when it obtained offline data ( it can be called several times )
private void offlineStrokeReceived(IPenClient sender, OfflineStrokeReceivedEventArgs args)
{
}

// it is invoked when finished downloading
private void offlineDownloadFinished(IPenClient sender, SimpleResultEventArgs args)
{
}

Feel free to leave any comment or feedback here

Product Compatible and additional computed target framework versions.
Universal Windows Platform uap was computed.  uap10.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.1.153 736 3/17/2020
2.1.152 530 1/15/2020
2.1.151 623 3/4/2019
2.1.150 660 2/12/2019
2.1.149 690 1/31/2019
2.1.148 650 1/29/2019
2.1.147 704 1/13/2019
2.1.144 1,003 4/17/2018
2.1.143 946 4/17/2018
2.1.142 931 3/28/2018
2.1.141 1,129 2/5/2018
2.1.140 1,023 2/2/2018
2.1.139 1,089 2/1/2018
2.1.138 1,006 1/25/2018
2.1.137 958 1/25/2018
2.1.136 967 1/22/2018
2.1.135 1,052 1/10/2018
2.1.134 967 1/3/2018
2.1.133 873 12/14/2017
2.1.132 902 11/30/2017
2.1.131 846 11/14/2017
2.1.130 881 11/9/2017
2.1.129 854 11/9/2017
2.1.128 906 11/6/2017
2.1.127 847 11/3/2017
2.1.126 874 11/1/2017
2.1.125 864 10/31/2017
2.1.124 913 9/22/2017
2.1.123 879 9/22/2017
2.1.122 934 8/16/2017
2.1.121 914 8/3/2017
2.1.120 915 6/29/2017
2.1.119 958 6/29/2017
2.1.118 932 6/8/2017
2.1.117 916 6/8/2017
2.1.116 924 6/8/2017
2.1.115 997 1/20/2017
2.1.114 1,049 1/3/2017
2.1.113 992 1/3/2017