[squeak-dev] USB Interface?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] USB Interface?

Derek Arndt-2
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

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] USB Interface?

Ken G. Brown
At 1:14 PM -0700 3/20/08, [hidden email] apparently wrote:

>Date: Thu, 20 Mar 2008 12:56:46 -0500
>From: Derek Arndt <[hidden email]>
>Subject: [squeak-dev] USB Interface?
>To: [hidden email]
>Message-ID: <[hidden email]>
>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, [hidden email] apparently wrote:
>Date: Thu, 13 Dec 2007 22:34:02 -0800
>From: Daniel Hengeveld <[hidden email]>
>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

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] USB Interface?

Karl-19
Ken G. Brown wrote:

> At 1:14 PM -0700 3/20/08, [hidden email] apparently wrote:
>  
>> Date: Thu, 20 Mar 2008 12:56:46 -0500
>> From: Derek Arndt <[hidden email]>
>> Subject: [squeak-dev] USB Interface?
>> To: [hidden email]
>> Message-ID: <[hidden email]>
>> 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, [hidden email] apparently wrote:
>  
>> Date: Thu, 13 Dec 2007 22:34:02 -0800
>> From: Daniel Hengeveld <[hidden email]>
>> 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
>
>
>  
The Scratch board uses the USB port:
http://scratch.wik.is/Support/Scratch_Board

Karl

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] USB Interface?

Ken G. Brown
In reply to this post by Derek Arndt-2
At 3:22 AM -0700 3/21/08, [hidden email] apparently wrote:
>Date: Fri, 21 Mar 2008 10:52:01 +0100
>From: karl <[hidden email]>
>Subject: Re: [squeak-dev] USB Interface?
>To: The general-purpose Squeak developers list
> <[hidden email]>
>Message-ID: <[hidden email]>
>Content-Type: text/plain; charset=ISO-8859-1; format=flowed

> >> Date: Thu, 20 Mar 2008 12:56:46 -0500
>>> From: Derek Arndt <[hidden email]>
>>> Subject: [squeak-dev] USB Interface?
>>> To: [hidden email]
>>> Message-ID: <[hidden email]>
>>> 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
>>>    
>>

Ken  G. Brown said >
> > I have been unable to find any fully functional USB serial interface code for Squeak.
>>
><snip>
> >  

Karl said:
>The Scratch board uses the USB port:
>http://scratch.wik.is/Support/Scratch_Board
>
>Karl

Yes, somehow missed mentioning that one.
The Scratch serial interface works through the USB port via USB to Serail converter to go to the old standard 9 pin Serial if that what you want.

The driver download for Mac OS X <http://www.prolific.com.tw/support/files/%5CIO%20Cable%5CPL-2303%5CDrivers%20-%20Generic%5CMacOS%5CMacOS%2010.x%5Cmd_pl2303H_HX_X_dmg_v1.2.1r2.zip> says it requires "Device using PL-2303H/X".
PL-2303HX (Chip Rev D) USB to Serial Bridge Controller
<http://www.prolific.com.tw/eng/downloads.asp?ID=23>

But if you need to hook up to a USB device that does not show up as a serial device in /dev, or does not use the PL-2303 to convert from USB to 9 pin serial, it seems to me you are in some difficulty. Maybe also a good starting point tho.

Scratch Board
<http://scratch.wik.is/Support/Scratch_Board>
<http://scratch.mit.edu/pages/scratchboardsetup>

Scratch Plugin
<http://scratch.mit.edu/pages/source>

Ken G. Brown