Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error Opening SMBusb: libusb error -11 #14

Closed
tremez opened this issue Oct 6, 2019 · 8 comments
Closed

Error Opening SMBusb: libusb error -11 #14

tremez opened this issue Oct 6, 2019 · 8 comments

Comments

@tremez
Copy link

tremez commented Oct 6, 2019

Hi
I am constantly getting following error :
Error Opening SMBusb: libusb error -11
both for smbusb_sbsreport and smbusb_scan

Device is enumerated as
Bus 001 Device 006: ID 04b4:8613 Cypress Semiconductor Corp. CY7C68013 EZ-USB FX2 USB 2.0 Development Kit

Any assistance is appreciated

@0r10nV
Copy link
Contributor

0r10nV commented Nov 26, 2019

If you are working in Linux check permissions.
Same issue was solved here.

http://www.karosium.com/2016/08/hacking-bq8030-with-sanyo-firmware.html?showComment=1511814009888#c8945243386522181427

@tremez
Copy link
Author

tremez commented Nov 28, 2019

I am running under root in the Virtualbox VM
There are no errors in dmesg
[Thu Nov 28 13:55:10 2019] usb 1-1: new high-speed USB device number 3 using ehci-pci
[Thu Nov 28 13:55:11 2019] usb 1-1: New USB device found, idVendor=04b4, idProduct=8613
[Thu Nov 28 13:55:11 2019] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
lsusb
Bus 001 Device 003: ID 04b4:8613 Cypress Semiconductor Corp. CY7C68013 EZ-USB FX2 USB 2.0 Development Kit

root@bubuntu:# smbusb_sbsreport
Error Opening SMBusb: libusb error -11
root@bubuntu:
#

@tremez
Copy link
Author

tremez commented Nov 28, 2019

Tried sigrok on same VM - all works like a charm

@tremez
Copy link
Author

tremez commented Nov 28, 2019

error -11 sound like LIBUSB_ERROR_NO_MEM

@tremez
Copy link
Author

tremez commented Nov 28, 2019

After some random manipulations i see that device ID have changed to SMBUsb and following dat a was received
SMBusb Firmware Version: 1.0.1

Manufacturer Name: ERROR
Device Name: ERROR
Device Chemistry: ERROR
Serial Number: 4294967287
Manufacture Date: 8390587.15.23

Manufacturer Access: fffffff7
Remaining Capacity Alarm: 4294967287 mAh(/10mWh)
Remaining Time Alarm: 4294967287 min
Battery Mode: fffffff7
At Rate: -9 mAh(/10mWh)
At Rate Time To Full: 4294967287 min
At Rate Time To Empty: 4294967287 min
At Rate OK: 4294967287
Temperature: -274.05 degC
Voltage: 4294967287 mV
Current: -9 mA
Average Current: -9 mA
Max Error: 4294967287 %
Relative State Of Charge 4294967287 %
Absolute State Of Charge 4294967287 %
Remaining Capacity: 4294967287 mAh(/10mWh)
Full Charge Capacity: 4294967287 mAh(/10mWh)
Run Time To Empty: 4294967287 min
Average Time To Empty: 4294967287 min
Average Time To Full: 4294967287 min
Charging Current: 4294967287 mA
Charging Voltage: 4294967287 mV
Battery Status: fffffff7
Cycle Count: 4294967287
Cell 0 voltage: 0 mV
Cell 1 voltage: 0 mV
Cell 2 voltage: 0 mV
Cell 3 voltage: 0 mV

@tremez
Copy link
Author

tremez commented Nov 28, 2019

Ok, I won it
Problem was due to virtual box usb settings, i had to select USB3 instead USB2.
Hope it helps for the future

@0r10nV
Copy link
Contributor

0r10nV commented Nov 28, 2019

Good to know!

Meanwhile have looked through the code and noticed error -11 in that particular case means error downloading firmware to device and not the LIBUSB_ERROR_NO_MEM.
It comes from InitDevice() function and defined in libsmbusb.h header,

#define ERR_FIRMWARE_DOWNLOAD -11

@karosium
Could we redefine it to something unique to avoid confusion?

@karosium
Copy link
Owner

@tremez:
Glad you could get it to work

@0r10nV:
I'll look into this when I have some free time. I've been meaning to add human-readable error messages since the release.

@tremez tremez closed this as completed Nov 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants