xseignard / cordovarduino

Cordova/Phonegap plugin for USB host serial communication from an Android device.
MIT License
166 stars 110 forks source link

[Help Wanted] Rewrite the plugin API to match node-serialport API #46

Closed xseignard closed 8 years ago

xseignard commented 8 years ago

Hello, I think it is time to rewrite the API of this plugin to match node-serialport API. Unfortunately, I think I won't have time until few months, so if someone is willing to tackle this issue, I'll be glad to help and provide insights.

After a quick look at potential changes needed, it seem, it can be all done from the js side of this plugin (e.g. only modifying the following file https://github.com/xseignard/cordovarduino/blob/master/www/serial.js). With some extra help of an event emitter lib, it should be fairly simple.

It is not an extensive analysis I did, so I might miss some points, but AFAIK it seems a nice start for someone wanting to contribute to this project!

Come on board!

Regards

ErgEnn commented 8 years ago

Have you made any progress with the rewrite? I am in need for a serial API that works for both windows and android and as I understand, using serialport api would make that possible. I have already tried to make it work in my own cordova app, but with no success. I had issues with require() function. Maybe I did something dumb myself.

xseignard commented 8 years ago

Yes you did :)

You cannot use serialport in a cordova app. My idea is to provide the same API (i.e. function names and behavior) as serialport.

Doing it would be nice since it would give a seamless experience writing code in node.js and in cordova.

For now I don't have time and motivation to do it.