Use library in non-android environment #417
Replies: 2 comments
-
So after looking at this, it seems that this library is too android "infested" to be any use to me... So I started looking at its predecessor "norani/libaums-develop". I managed to integrate old project with usb4java and run it on desktop computer (I don't care about partition part, I just need access to SCSI command interface). When we are creating Block device, are we expecting some data back? ` 21:08:10,677 INFO [Usb4JavaUsbDeviceCommunication:69] - BulkOutTransfer (data=[85, 83, 66, 67, 0, 0, 0, 0, 36, 0, 0, 0, -128, 0, 6, 18, 0, 0, 0, 36, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],length=31) 21:08:10,679 INFO [Usb4JavaUsbDeviceCommunication:83] - 31 bytes sent to device 21:08:10,679 INFO [Usb4JavaUsbDeviceCommunication:133] - BulkInTransfer (data=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],length=36) 21:08:10,679 INFO [Usb4JavaUsbDeviceCommunication:149] - 36 bytes read from device 21:08:10,680 DEBUG [Usb4JavaUsbDeviceCommunication:154] - No data: java.nio.DirectByteBuffer[pos=0 lim=36 cap=36] 21:08:10,680 INFO [Usb4JavaUsbDeviceCommunication:133] - BulkInTransfer (data=[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],length=13) 21:08:10,680 INFO [Usb4JavaUsbDeviceCommunication:149] - 13 bytes read from device 21:08:10,680 DEBUG [Usb4JavaUsbDeviceCommunication:154] - No data: java.nio.DirectByteBuffer[pos=0 lim=13 cap=13] 21:08:10,681 ERROR [CommandStatusWrapper:81] - unexpected dCSWSignature 0 You can find my code on dev branch of https://github.com/andyrozman/libaums-usb4java sample is in com.atech.library.usb.libaums.usb4java.examples.ExampleCreateScsiBlockDevice. |
Beta Was this translation helpful? Give feedback.
-
Ok, solved... I will make release soon, if anybody needs library for desktop java. |
Beta Was this translation helpful? Give feedback.
-
Hi !
So I need something like your library (core part), to work on desktop java. But your core has so many dependencies on android specific stuff that I can't even add it to the maven. Woudl it be possible to create core build that wouldn't have all that inside? I will try to exclude android stuff (kotlin,androidx.annotations), but I am not sure if afterwards library will even work.
I need to access USB device (https://protocols.glucometers.tech/lifescan/onetouch-verio-2015) and so far it seems that your library, might do what I need.
Any ideas?
Thanks for answers in advance,
Andy
Beta Was this translation helpful? Give feedback.
All reactions