mapaiva / react-native-usbserial Goto Github PK
View Code? Open in Web Editor NEWA USB serial React Native bridge
License: MIT License
A USB serial React Native bridge
License: MIT License
I must be doing something wrong, can you point me in the right direction?
undefined is not a constructor(evaluating 'new _reactNativeUsbserial.UsbSerial()')
"dependencies": {
"expo": "^20.0.0",
"react": "16.0.0-alpha.12",
"react-native": "^0.47.0",
"react-native-usbserial": "^1.0.0"
}
Hi,
thanks for great package. It's possible to communicate direct to USB device without driver? I'm trying to connect my Android tablet and POS printer. Unfortunately, I don't have drivers for it.
Hi. I'm using your library and it's working as intended. But since I can't use it on lower versions of android I would like to override it in manifest file just to ignore apk installation error. Wanted to know address of library to put in here: tools:overrideLibrary="com.reactlibrary"
I/ReactNativeJS( 2851): [ { deviceName: '/dev/bus/usb/001/003',
I/ReactNativeJS( 2851): vendorId: 911,
I/ReactNativeJS( 2851): productId: 1345,
I/ReactNativeJS( 2851): deviceId: 1003,
I/ReactNativeJS( 2851): name: '/dev/bus/usb/001/003' },
I/ReactNativeJS( 2851): { deviceName: '/dev/bus/usb/004/003',
I/ReactNativeJS( 2851): vendorId: 11388,
I/ReactNativeJS( 2851): productId: 293,
I/ReactNativeJS( 2851): deviceId: 4003,
I/ReactNativeJS( 2851): name: '/dev/bus/usb/004/003' } ]
No available drivers to communicate with devices
Why i can not connect devices? how should i do?
Error after linking then running react-native run-android
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugCompile'.
> Could not find com.hoho.android:usb-serial-for-android:0.2.0-SNAPSHOT.
Searched in the following locations:
https://jcenter.bintray.com/com/hoho/android/usb-serial-for-android/0.2.0-SNAPSHOT/maven-metadata.xml
https://jcenter.bintray.com/com/hoho/android/usb-serial-for-android/0.2.0-SNAPSHOT/usb-serial-for-android-0.2.0-SNAPSHOT.pom
https://jcenter.bintray.com/com/hoho/android/usb-serial-for-android/0.2.0-SNAPSHOT/usb-serial-for-android-0.2.0-SNAPSHOT.aar
file:/Users/cj/Library/Android/sdk/extras/android/m2repository/com/hoho/android/usb-serial-for-android/0.2.0-SNAPSHOT/maven-metadata.xml
file:/Users/cj/Library/Android/sdk/extras/android/m2repository/com/hoho/android/usb-serial-for-android/0.2.0-SNAPSHOT/usb-serial-for-android-0.2.0-SNAPSHOT.pom
file:/Users/cj/Library/Android/sdk/extras/android/m2repository/com/hoho/android/usb-serial-for-android/0.2.0-SNAPSHOT/usb-serial-for-android-0.2.0-SNAPSHOT.aar
file:/Users/cj/Library/Android/sdk/extras/google/m2repository/com/hoho/android/usb-serial-for-android/0.2.0-SNAPSHOT/maven-metadata.xml
file:/Users/cj/Library/Android/sdk/extras/google/m2repository/com/hoho/android/usb-serial-for-android/0.2.0-SNAPSHOT/usb-serial-for-android-0.2.0-SNAPSHOT.pom
file:/Users/cj/Library/Android/sdk/extras/google/m2repository/com/hoho/android/usb-serial-for-android/0.2.0-SNAPSHOT/usb-serial-for-android-0.2.0-SNAPSHOT.aar
Required by:
MyRewards:app:unspecified > MyRewards:react-native-usbserial:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 12.735 secs
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
(node:2904) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: Cannot read property 'message' of undefined
(node:2904) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
When the module requests USB_PERMISSION the application that is using the module freezes.
Improve this:
if (connection == null) {
PendingIntent mPermissionIntent = PendingIntent.getBroadcast(reactContext,
0,
new Intent("com.android.example.USB_PERMISSION"),
0);
manager.requestPermission(driver.getDevice(), mPermissionIntent);
}
Is there way to know that device on other end is connected or ready to receive data ?
Hello !
Thank you for your work, it's really amazing for what I'm doing !
But there's a problem since React Native 0.6 that cause this error on the call of getDeviceListAsync :
This is caused by the fact that in RN > 0.6, the method WritableArray.pushMap()
does not accept WritableMap
as argument anymore. It accepts only ReadableMap
. I tried to modify the code in order transform it, but my knowledge in RN is too limited to do so...
How can we get through this problem ?
Thank you !
I am getting this warning log upon using this package. Any idea why this is happening?
Hello,
Are you planning on implementing serial read as well? It would make the library extremely useful and complete.
Thanks for your great work
Looks like the NPM package is missing from npm
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.