├── .gitignore
├── API Docs
├── ConfigDocs
├── MacDoc.png
├── MakeDocs
├── Monkey.Robotics.tree
├── Monkey.Robotics.zip
├── Robotics-docs.source
├── Robotics.Messaging
│ ├── Command.xml
│ ├── CommandFunc.xml
│ ├── ControlClient.xml
│ ├── ControlOp.xml
│ ├── ControlServer.xml
│ ├── Message.xml
│ ├── Variable.xml
│ └── VariableChangedAction.xml
├── Robotics.Micro.Devices
│ ├── AnalogInputPin.xml
│ ├── DigitalInputPin.xml
│ ├── DigitalOutputPin.xml
│ └── PwmOutputPin.xml
├── Robotics.Micro.Generators
│ ├── Constant.xml
│ ├── Generator.xml
│ ├── IPwm.xml
│ ├── SineWave.xml
│ └── SoftPwm.xml
├── Robotics.Micro.Motors
│ ├── AdafruitDCMotor.xml
│ ├── AdafruitMotorShield.xml
│ ├── HBridgeMotor.xml
│ └── IDCMotor.xml
├── Robotics.Micro.Sensors.Buttons
│ ├── IButton.xml
│ └── PushButton.xml
├── Robotics.Micro.Sensors.Light
│ └── GenericAmbientLightSensor.xml
├── Robotics.Micro.Sensors.Location
│ ├── Bmp085.xml
│ └── Grove3AxisDigitalCompass.xml
├── Robotics.Micro.Sensors.Motion
│ ├── IAccelerometer.xml
│ └── Memsic2125.xml
├── Robotics.Micro.Sensors.Proximity
│ ├── IRangeFinder.xml
│ └── SharpGP2D12.xml
├── Robotics.Micro.Sensors.Temperature
│ └── Thermistor.xml
├── Robotics.Micro.SpecializedBlocks
│ ├── CelsiusToFahrenheit.xml
│ ├── DutyCycleMeter.xml
│ ├── I2CBlock.xml
│ ├── LookupTable.xml
│ ├── PollingBlock.xml
│ ├── PollingI2CBlock.xml
│ ├── Switch.xml
│ ├── Transform.xml
│ └── TransformFunction.xml
├── Robotics.Micro
│ ├── BlockBase.xml
│ ├── ConfigPort.xml
│ ├── Connection.xml
│ ├── DebugScope.xml
│ ├── IBlock.xml
│ ├── IScope.xml
│ ├── InputPort.xml
│ ├── OutputPort.xml
│ ├── Port.xml
│ ├── Units.xml
│ └── UnitsEx.xml
├── Robotics.Mobile.Core.Bluetooth.LE
│ ├── BluetoothKnownItemManager.xml
│ ├── CharacteristicPropertyType.xml
│ ├── CharacteristicReadEventArgs.xml
│ ├── DeviceBase.xml
│ ├── DeviceConnectionEventArgs.xml
│ ├── DeviceDiscoveredEventArgs.xml
│ ├── DeviceState.xml
│ ├── Extensions.xml
│ ├── IAdapter.xml
│ ├── ICharacteristic.xml
│ ├── IDescriptor.xml
│ ├── IDevice.xml
│ ├── IService.xml
│ ├── KnownCharacteristic.xml
│ ├── KnownCharacteristics.xml
│ ├── KnownDescriptor.xml
│ ├── KnownDescriptors.xml
│ ├── KnownService.xml
│ ├── KnownServices.xml
│ ├── LEStream.xml
│ └── ServicesDiscoveredEventArgs.xml
├── Robotics.Mobile.Core.Utils
│ └── ResourceLoader.xml
├── Xamarin.Labs.Robotics.source
├── Xamarin.Labs.Robotics.tree
├── Xamarin.Labs.Robotics.zip
├── index.xml
├── ns-Robotics.Messaging.xml
├── ns-Robotics.Micro.Devices.xml
├── ns-Robotics.Micro.Generators.xml
├── ns-Robotics.Micro.Motors.xml
├── ns-Robotics.Micro.Sensors.Buttons.xml
├── ns-Robotics.Micro.Sensors.Light.xml
├── ns-Robotics.Micro.Sensors.Location.xml
├── ns-Robotics.Micro.Sensors.Motion.xml
├── ns-Robotics.Micro.Sensors.Proximity.xml
├── ns-Robotics.Micro.Sensors.Temperature.xml
├── ns-Robotics.Micro.SpecializedBlocks.xml
├── ns-Robotics.Micro.xml
├── ns-Robotics.Mobile.Core.Bluetooth.LE.xml
├── ns-Robotics.Mobile.Core.Utils.xml
└── readme.md
├── Images
├── Architectural_Overview.png
├── Architectural_Overview.pxm
└── Platform_Stack_Topography.png
├── LICENSE
├── README.md
├── Sample Apps
├── BLE Explorer old
│ ├── BLE Explorer.sln
│ ├── Robotics.Mobile.BtLEExplorer.Core
│ │ ├── App.cs
│ │ ├── Extensions
│ │ │ ├── EmptyStringConverter.cs
│ │ │ └── GuidConverter.cs
│ │ ├── Pages
│ │ │ ├── CharacteristicDetail.xaml
│ │ │ ├── CharacteristicDetail.xaml.cs
│ │ │ ├── CharacteristicDetail_TISensor.xaml
│ │ │ ├── CharacteristicDetail_TISensor.xaml.cs
│ │ │ ├── CharacteristicDetail_TISwitch.xaml
│ │ │ ├── CharacteristicDetail_TISwitch.xaml.cs
│ │ │ ├── CharacteristicList.xaml
│ │ │ ├── CharacteristicList.xaml.cs
│ │ │ ├── DeviceList.xaml
│ │ │ ├── DeviceList.xaml.cs
│ │ │ ├── ServiceList.xaml
│ │ │ └── ServiceList.xaml.cs
│ │ ├── Properties
│ │ │ └── AssemblyInfo.cs
│ │ ├── Robotics.Mobile.BtLEExplorer.Core.csproj
│ │ └── packages.config
│ ├── Robotics.Mobile.BtLEExplorer.Droid
│ │ ├── Assets
│ │ │ └── AboutAssets.txt
│ │ ├── MainActivity.cs
│ │ ├── Properties
│ │ │ ├── AndroidManifest.xml
│ │ │ └── AssemblyInfo.cs
│ │ ├── Resources
│ │ │ ├── AboutResources.txt
│ │ │ ├── drawable-xhdpi
│ │ │ │ └── Icon.png
│ │ │ ├── drawable-xxhdpi
│ │ │ │ └── Icon.png
│ │ │ ├── drawable
│ │ │ │ ├── Icon.png
│ │ │ │ ├── bluetooth.png
│ │ │ │ ├── glyphish_29_heart.png
│ │ │ │ └── glyphish_31_circle_x.png
│ │ │ ├── layout
│ │ │ │ └── Main.axml
│ │ │ └── values
│ │ │ │ └── Strings.xml
│ │ ├── Robotics.Mobile.BtLEExplorer.Droid.csproj
│ │ └── packages.config
│ └── Robotics.Mobile.BtLEExplorer.iOS
│ │ ├── AppDelegate.cs
│ │ ├── Entitlements.plist
│ │ ├── Info.plist
│ │ ├── Main.cs
│ │ ├── Resources
│ │ ├── Default-568h@2x.png
│ │ ├── Default@2x.png
│ │ ├── Icon-60@2x.png
│ │ ├── Icon-76.png
│ │ ├── Icon-76@2x.png
│ │ ├── Icon-Small-40.png
│ │ ├── Icon-Small-40@2x.png
│ │ ├── Icon-Small.png
│ │ ├── Icon-Small@2x.png
│ │ ├── bluetooth.png
│ │ ├── bluetooth@2x.png
│ │ ├── glyphish_29_heart.png
│ │ ├── glyphish_31_circle_x.png
│ │ ├── glyphish_31_circle_x@2x.png
│ │ └── iTunesArtwork@2x.png
│ │ ├── Robotics.Mobile.BtLEExplorer.iOS.csproj
│ │ └── packages.config
└── BLE Explorer
│ ├── .vs
│ └── config
│ │ └── applicationhost.config
│ ├── BLEExplorer.Droid
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── BLEExplorer.Droid.csproj
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── AboutResources.txt
│ │ ├── drawable-hdpi
│ │ │ └── icon.png
│ │ ├── drawable-xhdpi
│ │ │ └── icon.png
│ │ ├── drawable-xxhdpi
│ │ │ └── icon.png
│ │ ├── drawable
│ │ │ └── icon.png
│ │ ├── layout
│ │ │ ├── Tabbar.axml
│ │ │ └── Toolbar.axml
│ │ └── values
│ │ │ └── styles.xml
│ └── packages.config
│ ├── BLEExplorer.UWP
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── LockScreenLogo.scale-100.png
│ │ ├── LockScreenLogo.scale-125.png
│ │ ├── LockScreenLogo.scale-150.png
│ │ ├── LockScreenLogo.scale-200.png
│ │ ├── LockScreenLogo.scale-400.png
│ │ ├── SplashScreen.scale-100.png
│ │ ├── SplashScreen.scale-125.png
│ │ ├── SplashScreen.scale-150.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── SplashScreen.scale-400.png
│ │ ├── Square150x150Logo.scale-100.png
│ │ ├── Square150x150Logo.scale-125.png
│ │ ├── Square150x150Logo.scale-150.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square150x150Logo.scale-400.png
│ │ ├── Square44x44Logo.scale-100.png
│ │ ├── Square44x44Logo.scale-125.png
│ │ ├── Square44x44Logo.scale-150.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-400.png
│ │ ├── Square44x44Logo.targetsize-16_altform-unplated.png
│ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── Square44x44Logo.targetsize-256_altform-unplated.png
│ │ ├── Square44x44Logo.targetsize-32_altform-unplated.png
│ │ ├── Square44x44Logo.targetsize-48_altform-unplated.png
│ │ ├── StoreLogo.png
│ │ ├── Wide310x150Logo.scale-100.png
│ │ ├── Wide310x150Logo.scale-125.png
│ │ ├── Wide310x150Logo.scale-150.png
│ │ ├── Wide310x150Logo.scale-200.png
│ │ └── Wide310x150Logo.scale-400.png
│ ├── BLEExplorer.UWP.csproj
│ ├── BLEExplorer.UWP.nuget.targets
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
│ ├── Windows_TemporaryKey.pfx
│ ├── project.json
│ └── project.lock.json
│ ├── BLEExplorer.iOS
│ ├── AppDelegate.cs
│ ├── BLEExplorer.iOS.csproj
│ ├── Entitlements.plist
│ ├── Info.plist
│ ├── Main.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources
│ │ ├── Default-568h@2x.png
│ │ ├── Default-Portrait.png
│ │ ├── Default-Portrait@2x.png
│ │ ├── Default.png
│ │ ├── Default@2x.png
│ │ ├── Icon-60@2x.png
│ │ ├── Icon-60@3x.png
│ │ ├── Icon-76.png
│ │ ├── Icon-76@2x.png
│ │ ├── Icon-Small-40.png
│ │ ├── Icon-Small-40@2x.png
│ │ ├── Icon-Small-40@3x.png
│ │ ├── Icon-Small.png
│ │ ├── Icon-Small@2x.png
│ │ ├── Icon-Small@3x.png
│ │ └── LaunchScreen.storyboard
│ ├── iTunesArtwork
│ ├── iTunesArtwork@2x
│ └── packages.config
│ ├── BLEExplorer.sln
│ └── BLEExplorer
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── BLEExplorer.csproj
│ ├── Extensions
│ ├── EmptyStringConverter.cs
│ └── GuidConverter.cs
│ ├── Pages
│ ├── CharacteristicDetail.xaml
│ ├── CharacteristicDetail.xaml.cs
│ ├── CharacteristicDetail_TISensor.xaml
│ ├── CharacteristicDetail_TISensor.xaml.cs
│ ├── CharacteristicDetail_TISwitch.xaml
│ ├── CharacteristicDetail_TISwitch.xaml.cs
│ ├── CharacteristicList.xaml
│ ├── CharacteristicList.xaml.cs
│ ├── DeviceList.xaml
│ ├── DeviceList.xaml.cs
│ ├── ServiceList.xaml
│ ├── ServiceList.xaml.cs
│ ├── TxRx.xaml
│ └── TxRx.xaml.cs
│ ├── Properties
│ └── AssemblyInfo.cs
│ └── packages.config
└── Source
├── BluetoothLE.sln
├── Monkey.BluetoothLE.Core
├── BLE API Notes.md
├── Bluetooth
│ └── LE
│ │ ├── BluetoothKnownItemManager.cs
│ │ ├── CharacteristicPropertyType.cs
│ │ ├── CharacteristicReadEventArgs.cs
│ │ ├── DeviceBase.cs
│ │ ├── DeviceConnectionEventArgs.cs
│ │ ├── DeviceDiscoveredEventArgs.cs
│ │ ├── DeviceState.cs
│ │ ├── Extensions.cs
│ │ ├── IAdapter.cs
│ │ ├── ICharacteristic.cs
│ │ ├── IDescriptor.cs
│ │ ├── IDevice.cs
│ │ ├── IService.cs
│ │ ├── KnownCharacteristics.cs
│ │ ├── KnownCharacteristics.json
│ │ ├── KnownDescriptors.cs
│ │ ├── KnownDescriptors.json
│ │ ├── KnownServices.cs
│ │ ├── KnownServices.json
│ │ ├── LEStream.cs
│ │ └── ServicesDiscoveredEventArgs.cs
├── Messaging
│ ├── Control.cs
│ ├── ControlClient.cs
│ ├── ControlServer.cs
│ └── Message.cs
├── Monkey.BluetoothLE.Core.csproj
├── Properties
│ └── AssemblyInfo.cs
├── Utils
│ └── ResourceLoader.cs
├── packages.config
└── readme.md
├── Monkey.BluetoothLE.Droid
├── Bluetooth
│ └── LE
│ │ ├── Adapter.cs
│ │ ├── Characteristic.cs
│ │ ├── Descriptor.cs
│ │ ├── Device.cs
│ │ ├── GattCallback.cs
│ │ └── Service.cs
├── Monkey.BluetoothLE.Droid.csproj
└── Resources
│ ├── AboutResources.txt
│ └── values
│ └── Strings.xml
├── Monkey.BluetoothLE.UWP
├── Bluetooth
│ └── LE
│ │ ├── Adapter.cs
│ │ ├── Characteristic.cs
│ │ ├── Descriptor.cs
│ │ ├── Device.cs
│ │ └── Service.cs
├── Monkey.BluetoothLE.UWP.csproj
├── Properties
│ ├── AssemblyInfo.cs
│ └── Robotics.Mobile.Core.UWP.rd.xml
├── project.json
└── project.lock.json
├── Monkey.BluetoothLE.iOS
├── Bluetooth
│ └── LE
│ │ ├── Adapter.cs
│ │ ├── Characteristic.cs
│ │ ├── Descriptor.cs
│ │ ├── Device.cs
│ │ └── Service.cs
├── BluetoothLE
│ └── BluetoothLEManager.cs
├── Monkey.BluetoothLE.iOS.csproj
└── Properties
│ └── AssemblyInfo.cs
└── Readme.md
/.gitignore:
--------------------------------------------------------------------------------
1 | # Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
2 | [Bb]in/
3 | [Oo]bj/
4 |
5 | # mstest test results
6 | TestResults
7 |
8 | # Mac stuff
9 | .DS_Store
10 |
11 | ## Ignore Visual Studio temporary files, build results, and
12 | ## files generated by popular Visual Studio add-ons.
13 |
14 | # User-specific files
15 | *.suo
16 | *.user
17 | *.sln.docstates
18 | *.userprefs
19 |
20 | # Build results
21 | [Dd]ebug/
22 | [Rr]elease/
23 | x64/
24 | *_i.c
25 | *_p.c
26 | *.ilk
27 | *.meta
28 | *.obj
29 | *.pch
30 | *.pdb
31 | *.pgc
32 | *.pgd
33 | *.rsp
34 | *.sbr
35 | *.tlb
36 | *.tli
37 | *.tlh
38 | *.tmp
39 | *.log
40 | *.vspscc
41 | *.vssscc
42 | .builds
43 |
44 | # Visual C++ cache files
45 | ipch/
46 | *.aps
47 | *.ncb
48 | *.opensdf
49 | *.sdf
50 |
51 | # Visual Studio profiler
52 | *.psess
53 | *.vsp
54 | *.vspx
55 |
56 | # Guidance Automation Toolkit
57 | *.gpState
58 |
59 | # ReSharper is a .NET coding add-in
60 | _ReSharper*
61 |
62 | # NCrunch
63 | *.ncrunch*
64 | .*crunch*.local.xml
65 |
66 | # Installshield output folder
67 | [Ee]xpress
68 |
69 | # DocProject is a documentation generator add-in
70 | DocProject/buildhelp/
71 | DocProject/Help/*.HxT
72 | DocProject/Help/*.HxC
73 | DocProject/Help/*.hhc
74 | DocProject/Help/*.hhk
75 | DocProject/Help/*.hhp
76 | DocProject/Help/Html2
77 | DocProject/Help/html
78 |
79 | # Click-Once directory
80 | publish
81 |
82 | # Publish Web Output
83 | *.Publish.xml
84 |
85 | # NuGet Packages Directory
86 | packages
87 |
88 | # Windows Azure Build Output
89 | csx
90 | *.build.csdef
91 |
92 | # Windows Store app package directory
93 | AppPackages/
94 |
95 | # Others
96 | [Bb]in
97 | [Oo]bj
98 | sql
99 | TestResults
100 | [Tt]est[Rr]esult*
101 | *.Cache
102 | ClientBin
103 | [Ss]tyle[Cc]op.*
104 | ~$*
105 | *.dbmdl
106 | Generated_Code #added for RIA/Silverlight projects
107 |
108 | # Backup & report files from converting an old project file to a newer
109 | # Visual Studio version. Backup files are not needed, because we have git ;-)
110 | _UpgradeReport_Files/
111 | Backup*/
112 | UpgradeLog*.XML
113 |
114 | Resource.designer.cs
115 | Source/Platform Stacks/UpgradeLog.htm
116 | Source/Platform Stacks/Robotics.Micro.Core.WindowsIoT/project.lock.json
117 |
--------------------------------------------------------------------------------
/API Docs/ConfigDocs:
--------------------------------------------------------------------------------
1 | #Configuring Robotics docs for first use. You only need to run this once.
2 | sudo cp Robotics-docs.source /Library/Frameworks/Mono.Framework/External/monodoc
3 |
--------------------------------------------------------------------------------
/API Docs/MacDoc.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/API Docs/MacDoc.png
--------------------------------------------------------------------------------
/API Docs/MakeDocs:
--------------------------------------------------------------------------------
1 | # validate the xml
2 | echo "validating the xml"
3 | mdoc validate
4 | #
5 | # assemble the docs into a .tree and .zip file for consumption in the mono doc viewer
6 | echo "asembling docs"
7 | mdoc assemble -o Monkey.Robotics .
8 | #
9 | # copy the docs over to the monodoc directory.
10 | echo "copying the docs to the monodoc directory"
11 | sudo cp Monkey.Robotics.{tree,zip} /Library/Frameworks/Mono.framework/External/monodoc/
12 |
--------------------------------------------------------------------------------
/API Docs/Monkey.Robotics.tree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/API Docs/Monkey.Robotics.tree
--------------------------------------------------------------------------------
/API Docs/Monkey.Robotics.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/API Docs/Monkey.Robotics.zip
--------------------------------------------------------------------------------
/API Docs/Robotics-docs.source:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Messaging/Command.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 | 1.0.5384.14133
8 |
9 |
10 | System.Object
11 |
12 |
13 |
14 | To be added.
15 | To be added.
16 |
17 |
18 |
19 |
20 |
21 | Constructor
22 |
23 | 1.0.0.0
24 | 1.0.5384.14133
25 |
26 |
27 |
28 | To be added.
29 | To be added.
30 |
31 |
32 |
33 |
34 |
35 | Property
36 |
37 | 1.0.0.0
38 | 1.0.5384.14133
39 |
40 |
41 | System.Int32
42 |
43 |
44 | To be added.
45 | To be added.
46 | To be added.
47 |
48 |
49 |
50 |
51 |
52 | Property
53 |
54 | 1.0.0.0
55 | 1.0.5384.14133
56 |
57 |
58 | System.String
59 |
60 |
61 | To be added.
62 | To be added.
63 | To be added.
64 |
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Messaging/CommandFunc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 | 1.0.5384.14133
8 |
9 |
10 | System.Delegate
11 |
12 |
13 |
14 | System.Object
15 |
16 |
17 | To be added.
18 | To be added.
19 | To be added.
20 |
21 |
22 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Messaging/VariableChangedAction.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 | 1.0.5384.14133
8 |
9 |
10 | System.Delegate
11 |
12 |
13 |
14 |
15 |
16 | System.Void
17 |
18 |
19 | To be added.
20 | To be added.
21 | To be added.
22 |
23 |
24 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro.Devices/DigitalInputPin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 | Robotics.Micro.BlockBase
10 |
11 |
12 |
13 | Represents a Digital Input Pin on a microcontroller. Digital inputs can be 0 (low) and 1 (high).
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.0.0
23 |
24 |
25 |
26 |
27 |
28 |
29 | The pin to bind to this input.
30 | To be added.
31 | To be added.
32 | To be added.
33 |
34 |
35 |
36 |
37 |
38 | Property
39 |
40 | 1.0.0.0
41 |
42 |
43 | Robotics.Micro.Port
44 |
45 |
46 | To be added.
47 | To be added.
48 | To be added.
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro.Devices/DigitalOutputPin.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 | Robotics.Micro.BlockBase
10 |
11 |
12 |
13 | Represents a digital output pin on the MicroController board. A digital output pin can be written to with a value of 0 (low) or 1 (high).
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.0.0
23 |
24 |
25 |
26 |
27 |
28 |
29 | The pin to bind to this output.
30 | To be added.
31 | To be added.
32 | To be added.
33 |
34 |
35 |
36 |
37 |
38 | Property
39 |
40 | 1.0.0.0
41 |
42 |
43 | Robotics.Micro.InputPort
44 |
45 |
46 | To be added.
47 | To be added.
48 | To be added.
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro.Generators/Constant.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 | Robotics.Micro.BlockBase
10 |
11 |
12 |
13 | Represents a constant output generator. Generates a constant digital signal of 0 (low) or 1 (high).
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.0.0
23 |
24 |
25 |
26 |
27 |
28 | To be added.
29 | To be added.
30 | To be added.
31 |
32 |
33 |
34 |
35 |
36 | Property
37 |
38 | 1.0.0.0
39 |
40 |
41 | Robotics.Micro.OutputPort
42 |
43 |
44 | Either 0 (low) or 1 (high).
45 | To be added.
46 | To be added.
47 |
48 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro.Generators/IPwm.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 |
10 | To be added.
11 | To be added.
12 |
13 |
14 |
15 |
16 |
17 | Property
18 |
19 | 1.0.0.0
20 |
21 |
22 | Robotics.Micro.InputPort
23 |
24 |
25 | To be added.
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
33 | Property
34 |
35 | 1.0.0.0
36 |
37 |
38 | Robotics.Micro.InputPort
39 |
40 |
41 | To be added.
42 | To be added.
43 | To be added.
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro.Motors/IDCMotor.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 |
10 | Represents a standard DC motor.
11 | To be added.
12 |
13 |
14 |
15 |
16 |
17 | Property
18 |
19 | 1.0.0.0
20 |
21 |
22 | Robotics.Micro.InputPort
23 |
24 |
25 | Whether or not the motor is de-powered (put into a neutral/spin-freely state) when the input is 0.
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
33 | Property
34 |
35 | 1.0.0.0
36 |
37 |
38 | Robotics.Micro.InputPort
39 |
40 |
41 | The speed from -1 (fastest reverse) to 1 (fastest forward) of the motor.
42 | To be added.
43 | To be added.
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro.Sensors.Buttons/IButton.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 |
10 | To be added.
11 | To be added.
12 |
13 |
14 |
15 |
16 |
17 | Event
18 |
19 | 1.0.0.0
20 |
21 |
22 | Microsoft.SPOT.EventHandler
23 |
24 |
25 | To be added.
26 | To be added.
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro.Sensors.Motion/IAccelerometer.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 |
10 | To be added.
11 | To be added.
12 |
13 |
14 |
15 |
16 |
17 | Property
18 |
19 | 1.0.0.0
20 |
21 |
22 | Robotics.Micro.OutputPort
23 |
24 |
25 | To be added.
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
33 | Property
34 |
35 | 1.0.0.0
36 |
37 |
38 | Robotics.Micro.OutputPort
39 |
40 |
41 | To be added.
42 | To be added.
43 | To be added.
44 |
45 |
46 |
47 |
48 |
49 | Property
50 |
51 | 1.0.0.0
52 |
53 |
54 | Robotics.Micro.OutputPort
55 |
56 |
57 | To be added.
58 | To be added.
59 | To be added.
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro.Sensors.Proximity/IRangeFinder.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 |
10 | To be added.
11 | To be added.
12 |
13 |
14 |
15 |
16 |
17 | Property
18 |
19 | 1.0.0.0
20 |
21 |
22 | Robotics.Micro.OutputPort
23 |
24 |
25 | To be added.
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro.SpecializedBlocks/Switch.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 | Robotics.Micro.BlockBase
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.0.0
23 |
24 |
25 |
26 |
27 |
28 | System.ParamArray
29 |
30 |
31 |
32 |
33 |
34 | To be added.
35 | To be added.
36 | To be added.
37 |
38 |
39 |
40 |
41 |
42 | Property
43 |
44 | 1.0.0.0
45 |
46 |
47 | Robotics.Micro.InputPort
48 |
49 |
50 | To be added.
51 | To be added.
52 | To be added.
53 |
54 |
55 |
56 |
57 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro.SpecializedBlocks/TransformFunction.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 | System.Delegate
10 |
11 |
12 |
13 |
14 |
15 | System.Double
16 |
17 |
18 | To be added.
19 | To be added.
20 | To be added.
21 | To be added.
22 |
23 |
24 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro/ConfigPort.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 | Robotics.Micro.Port
10 |
11 |
12 |
13 |
14 | ConfigPort is a specialized port that allows real-time configuration changes on a block.
15 |
16 | Certain Blocks can be configured to modify
17 | their output based on parameters specified by a ConfigPort. The beauty of ConfigPorts is that as opposed to having
18 | set-and-forget parameters, a ConfigPort is itself a port, meaning it can modify configuration in real-time, over time.
19 | For example, you could use the SineWave Generator Block to generate a Sine Wave signal, and then feed that into the
20 | ConfigPort, so that the configuration values would be constantly changing, in synch with the sine wave.
21 |
22 |
23 |
24 |
25 |
26 |
27 | Constructor
28 |
29 | 1.0.0.0
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 | To be added.
39 | To be added.
40 | To be added.
41 | To be added.
42 | To be added.
43 | To be added.
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro/IBlock.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 |
10 | To be added.
11 | To be added.
12 |
13 |
14 |
15 |
16 |
17 | Property
18 |
19 | 1.0.0.0
20 |
21 |
22 | System.String
23 |
24 |
25 | To be added.
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro/IScope.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 |
10 | Represents a Scope.
11 | A Scope is a listener. Scopes are used to listen to any kind of signal going through a port and do interesting things with that
12 | signal. For instance, the DebugScope is a simple scope that listens to a port and writes the signal (at specific
13 | time intervals) to the debug console. You could, for instance, write a custom scope called Oscilliscope that took
14 | the output from a block and graphed it.
15 |
16 |
17 |
18 |
19 |
20 | Method
21 |
22 | 1.0.0.0
23 |
24 |
25 | System.Void
26 |
27 |
28 |
29 |
30 |
31 | To be added.
32 | To be added.
33 | To be added.
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro/InputPort.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 | Robotics.Micro.Port
10 |
11 |
12 |
13 | Represents a Port that can receive data signals.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.0.0
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | To be added.
32 | To be added.
33 | To be added.
34 | To be added.
35 | To be added.
36 | To be added.
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro/OutputPort.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 | Robotics.Micro.Port
10 |
11 |
12 |
13 | Represents a port that can send data signals.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.0.0
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 | To be added.
32 | To be added.
33 | To be added.
34 | To be added.
35 | To be added.
36 | To be added.
37 |
38 |
39 |
40 |
41 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Micro/UnitsEx.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Micro.Core
6 | 1.0.0.0
7 |
8 |
9 | System.Object
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Method
21 |
22 | 1.0.0.0
23 |
24 |
25 | System.String
26 |
27 |
28 |
29 |
30 |
31 | To be added.
32 | To be added.
33 | To be added.
34 | To be added.
35 |
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/BluetoothKnownItemManager.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.Object
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.5384.14133
23 |
24 |
25 |
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/CharacteristicReadEventArgs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.EventArgs
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.5384.14133
23 |
24 |
25 |
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
33 | Property
34 |
35 | 1.0.5384.14133
36 |
37 |
38 | Robotics.Mobile.Core.Bluetooth.LE.ICharacteristic
39 |
40 |
41 | To be added.
42 | To be added.
43 | To be added.
44 |
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/DeviceConnectionEventArgs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.EventArgs
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.5384.14133
23 |
24 |
25 |
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
33 | Field
34 |
35 | 1.0.5384.14133
36 |
37 |
38 | Robotics.Mobile.Core.Bluetooth.LE.IDevice
39 |
40 |
41 | To be added.
42 | To be added.
43 |
44 |
45 |
46 |
47 |
48 | Field
49 |
50 | 1.0.5384.14133
51 |
52 |
53 | System.String
54 |
55 |
56 | To be added.
57 | To be added.
58 |
59 |
60 |
61 |
62 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/DeviceDiscoveredEventArgs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.EventArgs
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.5384.14133
23 |
24 |
25 |
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
33 | Field
34 |
35 | 1.0.5384.14133
36 |
37 |
38 | Robotics.Mobile.Core.Bluetooth.LE.IDevice
39 |
40 |
41 | To be added.
42 | To be added.
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/DeviceState.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.Enum
10 |
11 |
12 | To be added.
13 | To be added.
14 |
15 |
16 |
17 |
18 |
19 | Field
20 |
21 | 1.0.5384.14133
22 |
23 |
24 | Robotics.Mobile.Core.Bluetooth.LE.DeviceState
25 |
26 |
27 | To be added.
28 |
29 |
30 |
31 |
32 |
33 | Field
34 |
35 | 1.0.5384.14133
36 |
37 |
38 | Robotics.Mobile.Core.Bluetooth.LE.DeviceState
39 |
40 |
41 | To be added.
42 |
43 |
44 |
45 |
46 |
47 | Field
48 |
49 | 1.0.5384.14133
50 |
51 |
52 | Robotics.Mobile.Core.Bluetooth.LE.DeviceState
53 |
54 |
55 | To be added.
56 |
57 |
58 |
59 |
60 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/IDescriptor.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 |
10 | To be added.
11 | To be added.
12 |
13 |
14 |
15 |
16 |
17 | Property
18 |
19 | 1.0.5384.14133
20 |
21 |
22 | System.Guid
23 |
24 |
25 | To be added.
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
33 | Property
34 |
35 | 1.0.5384.14133
36 |
37 |
38 | System.String
39 |
40 |
41 | To be added.
42 | To be added.
43 | To be added.
44 |
45 |
46 |
47 |
48 |
49 | Property
50 |
51 | 1.0.5384.14133
52 |
53 |
54 | System.Object
55 |
56 |
57 | To be added.
58 | To be added.
59 | To be added.
60 |
61 |
62 |
63 |
64 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/KnownCharacteristic.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.ValueType
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Field
21 |
22 | 1.0.5384.14133
23 |
24 |
25 | System.Guid
26 |
27 |
28 | To be added.
29 | To be added.
30 |
31 |
32 |
33 |
34 |
35 | Field
36 |
37 | 1.0.5384.14133
38 |
39 |
40 | System.String
41 |
42 |
43 | To be added.
44 | To be added.
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/KnownCharacteristics.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.Object
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Method
21 |
22 | 1.0.5384.14133
23 |
24 |
25 | System.Void
26 |
27 |
28 |
29 | To be added.
30 | To be added.
31 |
32 |
33 |
34 |
35 |
36 | Method
37 |
38 | 1.0.5384.14133
39 |
40 |
41 | Robotics.Mobile.Core.Bluetooth.LE.KnownCharacteristic
42 |
43 |
44 |
45 |
46 |
47 | To be added.
48 | To be added.
49 | To be added.
50 | To be added.
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/KnownDescriptor.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.ValueType
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Field
21 |
22 | 1.0.5384.14133
23 |
24 |
25 | System.Guid
26 |
27 |
28 | To be added.
29 | To be added.
30 |
31 |
32 |
33 |
34 |
35 | Field
36 |
37 | 1.0.5384.14133
38 |
39 |
40 | System.String
41 |
42 |
43 | To be added.
44 | To be added.
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/KnownDescriptors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.Object
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Method
21 |
22 | 1.0.5384.14133
23 |
24 |
25 | System.Void
26 |
27 |
28 |
29 | To be added.
30 | To be added.
31 |
32 |
33 |
34 |
35 |
36 | Method
37 |
38 | 1.0.5384.14133
39 |
40 |
41 | Robotics.Mobile.Core.Bluetooth.LE.KnownDescriptor
42 |
43 |
44 |
45 |
46 |
47 | To be added.
48 | To be added.
49 | To be added.
50 | To be added.
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/KnownService.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.ValueType
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Field
21 |
22 | 1.0.5384.14133
23 |
24 |
25 | System.Guid
26 |
27 |
28 | To be added.
29 | To be added.
30 |
31 |
32 |
33 |
34 |
35 | Field
36 |
37 | 1.0.5384.14133
38 |
39 |
40 | System.String
41 |
42 |
43 | To be added.
44 | To be added.
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/KnownServices.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.Object
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Method
21 |
22 | 1.0.5384.14133
23 |
24 |
25 | System.Void
26 |
27 |
28 |
29 | To be added.
30 | To be added.
31 |
32 |
33 |
34 |
35 |
36 | Method
37 |
38 | 1.0.5384.14133
39 |
40 |
41 | Robotics.Mobile.Core.Bluetooth.LE.KnownService
42 |
43 |
44 |
45 |
46 |
47 | To be added.
48 | To be added.
49 | To be added.
50 | To be added.
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/API Docs/Robotics.Mobile.Core.Bluetooth.LE/ServicesDiscoveredEventArgs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Robotics.Mobile.Core
6 | 1.0.5384.14133
7 |
8 |
9 | System.EventArgs
10 |
11 |
12 |
13 | To be added.
14 | To be added.
15 |
16 |
17 |
18 |
19 |
20 | Constructor
21 |
22 | 1.0.5384.14133
23 |
24 |
25 |
26 | To be added.
27 | To be added.
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/API Docs/Xamarin.Labs.Robotics.source:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/API Docs/Xamarin.Labs.Robotics.tree:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/API Docs/Xamarin.Labs.Robotics.tree
--------------------------------------------------------------------------------
/API Docs/Xamarin.Labs.Robotics.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/API Docs/Xamarin.Labs.Robotics.zip
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Messaging.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | High-level Messaging framework for communicating between Xamarin Mobile apps and .NET Microframework devices via Bluetooth LE, USB, or WiFi.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.Devices.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains classes to support various .NET Microframework (MF) hardware such as the Netduino. Allows strongly-typed access to device-specific hardware.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.Generators.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains various software signal generators to create things like Sinewaves, Pulse-width-modulation, etc.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.Motors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains classes to manage various motors and accessories such H-bridges, Motor Shields, and DC Motors.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.Sensors.Buttons.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains classes that represent various buttons, such as Push Buttons, etc.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.Sensors.Light.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains various classes to support various light sensors.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.Sensors.Location.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains classes that support various location sensors such as GPS and compasses.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.Sensors.Motion.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains classes that support location motion sensors such as accelerometers.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.Sensors.Proximity.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains classes that support various proximity sensors such as infrarred (IR) range finders.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.Sensors.Temperature.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains classes that support various temperature sensors.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.SpecializedBlocks.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains specialized block classes that support conversions, transformations, etc.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Micro.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | The core Robotics micro library that runs on .NET Microframework (MF) devices such as the Netduino.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Mobile.Core.Bluetooth.LE.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Cross-platform (iOS and Android currently supported) framework for enumerating, connnecting to, and communicating with Bluetooth Low-Energy (BLE) devices from Xamarin Mobile applications.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/ns-Robotics.Mobile.Core.Utils.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Contains various utility classes used internally to support the Mobile library.
4 | To be added.
5 |
6 |
7 |
--------------------------------------------------------------------------------
/API Docs/readme.md:
--------------------------------------------------------------------------------
1 | # API Documentation
2 |
3 | The docs herein can be viewed in the MonoDoc browser.
4 |
5 | ## One Time Configuration
6 |
7 | In order to have MacDoc know that the doc set exists, you must copy the `Robotics-docs.source` file to `/Library/Frameworks/Mono.Framework/External/monodoc`.
8 | You can run this from the terminal from this folder by running:
9 |
10 | ```
11 | ./ConfigDocs
12 |
13 | ```
14 | > Note, It may prompt you to enter your password.
15 |
16 | ## Displaying the Docs
17 |
18 | Once you've configured the doc set, you can compile and install the docs by running:
19 |
20 | ```
21 | ./Makedocs
22 | ```
23 | In terminal, from the API Docs directory.
24 |
25 | After the docs are installed, launch macdoc from within Xamarin Studio via **Help > API Documentation**. The docs should show up in the **Robotics from Xamarin.Labs** node:
26 | 
--------------------------------------------------------------------------------
/Images/Architectural_Overview.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Images/Architectural_Overview.png
--------------------------------------------------------------------------------
/Images/Architectural_Overview.pxm:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Images/Architectural_Overview.pxm
--------------------------------------------------------------------------------
/Images/Platform_Stack_Topography.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Images/Platform_Stack_Topography.png
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Monkey.BluetoothLE - Beta
2 |
3 | Monkey.BluetoothLE greatly simplifies the task of using BluetoothLE communications in Xamarin apps.
4 |
5 | 
6 |
7 | ### Beta
8 |
9 | > Please Note: Monkey.BluetoothLE is still a beta/work in progress and is not officially supported by Xamarin. It's a passion project put together by folks that love C# and Robotics. We're working on the docs as you read this. If you run into any issues, please file them [on GitHub](https://github.com/xamarin/Monkey.Robotics/issues). Thanks for trying it out!
10 |
11 | ## Overview
12 |
13 | The _Mobile Stack_ is built in C# and runs on iOS, Android, and UWP via the [Xamarin platform](http://xamarin.com) and contains features for communicating with IoT devices and wearables (such as health monitoring devices) via BluetoothLE.
14 |
15 |
16 | The following diagram illustrates the topology of the entire stack:
17 |
18 | 
19 |
20 | ### Mobile Stack
21 |
22 | The Mobile stack consists of three different parts:
23 |
24 | * **Low-level Bluetooth LE (BLE) API** - A cross-platform API (iOS and Android only right now) that supports communicating with BLE devices.
25 | * **Low-Level Wifi API** - A cross-platform API (iOS and Android only right now) that supports connecting to WiFi enabled devices. Note that the WiFi API is still in progress.
26 | * **Messaging Framework** - A high-level cross-platform protocol for messaging peripherals via WiFi or BLE.
27 | * **Peripheral Libraries** - Strongly typed libraries for communicating with various vendor-specific peripherals such as health monitoring devices, smart watches, and the like.
28 |
29 |
30 | # Documentation and Samples
31 |
32 | ## [API Documentation](API%20Docs/)
33 |
34 | Check out the [API Documentation](API%20Docs/) for reference and API browsing.
35 |
36 | ## Samples
37 |
38 | * [BluetoothLE Explorer](https://github.com/xamarin/Monkey.Robotics/tree/master/Sample%20Apps/BLE%20Explorer) using a _TI SensorTag_.
39 |
40 | * [HeartRateMonitor](https://github.com/conceptdev/xamarin-forms-samples/tree/master/BluetoothHeartRateMonitor) built in Xamarin.Forms.
41 |
42 |
43 | # Authors
44 | Bryan Costanich, Frank Krueger, Craig Dunn, David Karlas, Oleg Rakhmatulin, Adrian Stevens
45 |
46 |
47 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/App.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using Robotics.Mobile.Core.Bluetooth.LE;
4 |
5 | namespace Robotics.Mobile.BtLEExplorer
6 | {
7 | public class App : Application // new in 1.3
8 | {
9 | static IAdapter Adapter;
10 |
11 | public App ()
12 | {
13 | MainPage = new NavigationPage (new DeviceList (Adapter));
14 | }
15 |
16 | public static void SetAdapter (IAdapter adapter) {
17 | Adapter = adapter;
18 | }
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Extensions/EmptyStringConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using Xamarin.Forms;
4 |
5 | namespace Robotics.Mobile.BtLEExplorer
6 | {
7 | public class EmptyStringConverter : IValueConverter
8 | {
9 | public object Convert (
10 | object value,
11 | Type targetType,
12 | object parameter,
13 | CultureInfo culture)
14 | {
15 | String str = (String)value;
16 | return String.IsNullOrWhiteSpace (str) ? "" : str;
17 | }
18 |
19 | public object ConvertBack (
20 | object value,
21 | Type targetType,
22 | object parameter,
23 | CultureInfo culture)
24 | {
25 | throw new NotImplementedException ("EmptyStringConverter is one-way");
26 | }
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Extensions/GuidConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using System.Globalization;
4 |
5 | namespace Robotics.Mobile.BtLEExplorer
6 | {
7 | public class GuidConverter : IValueConverter
8 | {
9 | public object Convert (
10 | object value,
11 | Type targetType,
12 | object parameter,
13 | CultureInfo culture)
14 | {
15 | Guid guid = (Guid)value;
16 | return guid.ToString ();
17 | }
18 |
19 | public object ConvertBack (
20 | object value,
21 | Type targetType,
22 | object parameter,
23 | CultureInfo culture)
24 | {
25 | throw new NotImplementedException ("GuidConverter is one-way");
26 | }
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/CharacteristicDetail.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/CharacteristicDetail.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 | using Robotics.Mobile.Core.Bluetooth.LE;
5 | using System.Diagnostics;
6 | using System.Linq;
7 |
8 | namespace Robotics.Mobile.BtLEExplorer
9 | {
10 | public partial class CharacteristicDetail : ContentPage
11 | {
12 | IAdapter adapter;
13 | IDevice device;
14 | IService service;
15 | ICharacteristic characteristic;
16 |
17 | public CharacteristicDetail (IAdapter adapter, IDevice device, IService service, ICharacteristic characteristic)
18 | {
19 | InitializeComponent ();
20 | this.characteristic = characteristic;
21 |
22 | if (characteristic.CanUpdate) {
23 | characteristic.ValueUpdated += (s, e) => {
24 | Debug.WriteLine("characteristic.ValueUpdated");
25 | Device.BeginInvokeOnMainThread( () => {
26 | UpdateDisplay(characteristic);
27 | });
28 | };
29 | characteristic.StartUpdates();
30 | }
31 | }
32 |
33 | protected override async void OnAppearing ()
34 | {
35 | base.OnAppearing ();
36 |
37 | if (characteristic.CanRead) {
38 | var c = await characteristic.ReadAsync();
39 | UpdateDisplay(c);
40 | }
41 | }
42 |
43 | protected override void OnDisappearing()
44 | {
45 | base.OnDisappearing();
46 | if (characteristic.CanUpdate) {
47 | characteristic.StopUpdates();
48 | }
49 | }
50 | void UpdateDisplay (ICharacteristic c) {
51 | Name.Text = c.Name;
52 | //ID.Text = c.ID.ToString();
53 | ID.Text = c.ID.PartialFromUuid ();
54 |
55 | var s = (from i in c.Value
56 | select i.ToString ("X").PadRight(2, '0')).ToArray ();
57 | RawValue.Text = string.Join (":", s);
58 |
59 | if (c.ID == 0x2A37.UuidFromPartial ()) {
60 | // heart rate
61 | StringValue.Text = DecodeHeartRateCharacteristicValue (c.Value);
62 | StringValue.TextColor = Color.Red;
63 | } else {
64 | StringValue.Text = c.StringValue;
65 | StringValue.TextColor = Color.Default;
66 | }
67 |
68 | }
69 |
70 | string DecodeHeartRateCharacteristicValue(byte[] data) {
71 | ushort bpm = 0;
72 | if ((data [0] & 0x01) == 0) {
73 | bpm = data [1];
74 | } else {
75 | bpm = (ushort)data [1];
76 | bpm = (ushort)(((bpm >> 8) & 0xFF) | ((bpm << 8) & 0xFF00));
77 | }
78 | return bpm.ToString () + " bpm";
79 | }
80 | }
81 | }
82 |
83 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/CharacteristicDetail_TISensor.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 10,10,10,10
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/CharacteristicDetail_TISwitch.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/CharacteristicDetail_TISwitch.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using Xamarin.Forms;
5 | using Robotics.Mobile.Core.Bluetooth.LE;
6 | using System.Diagnostics;
7 |
8 | namespace Robotics.Mobile.BtLEExplorer
9 | {
10 | /*
11 | * this page is specifically for the on/off capabilities of the
12 | * TI Sensor Tag characteristics. It should only be pushed by the listview
13 | * when the correct type of characteristic is detected.
14 | */
15 | public partial class CharacteristicDetail_TISwitch : ContentPage
16 | {
17 | ICharacteristic characteristic;
18 |
19 | public CharacteristicDetail_TISwitch (IAdapter adapter, IDevice device, IService service, ICharacteristic characteristic)
20 | {
21 | InitializeComponent ();
22 | this.characteristic = characteristic;
23 | }
24 |
25 | protected override async void OnAppearing ()
26 | {
27 | base.OnAppearing ();
28 | Debug.WriteLine ("ReadAsync: " + characteristic.Name);
29 | if (characteristic.CanRead) {
30 | var c = await characteristic.ReadAsync();
31 | UpdateDisplay(c);
32 | if (c.Value[0] == 0x00) {
33 | Enabled.IsToggled = false;
34 | } else {
35 | Enabled.IsToggled = true;
36 | }
37 | }
38 | // assign the event handler AFTER setting the intial value
39 | Enabled.Toggled += SwitchToggled;
40 | }
41 | protected override void OnDisappearing ()
42 | {
43 | base.OnDisappearing ();
44 | Enabled.Toggled -= SwitchToggled;
45 | }
46 |
47 | void UpdateDisplay (ICharacteristic c) {
48 | Debug.WriteLine ("UpdateDisplay");
49 | Name.Text = c.Name;
50 | ID.Text = c.ID.PartialFromUuid ();
51 |
52 | var s = (from i in c.Value
53 | select i.ToString ("X").PadRight(2, '0')).ToArray ();
54 | RawValue.Text = string.Join (":", s);
55 | StringValue.Text = c.StringValue;
56 | }
57 |
58 | async void SwitchToggled (object sender, ToggledEventArgs e) {
59 | Debug.WriteLine("Switching: " + characteristic.ID.PartialFromUuid ());
60 | if (e.Value) {
61 | if (characteristic.ID.PartialFromUuid () == "0xaa52") // gyroscope on/off
62 | characteristic.Write (new byte[] { 0x07 }); // enable XYZ axes
63 | else if (characteristic.ID.PartialFromUuid () == "0xaa23") // humidity period
64 | characteristic.Write (new byte[] { 0x02 }); //
65 | else
66 | characteristic.Write (new byte[] { 0x01 });
67 | } else {
68 | // OFF
69 | characteristic.Write (new byte[] { 0x00 });
70 | }
71 | var c = await characteristic.ReadAsync();
72 | UpdateDisplay(c);
73 | }
74 | }
75 | }
76 |
77 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/CharacteristicList.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/CharacteristicList.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 | using Robotics.Mobile.Core.Bluetooth.LE;
5 | using System.Collections.ObjectModel;
6 | using System.Diagnostics;
7 |
8 | namespace Robotics.Mobile.BtLEExplorer
9 | {
10 | public partial class CharacteristicList : ContentPage
11 | {
12 | IAdapter adapter;
13 | IDevice device;
14 | IService service;
15 |
16 | ObservableCollection characteristics;
17 |
18 | public CharacteristicList (IAdapter adapter, IDevice device, IService service)
19 | {
20 | InitializeComponent ();
21 | this.adapter = adapter;
22 | this.device = device;
23 | this.service = service;
24 | this.characteristics = new ObservableCollection ();
25 |
26 | listView.ItemsSource = characteristics;
27 |
28 | // when characteristics are discovered
29 | service.CharacteristicsDiscovered += (object sender, EventArgs e) => {
30 | Debug.WriteLine("service.CharacteristicsDiscovered");
31 | if (characteristics.Count == 0)
32 | Device.BeginInvokeOnMainThread(() => {
33 | foreach (var characteristic in service.Characteristics) {
34 | characteristics.Add(characteristic);
35 | }
36 | });
37 | };
38 |
39 | // start looking for characteristics
40 | service.DiscoverCharacteristics ();
41 | }
42 |
43 |
44 | protected override void OnAppearing ()
45 | {
46 | base.OnAppearing ();
47 | if (characteristics.Count == 0) {
48 | Debug.WriteLine ("No characteristics, attempting to find some");
49 | // start looking for the device
50 | adapter.ConnectToDevice (device);
51 | }
52 | }
53 | ///
54 | /// Display a Characteristics Page
55 | ///
56 | public void OnItemSelected (object sender, SelectedItemChangedEventArgs e) {
57 | if (((ListView)sender).SelectedItem == null) {
58 | return;
59 | }
60 |
61 | var characteristic = e.SelectedItem as ICharacteristic;
62 | ContentPage characteristicsPage = null;
63 |
64 | if (characteristic.Name.Contains ("On/Off")) {
65 | characteristicsPage = new CharacteristicDetail_TISwitch (adapter, device, service, characteristic);
66 | } else if (true) {
67 | characteristicsPage = new CharacteristicDetail_TISensor (adapter, device, service, characteristic);
68 | } else {
69 | characteristicsPage = new CharacteristicDetail (adapter, device, service, characteristic);
70 | }
71 |
72 | Navigation.PushAsync(characteristicsPage);
73 |
74 | ((ListView)sender).SelectedItem = null; // clear selection
75 | }
76 | }
77 | }
78 |
79 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/DeviceList.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/DeviceList.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 | using Robotics.Mobile.Core.Bluetooth.LE;
5 | using System.Threading.Tasks;
6 | using System.Diagnostics;
7 | using System.Collections.ObjectModel;
8 |
9 | namespace Robotics.Mobile.BtLEExplorer
10 | {
11 | public partial class DeviceList : ContentPage
12 | {
13 | IAdapter adapter;
14 | ObservableCollection devices;
15 |
16 | public DeviceList (IAdapter adapter)
17 | {
18 | InitializeComponent ();
19 | this.adapter = adapter;
20 | this.devices = new ObservableCollection ();
21 | listView.ItemsSource = devices;
22 |
23 | adapter.DeviceDiscovered += (object sender, DeviceDiscoveredEventArgs e) => {
24 | Device.BeginInvokeOnMainThread(() => {
25 | devices.Add (e.Device);
26 | });
27 | };
28 |
29 | adapter.ScanTimeoutElapsed += (sender, e) => {
30 | adapter.StopScanningForDevices(); // not sure why it doesn't stop already, if the timeout elapses... or is this a fake timeout we made?
31 | Device.BeginInvokeOnMainThread ( () => {
32 | DisplayAlert("Timeout", "Bluetooth scan timeout elapsed", "OK");
33 | });
34 | };
35 |
36 | ScanAllButton.Activated += (sender, e) => {
37 | StartScanning();
38 | };
39 |
40 | ScanHrmButton.Activated += (sender, e) => {
41 | StartScanning (0x180D.UuidFromPartial());
42 | };
43 | }
44 |
45 | public void OnItemSelected (object sender, SelectedItemChangedEventArgs e) {
46 | if (((ListView)sender).SelectedItem == null) {
47 | return;
48 | }
49 | Debug.WriteLine (" xxxxxxxxxxxx OnItemSelected " + e.SelectedItem.ToString ());
50 | StopScanning ();
51 |
52 | var device = e.SelectedItem as IDevice;
53 | var servicePage = new ServiceList(adapter, device);
54 | // load services on the next page
55 | Navigation.PushAsync(servicePage);
56 |
57 | ((ListView)sender).SelectedItem = null; // clear selection
58 | }
59 |
60 | void StartScanning () {
61 | StartScanning (Guid.Empty);
62 | }
63 | void StartScanning (Guid forService) {
64 | if (adapter.IsScanning) {
65 | adapter.StopScanningForDevices();
66 | Debug.WriteLine ("adapter.StopScanningForDevices()");
67 | } else {
68 | devices.Clear();
69 | adapter.StartScanningForDevices(forService);
70 | Debug.WriteLine ("adapter.StartScanningForDevices("+forService+")");
71 | }
72 | }
73 |
74 | void StopScanning () {
75 | // stop scanning
76 | new Task( () => {
77 | if(adapter.IsScanning) {
78 | Debug.WriteLine ("Still scanning, stopping the scan");
79 | adapter.StopScanningForDevices();
80 | }
81 | }).Start();
82 | }
83 | }
84 | }
85 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/ServiceList.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Pages/ServiceList.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Xamarin.Forms;
4 | using Robotics.Mobile.Core.Bluetooth.LE;
5 | using System.Collections.ObjectModel;
6 | using System.Diagnostics;
7 |
8 | namespace Robotics.Mobile.BtLEExplorer
9 | {
10 | public partial class ServiceList : ContentPage
11 | {
12 | IAdapter adapter;
13 | IDevice device;
14 |
15 | ObservableCollection services;
16 |
17 | public ServiceList (IAdapter adapter, IDevice device)
18 | {
19 | InitializeComponent ();
20 | this.adapter = adapter;
21 | this.device = device;
22 | this.services = new ObservableCollection ();
23 | listView.ItemsSource = services;
24 |
25 | // when device is connected
26 | adapter.DeviceConnected += (s, e) => {
27 | device = e.Device; // do we need to overwrite this?
28 |
29 | // when services are discovered
30 | device.ServicesDiscovered += (object se, EventArgs ea) => {
31 | Debug.WriteLine("device.ServicesDiscovered");
32 | //services = (List)device.Services;
33 | if (services.Count == 0)
34 | Device.BeginInvokeOnMainThread(() => {
35 | foreach (var service in device.Services) {
36 | services.Add(service);
37 | }
38 | });
39 | };
40 | // start looking for services
41 | device.DiscoverServices ();
42 |
43 | };
44 | // TODO: add to IAdapter first
45 | //adapter.DeviceFailedToConnect += (sender, else) => {};
46 |
47 | DisconnectButton.Activated += (sender, e) => {
48 | adapter.DisconnectDevice (device);
49 | Navigation.PopToRootAsync(); // disconnect means start over
50 | };
51 | }
52 |
53 |
54 | protected override void OnAppearing ()
55 | {
56 | base.OnAppearing ();
57 | if (services.Count == 0) {
58 | Debug.WriteLine ("No services, attempting to connect to device");
59 | // start looking for the device
60 | adapter.ConnectToDevice (device);
61 | }
62 | }
63 | public void OnItemSelected (object sender, SelectedItemChangedEventArgs e) {
64 | if (((ListView)sender).SelectedItem == null) {
65 | return;
66 | }
67 |
68 | var service = e.SelectedItem as IService;
69 | var characteristicsPage = new CharacteristicList(adapter, device, service);
70 | Navigation.PushAsync(characteristicsPage);
71 |
72 | ((ListView)sender).SelectedItem = null; // clear selection
73 | }
74 | }
75 | }
76 |
77 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle ("Robotics.Mobile.BtLEExplorer")]
8 | [assembly: AssemblyDescription ("")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("")]
11 | [assembly: AssemblyProduct ("")]
12 | [assembly: AssemblyCopyright ("craigdunn")]
13 | [assembly: AssemblyTrademark ("")]
14 | [assembly: AssemblyCulture ("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion ("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Core/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with your package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content;
5 | using Android.Runtime;
6 | using Android.Views;
7 | using Android.Widget;
8 | using Android.OS;
9 |
10 | using Xamarin.Forms.Platform.Android;
11 | using Android.Content.PM;
12 |
13 |
14 | namespace Robotics.Mobile.BtLEExplorer.Droid
15 | {
16 | [Activity (Label = "Robotics.Mobile.BtLEExplorer.Android.Android",
17 | MainLauncher = true,
18 | ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
19 | public class MainActivity : FormsApplicationActivity // new int 1.3
20 | {
21 | protected override void OnCreate (Bundle bundle)
22 | {
23 | base.OnCreate (bundle);
24 |
25 | Xamarin.Forms.Forms.Init (this, bundle);
26 |
27 | var a = new Robotics.Mobile.Core.Bluetooth.LE.Adapter ();
28 | App.SetAdapter (a);
29 |
30 | LoadApplication (new App ());
31 | }
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using Android.App;
4 |
5 | // Information about this assembly is defined by the following attributes.
6 | // Change them to the values specific to your project.
7 |
8 | [assembly: AssemblyTitle ("Robotics.Mobile.BtLEExplorer.Android")]
9 | [assembly: AssemblyDescription ("")]
10 | [assembly: AssemblyConfiguration ("")]
11 | [assembly: AssemblyCompany ("")]
12 | [assembly: AssemblyProduct ("")]
13 | [assembly: AssemblyCopyright ("craigdunn")]
14 | [assembly: AssemblyTrademark ("")]
15 | [assembly: AssemblyCulture ("")]
16 |
17 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
18 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
19 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
20 |
21 | [assembly: AssemblyVersion ("1.0.0")]
22 |
23 | // The following attributes are used to specify the signing key for the assembly,
24 | // if desired. See the Mono documentation for more information about signing.
25 |
26 | //[assembly: AssemblyDelaySign(false)]
27 | //[assembly: AssemblyKeyFile("")]
28 |
29 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.axml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.axml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
45 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable-xhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable-xhdpi/Icon.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable-xxhdpi/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable-xxhdpi/Icon.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable/Icon.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable/bluetooth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable/bluetooth.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable/glyphish_29_heart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable/glyphish_29_heart.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable/glyphish_31_circle_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/drawable/glyphish_31_circle_x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/layout/Main.axml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Hello World, Click Me!
4 | Robotics.Mobile.BtLEExplorer.Android.Android
5 |
6 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using MonoTouch.Foundation;
6 | using MonoTouch.UIKit;
7 |
8 | using Xamarin.Forms;
9 | using Robotics.Mobile.Core.Bluetooth.LE;
10 | using Xamarin.Forms.Platform.iOS;
11 |
12 | namespace Robotics.Mobile.BtLEExplorer.iOS
13 | {
14 | [Register ("AppDelegate")]
15 | public partial class AppDelegate : FormsApplicationDelegate // new int 1.3
16 | {
17 | UIWindow window;
18 |
19 | public override bool FinishedLaunching (UIApplication app, NSDictionary options)
20 | {
21 | Xamarin.Forms.Forms.Init ();
22 |
23 | window = new UIWindow (UIScreen.MainScreen.Bounds);
24 |
25 | App.SetAdapter (Adapter.Current);
26 |
27 | LoadApplication (new App ());
28 |
29 | return base.FinishedLaunching (app, options);
30 | }
31 | }
32 | }
33 |
34 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleShortVersionString
6 | 1.0
7 | CFBundleVersion
8 | 1.0
9 | LSRequiresIPhoneOS
10 |
11 | MinimumOSVersion
12 | 7.0
13 | UIDeviceFamily
14 |
15 | 1
16 | 2
17 |
18 | UIRequiredDeviceCapabilities
19 |
20 | armv7
21 |
22 | UISupportedInterfaceOrientations
23 |
24 | UIInterfaceOrientationPortrait
25 | UIInterfaceOrientationLandscapeLeft
26 | UIInterfaceOrientationLandscapeRight
27 |
28 | UISupportedInterfaceOrientations~ipad
29 |
30 | UIInterfaceOrientationPortrait
31 | UIInterfaceOrientationPortraitUpsideDown
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | CFBundleIconFiles
36 |
37 | Icon-76@2x
38 | Icon-76
39 | Icon-Small-40@2x
40 | Icon-Small-40
41 | Icon-60@2x
42 | Icon-Small@2x
43 | Icon-Small
44 |
45 | CFBundleDisplayName
46 | BLE Explorer
47 |
48 |
49 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using MonoTouch.Foundation;
6 | using MonoTouch.UIKit;
7 |
8 | namespace Robotics.Mobile.BtLEExplorer.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main (string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main (args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
22 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-60@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-76.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-76@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-Small-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-Small-40.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-Small-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-Small-40@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-Small.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/Icon-Small@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/bluetooth.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/bluetooth.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/bluetooth@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/bluetooth@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/glyphish_29_heart.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/glyphish_29_heart.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/glyphish_31_circle_x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/glyphish_31_circle_x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/glyphish_31_circle_x@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/glyphish_31_circle_x@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/iTunesArtwork@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/Resources/iTunesArtwork@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer old/Robotics.Mobile.BtLEExplorer.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with you package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content.PM;
5 | using Android.Runtime;
6 | using Android.Views;
7 | using Android.Widget;
8 | using Android.OS;
9 |
10 | namespace BLEExplorer.Droid
11 | {
12 | [Activity(Label = "BLEExplorer", Icon = "@drawable/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
13 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
14 | {
15 | protected override void OnCreate(Bundle bundle)
16 | {
17 | TabLayoutResource = Resource.Layout.Tabbar;
18 | ToolbarResource = Resource.Layout.Toolbar;
19 |
20 | base.OnCreate(bundle);
21 |
22 | global::Xamarin.Forms.Forms.Init(this, bundle);
23 |
24 | App.SetAdapter(new Robotics.Mobile.Core.Bluetooth.LE.Adapter());
25 |
26 | LoadApplication(new App());
27 | }
28 | }
29 | }
30 |
31 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("BLEExplorer.Droid")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("BLEExplorer.Droid")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
32 | // Add some common permissions, these can be removed if not needed
33 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
34 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
35 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/drawable-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/drawable-hdpi/icon.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/drawable-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/drawable-xhdpi/icon.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/drawable-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/drawable-xxhdpi/icon.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/drawable/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/drawable/icon.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/layout/Tabbar.axml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/layout/Toolbar.axml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
26 |
27 |
30 |
31 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.Droid/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/LockScreenLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/LockScreenLogo.scale-100.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/LockScreenLogo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/LockScreenLogo.scale-125.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/LockScreenLogo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/LockScreenLogo.scale-150.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/LockScreenLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/LockScreenLogo.scale-400.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/SplashScreen.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/SplashScreen.scale-125.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/SplashScreen.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/SplashScreen.scale-150.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square150x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square150x150Logo.scale-125.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square150x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square150x150Logo.scale-150.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.scale-125.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.scale-150.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.targetsize-16_altform-unplated.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.targetsize-256_altform-unplated.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.targetsize-32_altform-unplated.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Square44x44Logo.targetsize-48_altform-unplated.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Wide310x150Logo.scale-125.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Wide310x150Logo.scale-125.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Wide310x150Logo.scale-150.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Wide310x150Logo.scale-150.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Assets/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/BLEExplorer.UWP.nuget.targets:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | $(MSBuildAllProjects);$(MSBuildThisFileFullPath)
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | namespace BLEExplorer.UWP
17 | {
18 | public sealed partial class MainPage
19 | {
20 | public MainPage()
21 | {
22 | this.InitializeComponent();
23 |
24 | global::BLEExplorer.App.SetAdapter(new Robotics.Mobile.Core.Bluetooth.LE.Adapter());
25 |
26 | LoadApplication(new BLEExplorer.App());
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | BLEExplorer.UWP
7 | Adrian
8 | Assets\StoreLogo.png
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("BLEExplorer.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("BLEExplorer.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/Windows_TemporaryKey.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.UWP/Windows_TemporaryKey.pfx
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.UWP/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2",
4 | "Xamarin.Forms": "2.5.0.121934"
5 | },
6 | "frameworks": {
7 | "uap10.0.14393": {}
8 | },
9 | "runtimes": {
10 | "win10-arm": {},
11 | "win10-arm-aot": {},
12 | "win10-x86": {},
13 | "win10-x86-aot": {},
14 | "win10-x64": {},
15 | "win10-x64-aot": {}
16 | }
17 | }
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace BLEExplorer.iOS
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register("AppDelegate")]
14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
15 | {
16 | //
17 | // This method is invoked when the application has loaded and is ready to run. In this
18 | // method you should instantiate the window, load the UI into it and then make the window
19 | // visible.
20 | //
21 | // You have 17 seconds to return from this method, or iOS will terminate your application.
22 | //
23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
24 | {
25 | global::Xamarin.Forms.Forms.Init();
26 | LoadApplication(new App());
27 |
28 | return base.FinishedLaunching(app, options);
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 6.0
25 | CFBundleDisplayName
26 | BLEExplorer
27 | CFBundleIdentifier
28 | com.yourcompany.BLEExplorer
29 | CFBundleVersion
30 | 1.0
31 | CFBundleIconFiles
32 |
33 | Icon-60@2x
34 | Icon-60@3x
35 | Icon-76
36 | Icon-76@2x
37 | Default
38 | Default@2x
39 | Default-568h@2x
40 | Default-Portrait
41 | Default-Portrait@2x
42 | Icon-Small-40
43 | Icon-Small-40@2x
44 | Icon-Small-40@3x
45 | Icon-Small
46 | Icon-Small@2x
47 | Icon-Small@3x
48 |
49 | UILaunchStoryboardName
50 | LaunchScreen
51 |
52 |
53 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace BLEExplorer.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("BLEExplorer.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("BLEExplorer.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-60@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-60@3x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-76.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-76@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small-40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small-40.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small-40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small-40@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small-40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small-40@3x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small@2x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/Resources/Icon-Small@3x.png
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/iTunesArtwork:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/iTunesArtwork
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/iTunesArtwork@2x:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/xamarin/Monkey.BluetoothLE/77683e2e69e7f0c0314a588c142258e4d6d45884/Sample Apps/BLE Explorer/BLEExplorer.iOS/iTunesArtwork@2x
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer.iOS/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using BLEExplorer.Pages;
2 | using Robotics.Mobile.Core.Bluetooth.LE;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
7 |
8 | namespace BLEExplorer
9 | {
10 | public partial class App : Application
11 | {
12 | static IAdapter Adapter;
13 |
14 | public App()
15 | {
16 | InitializeComponent();
17 |
18 | MainPage = new NavigationPage(new DeviceList(Adapter));
19 | }
20 |
21 | public static void SetAdapter(IAdapter adapter)
22 | {
23 | Adapter = adapter;
24 | }
25 |
26 | protected override void OnStart()
27 | {
28 | }
29 |
30 | protected override void OnSleep()
31 | {
32 | }
33 |
34 | protected override void OnResume()
35 | {
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Extensions/EmptyStringConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Globalization;
3 | using Xamarin.Forms;
4 |
5 | namespace Robotics.Mobile.BtLEExplorer
6 | {
7 | public class EmptyStringConverter : IValueConverter
8 | {
9 | public object Convert (object value, Type targetType, object parameter, CultureInfo culture)
10 | {
11 | var str = (String)value;
12 | return String.IsNullOrWhiteSpace (str) ? "" : str;
13 | }
14 |
15 | public object ConvertBack (object value, Type targetType, object parameter, CultureInfo culture)
16 | {
17 | throw new NotImplementedException ("EmptyStringConverter is one-way");
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Extensions/GuidConverter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Xamarin.Forms;
3 | using System.Globalization;
4 |
5 | namespace Robotics.Mobile.BtLEExplorer
6 | {
7 | public class GuidConverter : IValueConverter
8 | {
9 | public object Convert (
10 | object value,
11 | Type targetType,
12 | object parameter,
13 | CultureInfo culture)
14 | {
15 | Guid guid = (Guid)value;
16 | return guid.ToString ();
17 | }
18 |
19 | public object ConvertBack (
20 | object value,
21 | Type targetType,
22 | object parameter,
23 | CultureInfo culture)
24 | {
25 | throw new NotImplementedException ("GuidConverter is one-way");
26 | }
27 | }
28 | }
29 |
30 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Pages/CharacteristicDetail.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Pages/CharacteristicDetail.xaml.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 | using Robotics.Mobile.Core.Bluetooth.LE;
3 | using System.Diagnostics;
4 | using System.Linq;
5 |
6 | namespace BLEExplorer.Pages
7 | {
8 | public partial class CharacteristicDetail : ContentPage
9 | {
10 | //IAdapter adapter;
11 | //IDevice device;
12 | //IService service;
13 | ICharacteristic characteristic;
14 |
15 | public CharacteristicDetail (IAdapter adapter, IDevice device, IService service, ICharacteristic characteristic)
16 | {
17 | InitializeComponent ();
18 |
19 | this.characteristic = characteristic;
20 |
21 | /*
22 | if (characteristic.CanUpdate)
23 | {
24 | characteristic.ValueUpdated += (s, e) =>
25 | {
26 | Debug.WriteLine("characteristic.ValueUpdated");
27 |
28 | Device.BeginInvokeOnMainThread( () => UpdateDisplay(characteristic) );
29 |
30 | };
31 | characteristic.StartUpdates();
32 | }
33 | */
34 |
35 | btnTxRx.Clicked += (s, e) => Navigation.PushAsync(new TxRx(characteristic));
36 | }
37 |
38 | protected override async void OnAppearing ()
39 | {
40 | base.OnAppearing ();
41 |
42 | if (characteristic.CanRead) {
43 | var c = await characteristic.ReadAsync();
44 | UpdateDisplay(c);
45 | }
46 | }
47 |
48 | protected override void OnDisappearing()
49 | {
50 | base.OnDisappearing();
51 |
52 | if (characteristic.CanUpdate)
53 | characteristic.StopUpdates();
54 |
55 | }
56 | void UpdateDisplay (ICharacteristic c)
57 | {
58 | Name.Text = c.Name;
59 |
60 | ID.Text = c.ID.PartialFromUuid ();
61 |
62 | var s = (from i in c.Value select i.ToString ("X").PadRight(2, '0')).ToArray ();
63 |
64 | RawValue.Text = string.Join (":", s);
65 |
66 | if (c.ID == 0x2A37.UuidFromPartial ())
67 | {
68 | // heart rate
69 | StringValue.Text = DecodeHeartRateCharacteristicValue (c.Value);
70 | StringValue.TextColor = Color.Red;
71 | }
72 | else
73 | {
74 | StringValue.Text = c.StringValue;
75 | StringValue.TextColor = Color.Default;
76 | }
77 | }
78 |
79 | string DecodeHeartRateCharacteristicValue(byte[] data)
80 | {
81 | ushort bpm = 0;
82 | if ((data [0] & 0x01) == 0)
83 | {
84 | bpm = data [1];
85 | }
86 | else
87 | {
88 | bpm = (ushort)data [1];
89 | bpm = (ushort)(((bpm >> 8) & 0xFF) | ((bpm << 8) & 0xFF00));
90 | }
91 | return bpm.ToString () + " bpm";
92 | }
93 | }
94 | }
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Pages/CharacteristicDetail_TISensor.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 | 10,10,10,10
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Pages/CharacteristicDetail_TISwitch.xaml:
--------------------------------------------------------------------------------
1 |
2 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Pages/CharacteristicDetail_TISwitch.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using Xamarin.Forms;
5 | using Robotics.Mobile.Core.Bluetooth.LE;
6 | using System.Diagnostics;
7 |
8 | namespace BLEExplorer.Pages
9 | {
10 | /*
11 | * this page is specifically for the on/off capabilities of the
12 | * TI Sensor Tag characteristics. It should only be pushed by the listview
13 | * when the correct type of characteristic is detected.
14 | */
15 | public partial class CharacteristicDetail_TISwitch : ContentPage
16 | {
17 | ICharacteristic characteristic;
18 |
19 | public CharacteristicDetail_TISwitch (IAdapter adapter, IDevice device, IService service, ICharacteristic characteristic)
20 | {
21 | InitializeComponent ();
22 | this.characteristic = characteristic;
23 | }
24 |
25 | protected override async void OnAppearing ()
26 | {
27 | base.OnAppearing ();
28 | Debug.WriteLine ("ReadAsync: " + characteristic.Name);
29 | if (characteristic.CanRead) {
30 | var c = await characteristic.ReadAsync();
31 | UpdateDisplay(c);
32 | if (c.Value[0] == 0x00) {
33 | Enabled.IsToggled = false;
34 | } else {
35 | Enabled.IsToggled = true;
36 | }
37 | }
38 | // assign the event handler AFTER setting the intial value
39 | Enabled.Toggled += SwitchToggled;
40 | }
41 | protected override void OnDisappearing ()
42 | {
43 | base.OnDisappearing ();
44 | Enabled.Toggled -= SwitchToggled;
45 | }
46 |
47 | void UpdateDisplay (ICharacteristic c) {
48 | Debug.WriteLine ("UpdateDisplay");
49 | Name.Text = c.Name;
50 | ID.Text = c.ID.PartialFromUuid ();
51 |
52 | var s = (from i in c.Value
53 | select i.ToString ("X").PadRight(2, '0')).ToArray ();
54 | RawValue.Text = string.Join (":", s);
55 | StringValue.Text = c.StringValue;
56 | }
57 |
58 | async void SwitchToggled (object sender, ToggledEventArgs e) {
59 | Debug.WriteLine("Switching: " + characteristic.ID.PartialFromUuid ());
60 | if (e.Value) {
61 | if (characteristic.ID.PartialFromUuid () == "0xaa52") // gyroscope on/off
62 | characteristic.Write (new byte[] { 0x07 }); // enable XYZ axes
63 | else if (characteristic.ID.PartialFromUuid () == "0xaa23") // humidity period
64 | characteristic.Write (new byte[] { 0x02 }); //
65 | else
66 | characteristic.Write (new byte[] { 0x01 });
67 | } else {
68 | // OFF
69 | characteristic.Write (new byte[] { 0x00 });
70 | }
71 | var c = await characteristic.ReadAsync();
72 | UpdateDisplay(c);
73 | }
74 | }
75 | }
76 |
77 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Pages/CharacteristicList.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Pages/DeviceList.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Pages/ServiceList.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Pages/TxRx.xaml:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Pages/TxRx.xaml.cs:
--------------------------------------------------------------------------------
1 | using Robotics.Mobile.Core.Bluetooth.LE;
2 | using Xamarin.Forms;
3 |
4 | namespace BLEExplorer.Pages
5 | {
6 | public partial class TxRx : ContentPage
7 | {
8 | ICharacteristic characteristic;
9 | public TxRx(ICharacteristic characteristic)
10 | {
11 | InitializeComponent();
12 |
13 | this.characteristic = characteristic;
14 |
15 | var result = characteristic.Properties & CharacteristicPropertyType.Notify;
16 |
17 | if(characteristic.CanRead)
18 | {
19 | characteristic.StartUpdates();
20 | characteristic.ValueUpdated += CharacteristicValueUpdated;
21 | }
22 |
23 | if ((characteristic.Properties & CharacteristicPropertyType.Notify) != 0)
24 | {
25 |
26 | }
27 |
28 | btnSend.Clicked += BtnSendClicked;
29 | }
30 |
31 | void BtnSendClicked(object sender, System.EventArgs e)
32 | {
33 | var data = System.Text.Encoding.UTF8.GetBytes(entryMessage.Text);
34 |
35 | if (characteristic.CanWrite)
36 | characteristic.Write(data);
37 | }
38 |
39 | private void CharacteristicValueUpdated(object sender, CharacteristicReadEventArgs e)
40 | {
41 | string msg = string.Empty;
42 |
43 | if(switchShowAsText.IsToggled == true)
44 | {
45 | msg = new string(System.Text.Encoding.UTF8.GetChars(e.Characteristic.Value));
46 | }
47 | else
48 | {
49 | var count = e.Characteristic.Value.Length;
50 |
51 | for (var i = 0; i < count; i++)
52 | {
53 | msg += e.Characteristic.Value[i] + " ";
54 | }
55 | }
56 |
57 | Device.BeginInvokeOnMainThread(()=> entryReceived.Text = msg);
58 | }
59 | }
60 | }
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Resources;
2 | using System.Reflection;
3 | using System.Runtime.CompilerServices;
4 | using System.Runtime.InteropServices;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("BLEExplorer")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("BLEExplorer")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: NeutralResourcesLanguage("en")]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | //
26 | // You can specify all the values or you can default the Build and Revision Numbers
27 | // by using the '*' as shown below:
28 | // [assembly: AssemblyVersion("1.0.*")]
29 | [assembly: AssemblyVersion("1.0.0.0")]
30 | [assembly: AssemblyFileVersion("1.0.0.0")]
31 |
--------------------------------------------------------------------------------
/Sample Apps/BLE Explorer/BLEExplorer/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/BluetoothKnownItemManager.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Robotics.Mobile.Core.Bluetooth.LE
4 | {
5 | public class BluetoothKnownItemManager
6 | {
7 | public BluetoothKnownItemManager ()
8 | {
9 | }
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/CharacteristicPropertyType.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Robotics.Mobile.Core.Bluetooth.LE
4 | {
5 | [Flags]
6 | public enum CharacteristicPropertyType
7 | {
8 | //Superset
9 | Broadcast = 1, //0x1
10 | Read = 2, //0x2
11 | AppleWriteWithoutResponse = 4, //0x4
12 | WriteWithoutResponse = 8, //0x8
13 | Notify = 16, //0x10
14 | Indicate = 32, //0x20
15 | AuthenticatedSignedWrites = 64, //0x40
16 | ExtendedProperties = 128, //0x80
17 | NotifyEncryptionRequired = 256, //0x100
18 | IndicateEncryptionRequired = 512, //0x200
19 |
20 | //APPLE:
21 | // Broadcast = 0x01,
22 | // Read = 0x02,
23 | // WriteWithoutResponse = 0x04,
24 | // PropertyWrite = 0x08,
25 | // Notify = 0x10,
26 | // Indicate = 0x20,
27 | // AuthenticatedSignedWrites = 0x40,
28 | // ExtendedProperties = 0x80,
29 | // NotifyEncryptionRequired = 0x100,
30 | // IndicateEncryptionRequired = 0x200,
31 |
32 | //ANDROID:
33 | // Broadcast = 1, //0x1
34 | // Read = 2, //0x2
35 | // Write = 8, //0x8
36 | // Notify = 16, //0x10
37 | // Indicate = 32, //0x20
38 | // SignedWrite = 64, //0x40
39 | // ExtendedProperties = 128, //0x80
40 | }
41 | }
42 |
43 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/CharacteristicReadEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Robotics.Mobile.Core.Bluetooth.LE
4 | {
5 | public class CharacteristicReadEventArgs : EventArgs
6 | {
7 | public ICharacteristic Characteristic { get; set; }
8 |
9 | public CharacteristicReadEventArgs ()
10 | {
11 | }
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/DeviceBase.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Robotics.Mobile.Core.Bluetooth.LE
5 | {
6 | public abstract class DeviceBase : IDevice
7 | {
8 | public virtual event EventHandler ServicesDiscovered = delegate {};
9 |
10 | public virtual Guid ID {
11 | get {
12 | throw new NotImplementedException ();
13 | }
14 | }
15 |
16 | public virtual string Name {
17 | get {
18 | throw new NotImplementedException ();
19 | }
20 | }
21 |
22 | public virtual int Rssi {
23 | get {
24 | throw new NotImplementedException ();
25 | }
26 | }
27 |
28 | public virtual DeviceState State {
29 | get {
30 | throw new NotImplementedException ();
31 | }
32 | }
33 |
34 | public virtual object NativeDevice {
35 | get {
36 | throw new NotImplementedException ();
37 | }
38 | }
39 |
40 | public virtual IList Services
41 | {
42 | get { throw new NotImplementedException (); }
43 | }
44 |
45 | public override string ToString()
46 | {
47 | return this.Name;
48 | }
49 |
50 | public virtual void DiscoverServices()
51 | {
52 | throw new NotImplementedException ();
53 | }
54 |
55 | }
56 | }
57 |
58 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/DeviceConnectionEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Robotics.Mobile.Core.Bluetooth.LE
4 | {
5 | public class DeviceConnectionEventArgs : EventArgs
6 | {
7 | public IDevice Device;
8 | public string ErrorMessage;
9 |
10 | public DeviceConnectionEventArgs() : base()
11 | {}
12 | }
13 | }
14 |
15 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/DeviceDiscoveredEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Robotics.Mobile.Core.Bluetooth.LE
4 | {
5 | public class DeviceDiscoveredEventArgs : EventArgs
6 | {
7 | public IDevice Device;
8 |
9 | public DeviceDiscoveredEventArgs() : base()
10 | {}
11 | }
12 | }
13 |
14 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/DeviceState.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Robotics.Mobile.Core.Bluetooth.LE
4 | {
5 | public enum DeviceState
6 | {
7 | Disconnected,
8 | Connecting,
9 | Connected
10 | }
11 | }
12 |
13 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/IAdapter.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Robotics.Mobile.Core.Bluetooth.LE
5 | {
6 | public interface IAdapter
7 | {
8 | // events
9 | event EventHandler DeviceDiscovered;
10 | event EventHandler DeviceConnected;
11 | event EventHandler DeviceDisconnected;
12 | //TODO: add this
13 | //event EventHandler DeviceFailedToConnect;
14 | event EventHandler ScanTimeoutElapsed;
15 | //TODO: add this
16 | //event EventHandler ConnectTimeoutElapsed;
17 |
18 | // properties
19 | bool IsScanning { get; }
20 | IList DiscoveredDevices { get; }
21 | IList ConnectedDevices { get; }
22 |
23 | // methods
24 | void StartScanningForDevices ();
25 | void StartScanningForDevices (Guid serviceUuid);
26 |
27 | void StopScanningForDevices ();
28 | void ConnectToDevice (IDevice device);
29 | void DisconnectDevice (IDevice device);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/ICharacteristic.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Threading.Tasks;
4 |
5 | namespace Robotics.Mobile.Core.Bluetooth.LE
6 | {
7 | public interface ICharacteristic
8 | {
9 | // events
10 | event EventHandler ValueUpdated;
11 |
12 | // properties
13 | Guid ID { get; }
14 | string Uuid { get; }
15 | byte[] Value { get; }
16 | string StringValue { get; }
17 | IList Descriptors { get; }
18 | object NativeCharacteristic { get; }
19 | string Name { get; }
20 | CharacteristicPropertyType Properties { get; }
21 |
22 | bool CanRead { get; }
23 | bool CanUpdate { get; }
24 | bool CanWrite { get; }
25 |
26 | // methods
27 | // void EnumerateDescriptors ();
28 |
29 | void StartUpdates();
30 |
31 | void StopUpdates();
32 |
33 | Task ReadAsync ();
34 |
35 | void Write (byte[] data);
36 |
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/IDescriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Robotics.Mobile.Core.Bluetooth.LE
4 | {
5 | public interface IDescriptor
6 | {
7 | object NativeDescriptor { get; }
8 | Guid ID { get; }
9 | string Name { get; }
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/IDevice.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Robotics.Mobile.Core.Bluetooth.LE
5 | {
6 | public interface IDevice
7 | {
8 | // C# got a lot of things right. Interfaces aren't one of those things.
9 | //IDevice(object nativeDevice);
10 |
11 | event EventHandler ServicesDiscovered;
12 |
13 | //TODO: should this be string or GUID? i think for our purposes, UUID on both plats
14 | // is fine as a GUID
15 | Guid ID { get; }
16 | string Name { get; }
17 | ///
18 | /// Gets the Received Signal Strenth Indicator (RSSI).
19 | ///
20 | /// The RSSI in decibals.
21 | int Rssi { get; }
22 | ///
23 | /// Gets the native device object reference. Should be cast to the
24 | /// appropriate type on each platform.
25 | ///
26 | /// The native device.
27 | object NativeDevice { get; }
28 | DeviceState State { get; }
29 |
30 | // fuck. i hate c# sometimes. interfaces can't have constructors
31 | // or static contracts
32 | //static IDevice FromNativeDevice (object nativeDevice);
33 |
34 | IList Services { get; }
35 | void DiscoverServices();
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/IService.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 |
4 | namespace Robotics.Mobile.Core.Bluetooth.LE
5 | {
6 | public interface IService
7 | {
8 | event EventHandler CharacteristicsDiscovered;
9 |
10 | Guid ID { get; }
11 | String Name { get; }
12 | bool IsPrimary { get; } // iOS only?
13 | IList Characteristics { get; }
14 |
15 | ICharacteristic FindCharacteristic (KnownCharacteristic characteristic);
16 | //IDictionary Characteristics { get; }
17 | void DiscoverCharacteristics ();
18 | }
19 | }
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/KnownCharacteristics.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Robotics.Mobile.Core.Utils;
4 | using Newtonsoft.Json.Linq;
5 | using System.Reflection;
6 | using System.Linq;
7 |
8 | namespace Robotics.Mobile.Core.Bluetooth.LE
9 | {
10 | // Source: https://developer.bluetooth.org/gatt/characteristics/Pages/CharacteristicsHome.aspx
11 | public static class KnownCharacteristics
12 | {
13 | private static Dictionary items;
14 | private static object myLock = new object();
15 |
16 | static KnownCharacteristics ()
17 | {
18 | }
19 |
20 | public static KnownCharacteristic Lookup(Guid id)
21 | {
22 | lock (myLock)
23 | {
24 | if (items == null)
25 | LoadItemsFromJson ();
26 | }
27 |
28 | if (items.ContainsKey (id))
29 | return items [id];
30 | else
31 | return new KnownCharacteristic { Name = "Unknown", ID = Guid.Empty };
32 | }
33 |
34 | public static void LoadItemsFromJson()
35 | {
36 | items = new Dictionary ();
37 | //TODO: switch over to CharacteristicStack.Text when it gets bound.
38 | KnownCharacteristic characteristic;
39 |
40 |
41 | string itemsJson = ResourceLoader.GetEmbeddedResourceString (typeof(KnownCharacteristics).GetTypeInfo ().Assembly, "KnownCharacteristics.json");
42 |
43 | var json = JValue.Parse (itemsJson);
44 |
45 | foreach (var item in json.Children() )
46 | {
47 | JProperty prop = item as JProperty;
48 | characteristic = new KnownCharacteristic ()
49 | { Name = prop.Value.ToString(), ID = Guid.ParseExact (prop.Name, "d") };
50 |
51 | items.Add (characteristic.ID, characteristic);
52 | }
53 | }
54 |
55 | //for Windows Phone 8 Silverlight
56 | public static IList GetCharacteristics()
57 | {
58 | return items.Values.ToList();
59 | }
60 | }
61 |
62 | public struct KnownCharacteristic
63 | {
64 | public string Name;
65 | public Guid ID;
66 | }
67 | }
68 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/KnownDescriptors.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Robotics.Mobile.Core.Utils;
4 | using Newtonsoft.Json.Linq;
5 | using System.Reflection;
6 | using System.Linq;
7 |
8 | namespace Robotics.Mobile.Core.Bluetooth.LE
9 | {
10 | // Source: https://developer.bluetooth.org/gatt/descriptors/Pages/DescriptorsHomePage.aspx
11 | public static class KnownDescriptors
12 | {
13 | private static Dictionary items;
14 | private static object bleLock = new object();
15 |
16 | static KnownDescriptors ()
17 | { }
18 |
19 | public static KnownDescriptor Lookup(Guid id)
20 | {
21 | lock (bleLock)
22 | {
23 | if (items == null)
24 | LoadItemsFromJson ();
25 | }
26 |
27 | if (items.ContainsKey (id))
28 | return items [id];
29 | else
30 | return new KnownDescriptor { Name = "Unknown", ID = Guid.Empty };
31 | }
32 |
33 | public static void LoadItemsFromJson()
34 | {
35 | items = new Dictionary ();
36 | //TODO: switch over to DescriptorStack.Text when it gets bound.
37 | KnownDescriptor descriptor;
38 |
39 | string itemsJson = ResourceLoader.GetEmbeddedResourceString (typeof(KnownDescriptors).GetTypeInfo ().Assembly, "KnownDescriptors.json");
40 |
41 | var json = JValue.Parse (itemsJson);
42 |
43 | foreach (var item in json.Children() )
44 | {
45 | JProperty prop = item as JProperty;
46 | descriptor = new KnownDescriptor () { Name = prop.Value.ToString(), ID = Guid.ParseExact (prop.Name, "d") };
47 | items.Add (descriptor.ID, descriptor);
48 | }
49 | }
50 |
51 | public static IList GetDescriptors ()
52 | {
53 | return items.Values.ToList();
54 | }
55 | }
56 |
57 | public struct KnownDescriptor
58 | {
59 | public string Name;
60 | public Guid ID;
61 | }
62 | }
63 |
64 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/KnownDescriptors.json:
--------------------------------------------------------------------------------
1 | {
2 | "00002900-0000-1000-8000-00805f9b34fb":"Characteristic Extended Properties",
3 | "00002901-0000-1000-8000-00805f9b34fb":"Characteristic User Description",
4 | "00002902-0000-1000-8000-00805f9b34fb":"Client Characteristic Configuration",
5 | "00002903-0000-1000-8000-00805f9b34fb":"Server Characteristic Configuration",
6 | "00002904-0000-1000-8000-00805f9b34fb":"Characteristic Presentation Format",
7 | "00002905-0000-1000-8000-00805f9b34fb":"Characteristic Aggregate Format",
8 | "00002906-0000-1000-8000-00805f9b34fb":"Valid Range",
9 | "00002907-0000-1000-8000-00805f9b34fb":"External Report Reference",
10 | "00002908-0000-1000-8000-00805f9b34fb":"Export Reference"
11 | }
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/KnownServices.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Text;
4 | using System.Reflection;
5 | using Newtonsoft.Json;
6 | using Newtonsoft.Json.Linq;
7 | using Robotics.Mobile.Core.Utils;
8 |
9 | namespace Robotics.Mobile.Core.Bluetooth.LE
10 | {
11 | // Source: https://developer.bluetooth.org/gatt/services/Pages/ServicesHome.aspx
12 | public static class KnownServices
13 | {
14 | private static Dictionary items;
15 | private static object myLock = new object();
16 |
17 | static KnownServices ()
18 | {
19 |
20 | }
21 |
22 | public static KnownService Lookup(Guid id)
23 | {
24 | lock (myLock)
25 | {
26 | if (items == null)
27 | LoadItemsFromJson ();
28 | }
29 |
30 | if (items.ContainsKey (id))
31 | return items [id];
32 | else
33 | return new KnownService { Name = "Unknown", ID = Guid.Empty };
34 |
35 | }
36 |
37 | public static void LoadItemsFromJson()
38 | {
39 | items = new Dictionary ();
40 | //TODO: switch over to ServiceStack.Text when it gets bound.
41 | KnownService service;
42 |
43 | string itemsJson = ResourceLoader.GetEmbeddedResourceString (typeof(KnownServices).GetTypeInfo ().Assembly, "KnownServices.json");
44 |
45 | var json = JValue.Parse (itemsJson);
46 |
47 | foreach (var item in json.Children() )
48 | {
49 | JProperty prop = item as JProperty;
50 |
51 | service = new KnownService () { Name = prop.Value.ToString(), ID = Guid.ParseExact (prop.Name, "d") };
52 |
53 | items.Add (service.ID, service);
54 | }
55 | }
56 | }
57 |
58 | public struct KnownService
59 | {
60 | public string Name;
61 | public Guid ID;
62 | }
63 | }
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Bluetooth/LE/ServicesDiscoveredEventArgs.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | namespace Robotics.Mobile.Core.Bluetooth.LE
4 | {
5 | public class ServicesDiscoveredEventArgs : EventArgs
6 | {
7 | public ServicesDiscoveredEventArgs () : base ()
8 | {
9 | }
10 | }
11 | }
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 | [assembly: AssemblyTitle ("Robotics.Mobile.Core.Contracts")]
7 | [assembly: AssemblyDescription ("")]
8 | [assembly: AssemblyConfiguration ("")]
9 | [assembly: AssemblyCompany ("")]
10 | [assembly: AssemblyProduct ("")]
11 | [assembly: AssemblyCopyright ("bryancostanich")]
12 | [assembly: AssemblyTrademark ("")]
13 | [assembly: AssemblyCulture ("")]
14 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
15 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
16 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
17 | [assembly: AssemblyVersion ("1.0.*")]
18 | // The following attributes are used to specify the signing key for the assembly,
19 | // if desired. See the Mono documentation for more information about signing.
20 | //[assembly: AssemblyDelaySign(false)]
21 | //[assembly: AssemblyKeyFile("")]
22 |
23 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/packages.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Core/readme.md:
--------------------------------------------------------------------------------
1 | This project will contain the core contracts for the various classes and will be consumed from all projects.
2 |
3 | This will enable us to build a cross-platform Bluetooth adn robotics library that conforms to these contracts.
4 |
5 | By putting it in a separate project, we ensure that there will be no circular references.
6 |
7 | TODO: rename to Core and get rid of the other core project
8 |
9 | Device
10 |
11 | |-> one or more services [broad features]
12 |
13 | |-> one or more characteristics [different values within that feature]
14 |
15 | |-> values that can be read/notified/written
16 |
17 | |-> one or more descriptors that describe a characteristic
18 |
19 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Droid/Bluetooth/LE/Descriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using Android.Bluetooth;
3 |
4 | namespace Robotics.Mobile.Core.Bluetooth.LE
5 | {
6 | public class Descriptor : IDescriptor
7 | {
8 | public /*BluetoothGattDescriptor*/ object NativeDescriptor {
9 | get {
10 | return this._nativeDescriptor as object;
11 | }
12 | } protected BluetoothGattDescriptor _nativeDescriptor;
13 |
14 | public Guid ID {
15 | get {
16 | return Guid.ParseExact(this._nativeDescriptor.Uuid.ToString (), "d");
17 | //return this._nativeDescriptor.Uuid.ToString ();
18 | }
19 | }
20 | public string Name {
21 | get {
22 | if (this._name == null)
23 | this._name = KnownDescriptors.Lookup (this.ID).Name;
24 | return this._name;
25 | }
26 | } protected string _name = null;
27 |
28 | public Descriptor (BluetoothGattDescriptor nativeDescriptor)
29 | {
30 | this._nativeDescriptor = nativeDescriptor;
31 | }
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.axml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.axml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.axml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
45 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.Droid/Resources/values/Strings.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | Robotics.Mobile.Core.Droid
4 |
5 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.UWP/Bluetooth/LE/Descriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using Windows.Devices.Bluetooth.GenericAttributeProfile;
7 |
8 | namespace Robotics.Mobile.Core.Bluetooth.LE
9 | {
10 | public class Descriptor : IDescriptor
11 | {
12 | public object NativeDescriptor
13 | {
14 | get { return this._nativeDescriptor as Object; }
15 | } protected GattDescriptor _nativeDescriptor;
16 |
17 | public Guid ID
18 | {
19 | get { return _nativeDescriptor.Uuid; }
20 | }
21 |
22 | public string Name
23 | {
24 | get
25 | {
26 | if (this._name == null)
27 | this._name = KnownDescriptors.Lookup(this.ID).Name;
28 | return this._name;
29 | }
30 | } protected string _name = null;
31 |
32 | public Descriptor(GattDescriptor nativeDescriptor)
33 | {
34 | this._nativeDescriptor = nativeDescriptor;
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.UWP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Robotics.Mobile.Core.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Robotics.Mobile.Core.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2016")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.UWP/Properties/Robotics.Mobile.Core.UWP.rd.xml:
--------------------------------------------------------------------------------
1 |
2 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.UWP/project.json:
--------------------------------------------------------------------------------
1 | {
2 | "dependencies": {
3 | "Microsoft.NETCore.UniversalWindowsPlatform": "5.2.2",
4 | "Newtonsoft.Json": "10.0.3"
5 | },
6 | "frameworks": {
7 | "uap10.0.10586": {}
8 | },
9 | "runtimes": {
10 | "win10-arm": {},
11 | "win10-arm-aot": {},
12 | "win10-x86": {},
13 | "win10-x86-aot": {},
14 | "win10-x64": {},
15 | "win10-x64-aot": {}
16 | }
17 | }
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.iOS/Bluetooth/LE/Descriptor.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using CoreBluetooth;
3 |
4 | namespace Robotics.Mobile.Core.Bluetooth.LE
5 | {
6 | public class Descriptor : IDescriptor
7 | {
8 | public /*CBDescriptor*/ object NativeDescriptor {
9 | get {
10 | return this._nativeDescriptor as object;
11 | }
12 | } protected CBDescriptor _nativeDescriptor;
13 |
14 | public Guid ID {
15 | get {
16 | //return this._nativeDescriptor.UUID.ToString ();
17 | return Guid.ParseExact(this._nativeDescriptor.UUID.ToString (), "d");
18 | }
19 | }
20 | public string Name {
21 | get {
22 | if (this._name == null)
23 | this._name = KnownDescriptors.Lookup (this.ID).Name;
24 | return this._name;
25 | }
26 | } protected string _name = null;
27 |
28 | public Descriptor (CBDescriptor nativeDescriptor)
29 | {
30 | this._nativeDescriptor = nativeDescriptor;
31 | }
32 | }
33 | }
34 |
35 |
--------------------------------------------------------------------------------
/Source/Monkey.BluetoothLE.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle ("Robotics.Mobile.Core.iOS")]
8 | [assembly: AssemblyDescription ("Unified API")]
9 | [assembly: AssemblyConfiguration ("")]
10 | [assembly: AssemblyCompany ("Xamarin")]
11 | [assembly: AssemblyProduct ("Monkey.Robotics")]
12 | [assembly: AssemblyCopyright ("Xamarin")]
13 | [assembly: AssemblyTrademark ("")]
14 | [assembly: AssemblyCulture ("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion ("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
28 |
--------------------------------------------------------------------------------
/Source/Readme.md:
--------------------------------------------------------------------------------
1 | # Source Code
2 | Welcome to the Source Code section of Robotics.
3 |
4 | * **[Platform Stacks](https://github.com/xamarin/Xamarin.Labs-Robotics/tree/master/Source/Platform%20Stacks)** - The complete set of public libraries needed when writing Xamarin Robotics applications. Includes:
5 | * **Micro Stack** - The library/code that runs on the Microcontroller and provides hardware abstractions for peripherals and sensors.
6 | * **Mobile Stack** - The library/code that can be used in Xamarin mobile applications to communicate to various peripherals and micro-controllers.
7 |
8 | * **[Xamarin Studio Microframework Add-in](https://github.com/xamarin/Xamarin.Labs-Robotics/tree/master/Source/Xamarin%20Studio%20Microframework%20Add-in)** - Add-in for Xamarin Studio (Mac and Windows) that allows deployment to .NET Microframework devices. Includes two projects:
9 | * **[Add-in Project](https://github.com/xamarin/Xamarin.Labs-Robotics/tree/master/Source/Xamarin%20Studio%20Microframework%20Add-in/Add-In%20Project)** - The actual add-in project.
10 | * **[MFMetaDataProcessor](https://github.com/xamarin/Xamarin.Labs-Robotics/tree/master/Source/Xamarin%20Studio%20Microframework%20Add-in/MFMetaDataProcessor)** - Tool to convert .NET .exes into a format that is consumable by .NET MF Microcontrollers. Used by the Xamarin Studio Add-in after building an .exe to create a deployable .NET Microcontroller package.
11 |
12 | * **[Xamarin Mobile Component](https://github.com/xamarin/Xamarin.Labs-Robotics/tree/master/Source/Xamarin%20Mobile%20Component)** - The Xamarin Component Store component project for the Mobile Stack.
13 |
14 | * **Micro Framework Platform Stack NuGet** - Coming soon.
15 |
16 | ## Author Credits
17 |
18 | #### Platform Stacks
19 | Authors: Bryan Costanich, Frank Krueger, Craig Dunn
20 |
21 | #### Xamarin Studio Add-in
22 | Author: David Karlas
23 |
24 | #### MFMetadataProcessor
25 | Author: Oleg Rakhmatulin
26 |
27 | #### Xamarin Mobile Component
28 | Author: Bryan Costanich
--------------------------------------------------------------------------------