Comments (8)
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.
@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 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.
@energywave All I can suggest is to start with some breakpoints in the code and see why that exception is being raised.
from usbserialforandroid.
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.
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.
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.
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)
- Move from LGPL to MIT license HOT 3
- Build error: Java.Interop version conflicts HOT 2
- FTDI driver only reads NUL bytes HOT 3
- CdcAcmSerialDriver cannot be instantiated from ProbeDevice due to no matching constructor signature HOT 6
- Porting to .NET MAUI? HOT 2
- CdcAcmSerialDriver resolves wrong interfaces In/Out HOT 1
- Dotnet6 MAUI support HOT 4
- The bulkTransfer supports offsets HOT 4
- STM devices HOT 1
- Ftdi throws error on Read method HOT 2
- assembly is not a valid attribute location
- Would it be possible to get an example of a simple write() command? HOT 3
- 921600 bauds support ? HOT 3
- ControlTransfer with value 8 failed -1 HOT 1
- Error loading project properties editor HOT 4
- USBManager USB list permission works till next device restart HOT 2
- Requesting Permission has been failed on Android 14 HOT 9
- IOException for Prolific PL2303GT (prodId 9155 / 0x23c3) HOT 1
- CP21xx driver, does not work on it's own when there are multiple interfaces/ports
- Incorrect interface Id for STM32 driver HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from usbserialforandroid.