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
(1198 downloads for this version - 14718 downloads for all versions)
Details
Version
1.0.1
A more recent valid version with binaries for Scilab 5.3 exists: 1.1
Author
Jose Pablo Castro Valverde
Owner Organization
EDDAD
Maintainer
Jose PAblo Castro-Valverde
License
Dependency
Creation Date
March 29, 2012
Source created on
Scilab 5.3.x
Binaries available on
Scilab 5.3.x:
Linux 32-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 and Mac OS X depending of which driver works better in each OS

 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. 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
 + 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. 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. Untested
    -Get Feature Report to the hid testing device. Untested
    +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 Partial Tested
    -Make a list with every hid device connected. Untested
    -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
Note: The source of bulk implementation its unpublished. It not finished yet.

ToDo
HID
 + test in Windows OS 64 Bits
 + test in MacOS X 32 Bits
 + test in MacOS X 64 Bits
BULK
 + enhanced the module to support Bulk communication on Linux/Windows/MacOs X            
Files (2)
[8.05 MB]
Source code archive
Source code of the toolbox.
[151.57 kB]
Linux 32-bit binary for Scilab 5.3.x
Binary version of usb_toolbox version 1.0.1-1
News (0)
Comments (2)     Leave a comment 
Comment from Samuel Gougeon -- April 12, 2012, 12:53:52 AM    
Hello,

Hoping to see soon an equivalent for windows ;) (maybe through Tcl)
I would personnaly look for such a module in the Instruments control category
(rather than the Data handling one) where other modules enabling communication 
protocols between devices are already available.

Best regards
Samuel Gougeon
Answer from Jose PAblo Castro-Valverde -- April 12, 2012, 01:18:44 AM    
Hi,

I been writting an extention of this module to support bulk communication on Linux with 
libusb-1.0.
HIDAPI has four back-ends:
	* Windows (using hid.dll)
	* Linux/hidraw (using the Kernel's hidraw driver)
	* Linux/libusb (using libusb-1.0)
	* Mac (using IOHidManager)
I have to take time to re-compile the module on Windows and Mac (if someone borrow me one 
Mac computer). As soon as possible I gonna upload the windows version. Mac version has to 
wait a little bit.

Best regards

Jose Pablo Castro

> Hello,
> 
> Hoping to see soon an equivalent for windows ;) (maybe through Tcl)
> I would personnaly look for such a module in the Instruments control category
> (rather than the Data handling one) where other modules enabling communication 
> protocols between devices are already available.
> 
> Best regards
> Samuel Gougeon
Comment from alton keel -- July 1, 2012, 07:42:19 AM    
Hi,
I am starting a project to interface a fun cube usb radio to scilab and would like to use
this library as a start.
I am running mac osx lion. I loaded the module using atoms but it would not load without
error. I would be 
willing to help debug and test the module for osx. If you can reply with the current status
of it under osx and 
what needs to be done i can start help

thx,
Alton

Answer from Jose PAblo Castro-Valverde -- July 1, 2012, 08:58:26 AM    
Hi Alton,

I update the source code and probably the next Monday on the morning (France's morning) 
the source code will packaged and be ready to download. Make sure you have the last 
version.

I am re-writing some stuff of the module to make it more flexible. The idea is that the 
user may choose what kind of transfer wants and with what endpoint.

If you can help me to test it on Mac I will be very thankfull with you. Let me known in 
what I can help you.

Regards from Costa Rica 

> Hi,
> I am starting a project to interface a fun cube usb radio to scilab and would like to
> use this library as a start.
> I am running mac osx lion. I loaded the module using atoms but it would not load
without
> error. I would be 
> willing to help debug and test the module for osx. If you can reply with the current
> status of it under osx and 
> what needs to be done i can start help
> 
> thx,
> Alton
> 
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.