I was easily able to use the parallel port from Squeak in Windows with
the DLL and change set from the IOST package at http://www.smalltalking.net/Goodies/Squeak/ Some people, however, are asking for my help getting this to work on a Linux machine. There was a thread here in April 15 of last year with some code posted by Thimon and there have been similar threads in the past including some advice by Ned Konz. Since there are many alternatives, all require at least some work and none which is obvious superior to the others, it would be great if people could share their experiences and/or insights about this. -- Jecel |
I have some C++ code that works under Linux, but I only used that to
drive a couple of relays attached to the parallel port. http://www.cdegroot.com/photo-linuxdr/ - maybe not exactly what you're looking for, but it might just contain enough hints :) On 2/3/06, Jecel Assumpcao Jr <[hidden email]> wrote: > I was easily able to use the parallel port from Squeak in Windows with > the DLL and change set from the IOST package at > http://www.smalltalking.net/Goodies/Squeak/ > > Some people, however, are asking for my help getting this to work on a > Linux machine. There was a thread here in April 15 of last year with > some code posted by Thimon and there have been similar threads in the > past including some advice by Ned Konz. Since there are many > alternatives, all require at least some work and none which is obvious > superior to the others, it would be great if people could share their > experiences and/or insights about this. > > -- Jecel > > |
In reply to this post by Jecel Assumpcao Jr
Jecel Assumpcao Jr a écrit :
> I was easily able to use the parallel port from Squeak in Windows with > the DLL and change set from the IOST package at > http://www.smalltalking.net/Goodies/Squeak/ > > Some people, however, are asking for my help getting this to work on a > Linux machine. There was a thread here in April 15 of last year with > some code posted by Thimon and there have been similar threads in the > past including some advice by Ned Konz. Since there are many > alternatives, all require at least some work and none which is obvious > superior to the others, it would be great if people could share their > experiences and/or insights about this. > Yes, we made some work on parallel port in order to link Squeak to robotic modules. Look at our SqueakBot project here : http://www.iutc3.unicaen.fr/serge/SqueakBot -- oooo Dr. Serge Stinckwich OOOOOOOO Université de Caen>CNRS UMR 6072>GREYC>MAD OOESUGOO http://purl.org/net/SergeStinckwich oooooo Smalltalkers do: [:it | All with: Class, (And love: it)] \ / ## |
In reply to this post by Cees De Groot
Cees De Groot wrote on Fri, 3 Feb 2006 19:28:45 +0100
> I have some C++ code that works under Linux, but I only used that to > drive a couple of relays attached to the parallel port. > http://www.cdegroot.com/photo-linuxdr/ - maybe not exactly what you're > looking for, but it might just contain enough hints :) Cute, thanks for sharing this! This approach (run as root, code i/o instructions in assembly) could work if I used Exupery, but that requires a special VM and if I am going to have that I might as well add some primitives or something like that. For just setting the pins on the parallel port to some value it seems that normal file operations on /dev/lp0 would be good enough: http://people.redhat.com/twaugh/parport/html/ppdev.html For a more detailed control we would need the ioctl() system call with /dev/parport0 and that is something that, as far as I know, Squeak can't do. Is this planned as part of the great file reform? -- Jecel |
In reply to this post by Serge Stinckwich-4
Serge Stinckwich wrote on Fri, 03 Feb 2006 20:54:58 +0100
> Yes, we made some work on parallel port in order to link Squeak to > robotic modules. Look at our SqueakBot project here : > http://www.iutc3.unicaen.fr/serge/SqueakBot That looks perfect, thanks! I will forward this to the group at the University of São Paulo doing this work and since what they are doing is so similar to this I think they will be doubly pleased to see this. -- Jecel |
In reply to this post by Jecel Assumpcao Jr
I wrote:
> Serge Stinckwich wrote on Fri, 03 Feb 2006 20:54:58 +0100 > > Yes, we made some work on parallel port in order to link Squeak to > > robotic modules. Look at our SqueakBot project here : > > http://www.iutc3.unicaen.fr/serge/SqueakBot > > That looks perfect, thanks! I will forward this to the group at the > University of São Paulo doing this work and since what they are doing is > so similar to this I think they will be doubly pleased to see this. The image/changes pair segfaults for me in 2038523660 ParallelPortUnix>readData 2038523568 Moebus>highSDA 2038523476 I2CHandler>start 2038523384 I2CHandler>readFrom: 2038523292 Smec>statusByte 2038523200 Smec>status 2038523016 SmecMorph>step 2038522188 Morph>stepAt: [....] while trying to start up, which isn't surprising given that I don't have "parallelplugin" which it tried to call. The sources only include .mcz packages, so it isn't very obvious to me how to get that. -- Jecel |
In reply to this post by Cees De Groot
Linux is so evil that I can't access my parallel port in any way from
any program. -- and it never gives an error message when I try to print a test-page from the KDE utilities... -- Don't let your schoolwork get in the way of your learning. http://users.rcn.com/alangrimes/ (for some reason Charleston SC is back in my signature... I hope you don't learn why...) |
In reply to this post by Serge Stinckwich-4
Check the section SqueakBot-Hardware (http://www.squeaksource.com/SqueakBot as mentionned by Serge) which implements the parallel port access under linux and windows (ParallelPortUnix and ParallelPortWin). We should extract this part of squeakbot and make a release of it since it would be of interest for general use, so if you have some times, feel free to build a parallel port squeakmap package with all these materials ! You will also need the tarball containing the C code (in fact, it should be translated in a squeaky fashion as a ParallelPortPlugin class which would avoid to distribute the tarball). All this work is already tested ok both for linux and windows (IOSTSqueak needed for windows)... Have fun :-) Samir parallelplugin.tgz (6K) Download Attachment |
Samir Saidani wrote on Sat, 04 Feb 2006 00:07:13 +0100
> Check the section SqueakBot-Hardware > (http://www.squeaksource.com/SqueakBot as mentionned by Serge) which > implements the parallel port access under linux and windows > (ParallelPortUnix and ParallelPortWin). We should extract this part of > squeakbot and make a release of it since it would be of interest for > general use, so if you have some times, feel free to build a parallel > port squeakmap package with all these materials ! This is all included in the image/changes I had downloaded from the page Serge indicated. > You will also need the tarball containing the C code (in fact, it > should be translated in a squeaky fashion as a ParallelPortPlugin > class which would avoid to distribute the tarball). I found it attached to an email to this list from April 15 of 2005. After getting the needed uncompression tool (Gentoo has a wider selection of tools than RiscOS ;-) and compiling it, copying the .so file to where the squeak binary is I still get the same result. Given that this is via FFI shouldn't the unmodified VM be able to load this? > All this work is already tested ok both for linux and windows > (IOSTSqueak needed for windows)... Great! > [parallelplugin.tgz] Ah - thanks for sending this again. I hadn't noticed it until I was replying to you (Celeste is a bit too subtle sometimes). -- Jecel |
In reply to this post by Samir Saidani
Jecel Assumpcao Jr <[hidden email]> writes: > Samir Saidani wrote on Sat, 04 Feb 2006 00:07:13 +0100 >> Check the section SqueakBot-Hardware >> (http://www.squeaksource.com/SqueakBot as mentionned by Serge) which >> implements the parallel port access under linux and windows >> (ParallelPortUnix and ParallelPortWin). We should extract this part of >> squeakbot and make a release of it since it would be of interest for >> general use, so if you have some times, feel free to build a parallel >> port squeakmap package with all these materials ! > > This is all included in the image/changes I had downloaded from the page > Serge indicated. Ok but the squeaksource one is probably the latest up-to-date code, don't know about the image you downloaded... >> You will also need the tarball containing the C code (in fact, it >> should be translated in a squeaky fashion as a ParallelPortPlugin >> class which would avoid to distribute the tarball). > > I found it attached to an email to this list from April 15 of 2005. > After getting the needed uncompression tool (Gentoo has a wider > selection of tools than RiscOS ;-) and compiling it, copying the .so > file to where the squeak binary is I still get the same result. Given > that this is via FFI shouldn't the unmodified VM be able to load this? Same comment, things has maybe changed since that date, I've sent you the last up-to-date code. Cheers, Samir |
Samir Saidani wrote on Sat, 04 Feb 2006 01:56:55 +0100
> Same comment, things has maybe changed since that date, I've sent you > the last up-to-date code. I had tried this version with the same result, but then noticed that a previously installed VM on my machine (3.2-5) had the files SqueakFFIPrims.so and SqueakFFIPrims.la in the executables directory while the current one (3.7-7) doesn't. Copying the file you sent to the old directory and running that I no longer got the segment fault. I still got two errors "external callout not available" since it is looking for the file "libffi.so.1" which isn't available on my machine. So the image was ok and the parallelplugin probably is ok as well but my Linux Squeak isn't configured correctly for FFI. That, unfortunately, seems to be the default. -- Jecel |
Free forum by Nabble | Edit this page |