evothings / evothings-libraries Goto Github PK
View Code? Open in Web Editor NEWEvothings Studio Libraries
License: Apache License 2.0
Evothings Studio Libraries
License: Apache License 2.0
The Cordova BLE plugin has been updated to automatically turn on/off the notification config descriptor when enabling/disabling notifications.
This means that code that turns on/off the config descriptor is no longer needed and should be removed from example apps and libraries.
Related repositories:
In the easyble.dist.js file:
device.hasName = function(name)
{
// If there is a device name present in advertisement data,
// check if this matches. (This name is not cached by iOS.)
var deviceName = device.advertisementData ?
device.advertisementData.kCBAdvDataLocalName : false;
if (deviceName)
{
return 0 == deviceName.indexOf(name);
}
// Otherwise check if device.name matches (cached by iOS,
// might not match if device name is updated).
return name = device.name;
};
Don't you want == on that return statement?
Cheers!
Call like this:
device.readDescriptor(MY_UUID,"00002902-0000-1000-8000-00805f9b34fb",app.ui.displayStatus,app.ui.displayStatus)
Fails with ReferenceError: value is not defined.
easyble readDescriptor implementation is passing 'value' to the call to evothings.ble.readDescriptor which appears to be wrong based on other calls to that same function.
Several of the libraries for Arduino/Norduc/RFDuino etc are not really libraries in the proper sense (generalized/reusable code), they are more like helper functions that could just as well belong to the application.
Review these libraries and move them to examples if needed, then also remove them from the generated library documentation package in https://github.com/evothings/evothings-doc
Problem:
The current Evothings library structure requires adding several folders to the application project (and knowing which ones to add). It can be confusing to understand which files/folders are needed (people have reported problems with this). The current async file loading mechanism is not transparent.
Solution:
To make it easier to use Evothings libraries, it is suggested that libraries are packages as single distribution files.
As a first step, starting with these two libraries is suggested:
It is then sufficient to download and include e.g. easyble.dist.js in index.html to have everything needed to use the EasyBLE library.
If including both libraries in index.html, the most recently included library would overwrite functions already added to the evothings namespace object. In most cases this would not result in errors. This is however a flaw and potential problem with this solution. It could be resolved in various ways however.
Similar packaging can be done with the TI SensorTag library and the Dialog IoT Sensor library.
We can then use bower and other package systems to distribute libraries.
EASYBLE isConnected() method stills returns true after device is disconnected on android. Works as expected on iOS. I call isConnected() immediately after receiving a connectErrorCallback with "EASYBLE_ERROR_DISCONNECTED" (which i forced by pulling the batteries on my BLE device)
Not sure what other info might be helpful. If there is something else that, please let me know.
Writing a module which exposes easy to use services and/or directives for angular/ionic that expose evothings bluetooth or easyble.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.