Git Product home page Git Product logo

Comments (8)

energywave avatar energywave commented on June 29, 2024

An update after several tests.
In further trials I didn't got the ErrorReceived event, I could open the port but then... nothing happens.
This is my log fragment, in the hope it can be useful...

19/11/2021 19.34.39 [USB] Init...
19/11/2021 19.34.39 [USB] FindAllDrivers...
19/11/2021 19.34.39   [USB DRV] /dev/bus/usb/001/019 Comm:1019
19/11/2021 19.34.39     [USB DRV PORT] <CdcAcmSerialPort device_name=/dev/bus/usb/001/019 device_id=1019 port_number=0>. Requesting user permission...
19/11/2021 19.34.40     [USB DRV PORT] Initializing SerialInputOutputManager...
19/11/2021 19.34.40     [USB DRV PORT] opening...
19/11/2021 19.34.40     [USB DRV PORT] open!

I can even post my code, if of interest.

from usbserialforandroid.

anotherlab avatar anotherlab commented on June 29, 2024

@energywave Are you getting this error with the example application that is included with this repo? If you are using that code, I would check to make sure the serial ports are correct.

from usbserialforandroid.

energywave avatar energywave commented on June 29, 2024

@energywave Are you getting this error with the example application that is included with this repo?

The log is generated from my app. The code is derived from your example app as it's the only source to understand how to use it. I believe it's correct as I can correctly arrive to open the serial device. In my case I expect only one usb device connected so I cycle between drivers / devices / port, when I find one I use it, and that's the only port / device / driver detected.

If you are using that code, I would check to make sure the serial ports are correct.

As a double check I even modified your source just to add my USB device like this:
table.AddProduct(0xAC90, 0x3003, typeof(CdcAcmSerialDriver)); // Eyoyo 2D code reader
but the behavior is the same. I can correctly open the port by clicking on the item but then nothing happens when I read a QR Code.

I've tried at 115.200 N81 settings like your example as well as 19200 N81, like SimpleUsbTerminal is doing (as there the data are coming in, even if there is some buffer underrun problem, as some chars ar randomly replaced by "^", but that's another story)

If you can think about something I could test I will thenk you so much... I'm lost.

from usbserialforandroid.

anotherlab avatar anotherlab commented on June 29, 2024

@energywave All I can suggest is to start with some breakpoints in the code and see why that exception is being raised.

from usbserialforandroid.

energywave avatar energywave commented on June 29, 2024

But all the times no exception is thrown, the port is open but DataReceived event is simply never called. I tried again and that error was a one shot only, never came again.
I could try with breakpoints in the Cdc driver but, hey, that's a little overkill... :) Thank you anyway for your reply, I understand it's not simply to help in such a condition :'(

from usbserialforandroid.

TiisangMguni avatar TiisangMguni commented on June 29, 2024

Hi @energywave, we are encountering very similar issues as you using an Arduino Leonardo ETH device and running the sample App. Did you make any progress with this issue?

from usbserialforandroid.

anotherlab avatar anotherlab commented on June 29, 2024

One thing that you could try is to write a simple Windows desktop app that connects to the reader. Completely different code base, but it would provide a faster way to verify the comm settings and set a baseline for what should come over the wire. Also, much easier to debug.

from usbserialforandroid.

energywave avatar energywave commented on June 29, 2024

Did you make any progress with this issue?

For that project I could not stay days to understand how to do a simple serial communication that, like @anotherlab correctly says, is straightforward on every other platform.
I had thus to abandone the project by changing the hardware and communicating in TCP/IP.
Sorry I cannot add something useful :(

from usbserialforandroid.

Related Issues (20)

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.