Git Product home page Git Product logo

evothings-libraries's People

Contributors

adam-h avatar dschrecking avatar fredrikeldh avatar gokr avatar nbezembinder1 avatar psvensson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

evothings-libraries's Issues

hasName() bug in EASYBLE

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!

readDescriptor fails with ReferenceError

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.

Distributing Evothings libraries as single files

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:

  • easyble.dist.js (includes evothings.js, util.js, easyble.js)
  • eddystone.dist.js (includes evothings.js, util.js, easyble.js, eddystone.js)

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.

isConnected returns true on Android after disconnect

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.

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.