Provisioning Nymi band from Android app

235 views Asked by At

I am trying to provision the Nymi band from my android app. I am using the sample code from the Nymi Android SDK 2.0 (Can be downloaded from here:). I removed all the code related to the Nymulator(Nymi band emulator). I want to test the provisioning with the real Nymi band. However,when I click the provision button, the app get crashed. I tried to debug it with the exception breakpoints and I got the "getsockopt errno 88" error in my debugger:

I am attaching the screenshot too.enter image description here

I did some research on google , and found that the errno 88 is

#define ENOTSOCK    88  /* Socket operation on non-socket */

During the app launch, I see the following message in the Debug Console:

Connected to the target VM, address: 'localhost:8604', transport: 'socket'

which I think,the connection to socket is fine. I am not sure,what makes the socket connection go wrong later.

This is what I see in my LOgCat after I click the provision button:(I am posting only some part of the error message,because the error message in Logcat is way too long) enter image description here

Edit: I added some breakpoints,and I found where the app is crashing. I found this code:

    try {
        System.loadLibrary("_nymi_sdk_net");
        _loaded = true;
    } catch (UnsatisfiedLinkError var6) {
        return false;
    }

At system.load library, I am getting the error.

Edit 2: I changed the libraries from net to native ,as net is for emulators and native is for device. This time new error occurs at the same line:System.loadLibrary("_nymi_sdk");

Screenshot:enter image description here

1

There are 1 answers

10
vzsg On BEST ANSWER

(Disclaimer: I know nothing of this SDK or the band, and this answer is just a speculation. And I've deleted my earlier answer as it was a missed shot in the dark.)

There is a minor hint in the SDK's README.md:

Prerequisites:

  • Android Development:
    • [...]
    • To use the BasicExample app with a Nymi Band, the NCL library in Examples\BasicExample\libs must be replaces with the native library in NCL\native\libs

You must remove all files and folders from BasicExample\libs and copy all files from NCL\native\libs there instead.

(I wonder why they didn't emphasize this much harder...)

So the libs folder should contain the following folders and files:

Screenshot of the file tree in the example project