[squeak-dev] USB Interface?

Ken G. Brown kbrown at mac.com
Thu Mar 20 22:34:28 UTC 2008


At 1:14 PM -0700 3/20/08, squeak-dev-request at lists.squeakfoundation.org apparently wrote:
>Date: Thu, 20 Mar 2008 12:56:46 -0500
>From: Derek Arndt <deekpyro at charter.net>
>Subject: [squeak-dev] USB Interface?
>To: squeak-dev at lists.squeakfoundation.org
>Message-ID: <51A3015A-FCB1-4227-B7C3-E1BA35EDACD5 at charter.net>
>Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
>
>Hey there,
>
>I'm a croquet developer working on a different project involving a 
>USB device.  I notice there's a SerialPort class for communicating 
>with serial devices, but I haven't had any experience coding against 
>device interfaces before.  Could I snag some the interface specs from 
>Intel's developer website and code up one similar to the Serial 
>class?  Any guidance would be much appreciated.
>
>Thanks for your time,
>Derek

I have been unable to find any fully functional USB serial interface code for Squeak.

>From what I have been able to gather together regarding USB for Macintosh on which I am concentrating, the SerialExtendedPlugin may have good communication capabilities if the USB device shows up in the /dev directory as a Serial device. Available from John McIntosh at <http://www.smalltalkconsulting.com/squeak.html>, <ftp://ftp.smalltalkconsulting.com/experimental/EnhancedSerialPorts-JMM.11.cs.gz>, here's a copy on Mantis with some fix-ups for Squeak 3.10Dev, <EnhancedSerialPorts-JMM.11wSmalltalkFixesFor3.10-kgb.cs-M6966>, downloadable at <http://bugs.squeak.org/view.php?id=6966>

Otherwise the JoyStickPlugin <http://hitoro.net/squeak/2004/11/23/joystick-support-for-mac-os-x/>, available on the Squeak svn source repository <http://www.squeakvm.org/cgi-bin/viewcvs.cgi/>,
or the HIDPlugin <http://www.squeaksource.com/HID.html>, HID-dd.4.mcz appear to be closest to what is needed to start with, if the device is visible to USB as an HID device. The HIDPlugin is able to pick up the device information and can read some items for a mouse or tablet, but does not have the interface bits required to actually transfer bytes bi-directionally serially.

The Stick plugin may be of interest for Windows: <http://www.lazarevic.de/stick.html> The www site says:
The Stick Plugin for the Squeak VM aims at providing better support for using real Joysticks (or Gamepads) from within Squeak than there is currently through the old JoystickTabletPlugin.

I chose to try to extend the HIDPlugin for serial bi-directional byte transfer which I am only part way through.
I am working on that at the moment and can supply an in process Xcode project for compiling the HIDPlugin as an external plugin to help get you started.

Lukas has some example Serial code for USB devices that show themselves in the /dev directory. His code is for interface to the Lego Mindstorms Nxt.
<http://source.lukas-renggli.ch/nxt.html>.

Craig has done something with USB too involving Croquet and Phidgets <http://www.phidgets.com/>.
Was mentioned in an email on Croquet-Dev:
-------------------------------------------
At 6:00 AM -0500 12/14/07, croquet-dev-request at duke.edu apparently wrote:
>Date: Thu, 13 Dec 2007 22:34:02 -0800
>From: Daniel Hengeveld <danielwh at gmail.com>
>Subject: Re: [croquet-dev] minutes from Nov 30, 2007 developer conference call/meeting

Craig (at 04:32:03)
this is a demo of using the Phidgets system for phyical i/o with Croquet

Darius (at 04:36:43)
phidgets doesn't sound programmable so the PC must be in constant 
communication?

Craig (at 04:40:31)
right, over USB
-------------------------------------------

Some manuals and links you will find helpful for Mac OS X are:

>From the Apple Developer Connection Member Downloads:
December 2007 Developer Documentation in PDF (Disk Image)

<'/DeveloperDocsdec07devdocpdf/documentation/DeviceDrivers/Conceptual/AccessingHardware/AccessingHardware.pdf'>
<'/DeveloperDocsdec07devdocpdf/documentation/DeviceDrivers/Conceptual/USBBook/WorkingWithUSB.pdf'>
<'/DeveloperDocsdec07devdocpdf/documentation/DeviceDrivers/Conceptual/IOKitFundamentals/IOKitFundamentals.pdf'>
<'/DeveloperDocsdec07devdocpdf/documentation/Hardware/DeviceManagers/usb/usb_ref/usb_api_ref_v26.pdf'>
<http://developer.apple.com/technotes/tn2007/tn2187.html>
<'/DeveloperDocsdec07devdocpdf/documentation/DeviceDrivers/Conceptual/HID/hid.pdf'>
<'/DeveloperDocsdec07devdocpdf/documentation/DeviceDrivers/Conceptual/WorkingWSerial/WorkingWithSerial.pdf'>

Other general USB stuff:
<http://www.amazon.com/s/ref=nb_ss_gw/102-0796593-5081731?url=search-alias%3Daps&field-keywords=USB+complete+Jan+Axelson&x=0&y=0>
<http://www.pangeasoft.net/book/index.html>
<http://www.usb.org/developers/devclass_docs/usbccs10.pdf>
<http://developer.apple.com/hardwaredrivers/download/usbdebug.html>
<http://developer.apple.com/hardwaredrivers/usb/index.html>
<http://www.lucid-cake.net/osx_zaurus_usb/index_en.html>
<http://www.usb.org/developers/docs/>

Some interesting work has been done to interface to the Velleman VM110/K8055 USB Experimenter board. <http://www.velleman.be/country.php>, <http://www.vellemanusa.com/us/enu/product/view/?id=500349>, not all with Squeak but may be helpful in some way.

<http://wiki.squeak.org/squeak/5907>
<http://soft.pmad.net/k8055/>
<http://sourceforge.net/projects/k8055mac/>
<http://hexten.net/wiki/index.php/K8055>
<http://linuxk8055.free.fr/>


Please let us all know if you find any breakthrough information.

Ken G. Brown



More information about the Squeak-dev mailing list