VAStGoodies.com
Your VA Smalltalk OSS repository. Powered by VA Smalltalk with Seaside.

KscLibUSB

Project: KscLibUsb
Description: VA Smalltalk interface to LibUSB.
Map Managers:
Lou LaBrunda <Lou@keystone-software.com>
Seth Berman <sberman@instantiations.com>
Applications:
KscLibUsbApp - VA Smalltalk Native Interface Binding to LibUSB
KscLibUsbExamplesApp - Examples to help show how to use LibUSB within VA Smalltalk
TestKscLibUsbApp - SUnit Test Cases for KscLibUsbApp
Setup Instructions:
- Get LibUSB dll for your platform.
@see http://libusb.info -> Downloads Menu -> Latests Windows Binaries (for Win) or install from the linux distro repository
- Place the libusb-1.0.dll in your VAST binary directory (i.e. where all the other dlls are).
Example: 'C:\Program Files (x86)\Instantiations\VA Smalltalk\8.6'
- Open your abt.ini and add the following library mapping under the [PlaformLibrary Name Mappings] section, then save
LibUSB=libusb-1.0
- Launch a VA Smalltalk Image
- Load SUnit Features: Transcript->Tools Menu->Load/Unload->ST: SUnit
- Load this configuration map
- Check that the library binding is correct:
[KscLibUsbVersion printStatusCheck] value
Check the Transcript...if nothing was printed...then everything is ok. Otherwise it will print out why the setup is not correct.
- Run the tests: Transcript->Tools Menu->SUnit Browser->Open SUnitBrowser

Version ChangeLog:

VERSION: LL 0.20
LOAD ON: VAST 8.6.2
CHANGELOG:
- Sorry - I've lost track of every little change.
- I've gotten the isochronous version of a sochronous transfer working.
(returns immediately then we wait for an event to continue)
- Created examples for a Logitech WingMan Gamepad Controller.
- One example moves a bomb icon arounf the screen, pressing a button explodes the bomb.
- The bomb example is setup so that it can be used as part of an example with other game pad controllers.
You just have to write the controller specific code.

VERSION: LL 0.19
LOAD ON: VAST 8.6.2
CHANGELOG:
- Removed LibUsbGetPortPath (libusb_get_port_numbers) from LibUsbFunctions because it is deprecated in LibUSB
- Added methods to KscLibUsbContext (getNextTimeout, handleEventsLocked:, handleEventsTimeout:, handleEventsTimeoutCompleted:,
hotplugDeregisterCallback:, hotplugRegisterCallback:flags:vendorId:productId:deviceClass:callBackFunction:userData:,
openDeviceWithVidPid:productId:, waitForEvent:)
- Added methods to KscLibUsbApp (hasCapability:, setLocale:)
- Added methods to KscLibUsbDevice (getPortNumbers)
- Added KscLibUsbTimeVal structure
- Added methods to KscLibUsbTransfer (getStreamId, setStreamId:)

VERSION: LL 0.18
LOAD ON: VAST 8.6.2
CHANGELOG:
- Extended ByteArray to make displaying hex values easier
- Added methods to KscLibUsbDevice to call as of yet unused LibUSB functions
- Added methods to KscLibUsbDeviceHandle to call as of yet unused LibUSB functions
- Fixed problem in KscLibUsbError #errorDescription: and #errorName: when passed a nil error code
- Note: some of the added methods are needed some were added for the sake of completeness, like #getDevice

VERSION: LL 0.17
LOAD ON: VAST 8.6.2
CHANGELOG:
- Added support for GZip external vendor database (note GZip is very slow, better to use Zip of file)
- Updated internal vendor database to latest version

VERSION: LL 0.16
LOAD ON: VAST 8.6.2
CHANGELOG:
- Added support for internal and external vendor database
- Added KscUsbVendorData and KscUsbProductData for internal vendor database
- changed #manufacturer and #product to use the vendor database when the value can't be
obtained from the device

VERSION: SB 0.13
LOAD ON: VAST 8.6.2
CHANGELOG:
- Renamed KscLibUsbException to KscLibUsbError
- Changed #open: API to return last statement in handle or error blocks
- Added factory methods to KscLibUsbError to get error names/descriptions
- Lots of additions to KscLibUsbTransferRequest...working on control type transfer requests
to PS3 controller
- Adding async and sync unified transfer submission API to KscLibUsbTransfer
- Updated some comments
- Added KscUsbVendorIdsApp to the Config Map
KNOWN ISSUES:
- Control Type transfers are now sort of working yet
- When native free is called by the transfer object...it can GPF.
The usually happens if it is called later by finalizer. I think this is fixed but we will see.

VERSION: SB 0.12
LOAD ON: VAST 8.6.2
CHANGELOG:
- Created SUnit Test Suite
- Create Examples Application placeholder
- Completed/Tested/Commented KscLibUsbVersion
- Completed/Tested/Commented KscLibUsbException
- Completed/Tested/Commented KscLibUsbContext
- Added libusb's GPLv2 license to Application class
- Moved examples to new examples application

Binding Progress Log:

Completed, Tested, Commented
KscLibUsbContext
KscLibUsbException
KscLibUsbVersion
Incomplete, Untested, Uncommented
KscLibUsb2_0ExtensionDescriptor
KscLibUsbBosDescriptor
KscLibUsbBosDevCapabilityDescriptor
KscLibUsbConfigurationDescriptor
KscLibUsbContainerIdDescriptor
KscLibUsbControlSetup
KscLibUsbDevice
KscLibUsbDeviceDescriptor
KscLibUsbDeviceHandle
KscLibUsbEndpointDescriptor
KscLibUsbInterface
KscLibUsbInterfaceDescriptor
KscLibUsbIsoPacketDescriptor
KscLibUsbPollFd
KscLibUsbSSEndpointCompanionDescriptor
KscLibUsbSSUsbDeviceCapabilityDescriptor
KscLibUsbTransfer
Licence:
MIT
Developers:Library Supervisor, Louis LaBrunda, Seth Berman
Tags:api libusb usb
Configuration Maps:KscLibUsb