Coder Social home page Coder Social logo

simplebleexample_by_devicename's People

Contributors

grooverfromholland avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

twobob

simplebleexample_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).

Shikhar tandon-folowup from Stack overflow

Hi
Sometimes randomly o running your code i get this exception also:
image
capture
Operation Aborted(Exception from HRESULT).....
in
var notifyResult = await charac.WriteClientCharacteristicConfigurationDescriptorWithResultAsync(GattClientCharacteristicConfigurationDescriptorValue.Indicate);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.