Scilab Home Page | Wiki | Bug Tracker | Forge | Mailing List Archives | Scilab Online Help | File Exchange
ATOMS : USB Toolbox details
Login with GitLab

USB Toolbox

Provide a set to function to communicate directly from Scilab with USB Devices
(2871 downloads for this version - 14776 downloads for all versions)
Details
Version
1.1
A more recent valid version exists: 1.2.0
Author
Jose Pablo Castro Valverde
Owner Organization
EDDAD
Maintainer
Jose PAblo Castro-Valverde
License
Creation Date
April 13, 2012
Source created on
Scilab 5.3.x
Binaries available on
Scilab 5.3.x:
Linux 32-bit Linux 64-bit
Install command
--> atomsInstall("usb_toolbox")
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.             
Files (3)
[8.05 MB]
Source code archive
Source code
[8.01 MB]
Linux 32-bit binary for Scilab 5.3.x
Linux 32-bit
Automatically generated by the ATOMS compilation chain

[8.01 MB]
Linux 64-bit binary for Scilab 5.3.x
Linux 64-bit
Automatically generated by the ATOMS compilation chain

News (0)
Comments (0)
Leave a comment
You must register and log in before leaving a comment.
Login with GitLab
Email notifications
Send me email when this toolbox has changes, new files or a new release.
You must register and log in before setting up notifications.