
Toolbox: usb_toolbox

Title: USB Toolbox

Summary: Provide a set to function to communicate directly from Scilab with USB Devices

Version: 1.1

Author: Jose Pablo Castro Valverde

Maintainer: Jose Pablo Castro-valverde <josepablo.castro@gmail.com>

Category: Instruments Control

Entity: EDDAD

WebSite: http://forge.scilab.org/index.php/p/usb-toolbox/

URL: http://atoms.scilab.org/toolboxes/usb_toolbox/1.1

License: BSD

ScilabVersion: >= 5.3.3

Depends: 

Date: 2012-04-13 20:51:54

Description: The goal of this module is to provide a set to function to communicate directly
 from Scilab with USB Device on Linux, Windows and Mac OS X. 
 
  Hid communication process based on HIDAPI (this library works on those SO with
 a native driver). http://www.signal11.us/oss/hidapi/
 
  Bulk communication process for custom USB class based on libusb-1.0 on Linux.
 Windows uses the same libusb-1.0 base on WinUsb
 http://www.libusb.org/wiki/windows_backend . The Windows backend should be
 considered EXPERIMENTAL. Mac OS X untested yet.
 
  CDC communication process based on Serial Communication Toolbox or custom based
 on termios (linux) and  API win32 (windows). I am not sure yet
 
  Collection of macros to uses as interface. Those macros verify the OS and the
 USB class process and made the adjustments needed to successful communication 
 process
  
 HID Tested on:
 
  + GNU/Linux Ubuntu 32 Bits Full Tested 
     -Make a list with every hid device connected. Show VendorID and ProductID.
 Passed
     -Read Manufacture, Product and Serial String. Passed
     -Write to the hid testing device. Passed
     -Read to the hid testing device. Passed
     -Set Feature Report to the hid testing device. Passed
     -Get Feature Report to the hid testing device. Passed
     +Needs libusb-1.0 develop package to compile on Linux
 
  + GNU/Linux Ubuntu 64 Bits Partial Tested 
     -Make a list with every hid device connected. Show VendorID and ProductID.
 Passed
     -Read Manufacture, Product and Serial String. Passed
     -Write to the hid testing device. Untested
     -Read to the hid testing device. Untested
     -Set Feature Report to the hid testing device. Untested
     -Get Feature Report to the hid testing device. Untested
     +Needs libusb-1.0 develop package to compile on Linux
 
  + Windows XP OS 32 Bits Partial Tested 
     -I have problems to initialized my hid testing device on Windows.
     -Make a list with every hid device connected. Show VendorID and ProductID.
 Passed
     -Read Manufacture, Product and Serial String. Passed
     -Write to the hid testing device. Failed
     -Read to the hid testing device. Failed
     -Set Feature Report to the hid testing device. Failed
     -Get Feature Report to the hid testing device. Failed
     +Needs MinGW module to compile on Windows
 Note: I tested the HIDAPI on Windows with the example included with the HIDAPI
 library but it do not work. I guess its something with the Feature Reports
 process and/or Windows driver.
 
 BULK Tested on:
 
  + GNU/Linux Ubuntu 32 Bits Full Tested
     -Make a list with every usb device connected. Show VendorID and ProductID.
 Passed
     -Read Manufacture, Product and Serial String. Passed
     -Write to the bulk testing device. Passed
     -Read  to the bulk testing device. Passed
     +Needs libusb-1.0 develop package to compile on Linux
 
  + GNU/Linux Ubuntu 32 Bits Partial Tested
     -Make a list with every usb device connected. Show VendorID and ProductID.
 Passed
     -Read Manufacture, Product and Serial String. Passed
     -Write to the bulk testing device. Untested
     -Read  to the bulk testing device. Untested
     +Needs libusb-1.0 develop package to compile on Linux
 
  + Windows XP OS 32 Bits Partial Tested 
     -Same problems that the hid testing device with the bulk testing device on
 Windows.
     -Make a list with every hid device connected. Show VendorID and ProductID.
 Passed
     -Read Manufacture, Product and Serial String. Passed
     -Write to the bulk testing device. Failed
     -Read  to the bulk testing device. Failed
     +Needs MinGW module to compile on Windows
 
 ToDo
 HID
  + re-test in Windows OS 32 Bits (both libusb-1.0 and libusbx-1.0)
  + test in Windows OS 64 Bits (both libusb-1.0 and libusbx-1.0)
  + test in MacOS X 32 Bits
  + test in MacOS X 64 Bits
  + implement a rutine similar to lsusb that shows (only HID Devices):
     - VendorID 
     - ProductID
     - Endpoints In
     - Endpoints Out
     - Interfaces
     - Max packet size to transfer in any direction
     - Manufacter Index and String (If there are any)
     - Product Index and String (If there are any)
     - Serial Index and String (If there are any)
     - Etcetera
 BULK
  + re-test in Windows OS 32 Bits (both libusb-1.0 and libusbx-1.0)
  + test in Windows OS 64 Bits (both libusb-1.0 and libusbx-1.0)
  + test in MacOS X 32 Bits
  + test in MacOS X 64 Bits
  + implement a rutine similar to lsusb that shows(any USB Devices):
     - VendorID 
     - ProductID
     - Endpoints In
     - Endpoints Out
     - Interfaces
     - Max packet size to transfer in any direction
     - Manufacter Index and String (If there are any)
     - Product Index and String (If there are any)
     - Serial Index and String (If there are any)
     - Etcetera
 
 NOTE: 
 I will wait for a while to see how different libusb-1.0 (http://libusb.org/) 
 and libusbx-1.0 (http://libusbx.org/) really are and which one its most stable
 on each OS to take a finally decision of which USB library continue using to
 develop and improved usb_toolbox. Meanwhile am gonna made some testing of both
 implementation on windows to see how they works and explore the backend source
 code. I will appreciate any suggestions. 

