simplebleexample_by_devicename's People
Forkers
twobobsimplebleexample_by_devicename's Issues
System.ArgumentOutOfRangeException
Copy/Paste from nkolban/esp32-snippets#546
Thanks, I appreciate you time to write this comment. I'm still on an early stage of understanding how everything works. I've downloaded the complete solution from your repo and ran the code. It crashes on line 87 inside MainPage.xaml.cs:
System.ArgumentOutOfRangeException: 'Specified argument was out of the range of valid values.'
Thanks again for the sample, it's indeed very well commented and very helpful.
Edit: Here's what's showing for services variable:
| services | {System.__ComObject} | System.Collections.Generic.IReadOnlyList<Windows.Devices.Bluetooth.GenericAttributeProfile.GattDeviceService> {System.__ComObject}
I've made sure I have entered correct MyService_GUID on line 34. Any help much appreciated.
I believe the code that I was using on my HUZZAH32 (esp32 dev board) was somehow incorrect. I've tried my luck with some other examples, such as BLE_server and BLE_notify:
https://github.com/nkolban/ESP32_BLE_Arduino/tree/master/examples
With both examples, I get Exception from HRESULT: 0x80650003. It comes from line 133:
var descriptorWriteResult = await charac.WriteClientCharacteristicConfigurationDescriptorAsync(descriptorValue);
Here's the console output:
Device found in 299 ms
Signalstrengt = -48 DBm
Ble address = 53526636485438
Advertisement type = ConnectableUndirected
Connected in 40 ms
Service found in 3 ms
Characteristic found in 65 ms
This characteristic supports reading .
This characteristic supports writing .
Exception thrown: 'System.Exception' in System.Private.CoreLib.ni.dll
An exception of type 'System.Exception' occurred in System.Private.CoreLib.ni.dll but was not handled in user code
The attribute cannot be written. (Exception from HRESULT: 0x80650003)
The program '[16784] SimpleBleExample_by_Devicename.exe' has exited with code -1 (0xffffffff).
Possible incorrect result written out in Debug statement
DEbug statement outputs result, I think it should be descriptorWriteResult
Shikhar tandon-folowup from Stack overflow
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.