Giter Club home page Giter Club logo

react-native-usbserial's Introduction

Hey, I'm Matheus! πŸ‘‹

πŸ€“ Software Engineer & Team Leader at @Avenue
πŸ‡§πŸ‡· Born in FernandΓ³polis, Brazil
πŸ‡§πŸ‡· Living in SΓ£o Paulo, Brazil

Find me elsewhere 🌎

πŸš€ Site
🐦 Twitter
πŸ“Έ Instagram
πŸ’Ό LinkedIn

react-native-usbserial's People

Contributors

mapaiva avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

react-native-usbserial's Issues

Package build error when running react-native

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.

undefined is not a constructor

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"
  }

overrideLibrary address in manifest.xml

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"

No available drivers to communicate with devices

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?

null is not an object (evaluating 'UsbSerialModule.getDeviceListAsync')

I am getting this warning log upon using this package. Any idea why this is happening?

  • node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
  • node_modules/regenerator-runtime/runtime.js:274:30 in invoke
  • node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
  • node_modules/regenerator-runtime/runtime.js:135:28 in invoke
  • node_modules/regenerator-runtime/runtime.js:170:17 in PromiseImpl$argument_0
  • node_modules/promise/setimmediate/core.js:45:7 in tryCallTwo
  • node_modules/promise/setimmediate/core.js:200:23 in doResolve
  • node_modules/promise/setimmediate/core.js:66:12 in Promise
  • node_modules/regenerator-runtime/runtime.js:169:31 in PromiseImpl$argument_0
  • node_modules/regenerator-runtime/runtime.js:192:38 in enqueue
  • node_modules/regenerator-runtime/runtime.js:219:8 in exports.async
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:10696:27 in renderWithHooks
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:13481:6 in mountIndeterminateComponent
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:20459:25 in beginWork$$1
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:19370:24 in performUnitOfWork
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:19347:39 in workLoopSync
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18997:22 in renderRoot
  • [native code]:null in renderRoot
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18709:28 in runRootCallback
  • [native code]:null in runRootCallback
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5642:32 in runWithPriority$argument_1
  • node_modules/scheduler/cjs/scheduler.development.js:643:23 in unstable_runWithPriority
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5638:22 in flushSyncCallbackQueueImpl
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5627:28 in flushSyncCallbackQueue
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18556:30 in scheduleUpdateOnFiber
  • node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:11484:17 in dispatchAction
  • [native code]:null in dispatchAction
  • App.js:22:4 in loadResourcesAndDataAsync
  • node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
  • node_modules/regenerator-runtime/runtime.js:274:30 in invoke
  • node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
  • node_modules/regenerator-runtime/runtime.js:135:28 in invoke
  • node_modules/regenerator-runtime/runtime.js:145:19 in PromiseImpl.resolve.then$argument_0
  • node_modules/promise/setimmediate/core.js:37:14 in tryCallOne
  • node_modules/promise/setimmediate/core.js:123:25 in setImmediate$argument_0
  • node_modules/react-native/Libraries/Core/Timers/JSTimers.js:146:14 in _callTimer
  • node_modules/react-native/Libraries/Core/Timers/JSTimers.js:194:17 in _callImmediatesPass
  • node_modules/react-native/Libraries/Core/Timers/JSTimers.js:458:30 in callImmediates
  • [native code]:null in callImmediates
  • node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:407:6 in __callImmediates
  • node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:143:6 in __guard$argument_0
  • node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:10 in __guard
  • node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:142:17 in __guard$argument_0
  • [native code]:null in flushedQueue
  • [native code]:null in invokeCallbackAndReturnFlushedQueue

No interface method pushMap

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 :

Screenshot_20210428_185608.jpg

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 !

Direct raw message without Drivers?

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.

Read data from serial

Hello,

Are you planning on implementing serial read as well? It would make the library extremely useful and complete.

Thanks for your great work

Better permission request handler

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);
        }

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.