Hi, I recently got a serial IrDA adapter and wanted to play around with it under Squeak. This adapter has a baudrate switching mechanism which depends on toggling the DTR and RTS lines in the correct sequence. To support this, I wanted to build a new SerialPlugin with an additional primitive.
However, the plugin as built with MPW does not seem to be accepted by the VM, which still uses the internal plugin in all cases. I've tried placing the plugin in a 'Plugins' subfolder of the VM's folder, and then directly into the VM folder, without any success.
I have considered placing debug outputs in appropriate places in the VM, but building a complete VM with MPW is not easy - I would have to create an MPW makefile for the whole shebang, which is more work than I can invest at the moment.
Does any of you Mac aficionados have an idea where the problem could be? I have appended the plugin and corresponding source files in a ZIP file (it's not big) so if you want to try it out you could do it right now :-)
BTW, would it make sense to incorporate support for switching serial port parameters of an open port into the standard plugin? Closing and opening a port just to change the baud rate seems a little overkill...
Cheers, Hans-Martin
On Thursday 14 August 2003 10:00 pm, Hans-Martin Mosner wrote:
BTW, would it make sense to incorporate support for switching serial port parameters of an open port into the standard plugin? Closing and opening a port just to change the baud rate seems a little overkill...
No. It would make sense for you to use John McIntosh's new serial port plugin instead.
It works on the Mac, and I started to support Linux, so there's some refactoring left to do.
Still, it has good support for changing parameters on the fly.
a) You might want to, as already pointed out try the enhanced/extended serial port plugin to add this capabilities to.
b) Mmm ask management to get you a copy of codewarrior eh? Might need to get a old copy off ebay to support 8.6 tho.
c) If you come to OOPSLA 2003 you own me a beer
d)You get a (cfragInitFunctionErr -2821A fragment's initialization routine returned an error.) error on the GetDiskFragment() call. It says that CarbonLib is the issue. VM starting about 3.0.2 were carbonized for os-8.x/9. Which VM are you using? Also I'm not sure what the problem is, could be the carbonlib stub, or the carbonlib extension. Go visit http://developer.apple.com/carbon/ and ensure you've got the right version of everything on the machine and in your development environment, and of course you are trying to use a carbonized VM and if you think you are linking the carbonlib stub into your plugin
Also to review
One of the things that might cause trouble is your setting of
#define VM_PROXY_MAJOR 1 #define VM_PROXY_MINOR 5
in sqVirtualMachine.h Ensure the header file you are using for the VM matches the header file for the plugin you are building because in serialplugin.c you have the following tests and if they fail why the plugin isn't used.
EXPORT(int) setInterpreter(struct VirtualMachine* anInterpreter) { int ok;
interpreterProxy = anInterpreter; ok = interpreterProxy->majorVersion() == VM_PROXY_MAJOR; if (ok == 0) { return 0; } ok = interpreterProxy->minorVersion() >= VM_PROXY_MINOR; return ok; }
You could insert a DebugStr(); in there and see if the VM actually calls it by dropping into the machine debugger if successful. If it's not called then it's a loader issue, alas right now you need a proper debugger to trap the failed load module call to find out what the error code and error diagnostic information is
On Thursday, August 14, 2003, at 10:11 PM, Hans-Martin Mosner wrote:
Hans-Martin Mosner wrote:
I have appended the plugin and corresponding source files in a ZIP file (it's not big) so if you want to try it out you could do it right now :-)
Empty promises... I forgot to attach the ZIP. Here it is, now...<SerialPlugin.zip>
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
John M McIntosh wrote:
a) You might want to, as already pointed out try the enhanced/extended serial port plugin to add this capabilities to.
Where would I find that? For the moment, I started with the bits and pieces that were just lying around :-)
b) Mmm ask management to get you a copy of codewarrior eh? Might need to get a old copy off ebay to support 8.6 tho.
Since this is a private project, management == self wife. And she says I'm already spending too much time with the machine, so no money for more toys :-(
c) If you come to OOPSLA 2003 you own me a beer
I can't make it to OOPSLA :-( However, you will get a beer (and probably some more) when we'll meet next time anyway :-)
d)You get a (cfragInitFunctionErr -2821A fragment's initialization routine returned an error.) error on the GetDiskFragment() call. It says that CarbonLib is the issue. VM starting about 3.0.2 were carbonized for os-8.x/9. Which VM are you using?
3.50b4 classic.
Also I'm not sure what the problem is, could be the carbonlib stub, or the carbonlib extension. Go visit http://developer.apple.com/carbon/ and ensure you've got the right version of everything on the machine and in your development environment, and of course you are trying to use a carbonized VM and if you think you are linking the carbonlib stub into your plugin
I've got CarbonLib SDK 1.6, which seems to be the latest.
Ok, so I'll try a little more. Maybe I need to set up MPW to compile the VM - gack...
Cheers, Hans-Martin
Hans-Martin Mosner wrote:
John M McIntosh wrote:
a) You might want to, as already pointed out try the enhanced/extended serial port plugin to add this capabilities to.
Where would I find that? For the moment, I started with the bits and pieces that were just lying around :-)
Ahh, found it on the CVS... I still need getting used to that thing. Ok, so I'm back to reading and trying to understand that stuff...
Cheers, Hans-Martin
Well it seems to say you've some sort of problem dealing with the carbonlib that you linked into the plugin I'd check to see if the stub you are getting is the right one.
Also for 3.5.0 seem I'm using the 1.5 version of carbon lib, guess I update that for 3.6, perhaps you are linking with 1.6 and that's an issue?
Also perhaps try a 3.0.x carbon macintosh VM
also see http://developer.apple.com/documentation/Carbon/Conceptual/ carbon_porting_guide/cpg_buildstruct/chapter_3_section_7.html
http://developer.apple.com/tools/mpw-tools/relnotes/carbonstdclib.html
On Friday, August 15, 2003, at 01:21 PM, Hans-Martin Mosner wrote:
Hans-Martin Mosner wrote:
John M McIntosh wrote:
a) You might want to, as already pointed out try the enhanced/extended serial port plugin to add this capabilities to.
Where would I find that? For the moment, I started with the bits and pieces that were just lying around :-)
Ahh, found it on the CVS... I still need getting used to that thing. Ok, so I'm back to reading and trying to understand that stuff...
Cheers, Hans-Martin
-- ======================================================================== === John M. McIntosh johnmci@smalltalkconsulting.com 1-800-477-2659 Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com ======================================================================== ===
Hans-Martin Mosner <hmm <at> heeg.de> writes:
Hans-Martin Mosner wrote:
I have appended the plugin and corresponding source files in a ZIP file (it's not big) so if you want to try it out you could do it right now
Empty promises... I forgot to attach the ZIP. Here it is, now... Attachment (SerialPlugin.zip): application/zip, 9 KiB
Hello, is this plugin available for Squeak 4.3 on Linux/Unix? Where can I get the binary or the source code from?
Best regards, Dan.
On Wed, May 23, 2012 at 07:58:07AM +0000, Dan Corneanu wrote:
Hans-Martin Mosner <hmm <at> heeg.de> writes:
Hans-Martin Mosner wrote:
I have appended the plugin and corresponding source files in a ZIP file (it's not big) so if you want to try it out you could do it right now
Empty promises... I forgot to attach the ZIP. Here it is, now... Attachment (SerialPlugin.zip): application/zip, 9 KiB
Hello, is this plugin available for Squeak 4.3 on Linux/Unix? Where can I get the binary or the source code from?
SerialPlugin is included as an internal plugin in the standard VM here: http://squeakvm.org/unix/index.html
There is a tarball with all source for that exact version of the VM:
http://squeakvm.org/unix/release/Squeak-4.4.7.2357-src.tar.gz
The source code for SerialPlugin is in two parts. The Smalltalk source (aka slang) is class SerialPlugin, which is in the VMMaker package:
http://source.squeak.org/VMMaker
The C language platform source code is in the Subversion repository:
http://squeakvm.org/cgi-bin/viewcvs.cgi/trunk/ svn co http://squeakvm.org/svn/squeak/trunk
How to build:
http://squeakvm.org/unix/devel.html#html/devel.m4.1.2
The recent versions of SerialPlugin have support for named serial ports. I'm not sure if this support is present in Cog VMs yet. I think that it was recently added, so check these links if you are working with a Cog VM:
Binaries: http://www.mirandabanda.org/files/Cog/VM
Source: http://squeakvm.org/cgi-bin/viewcvs.cgi/branches/Cog/
Eliot's blog: http://www.mirandabanda.org/cogblog/
Dave
Here is John McIntosh's file sharing site that has EnhancedSerialPorts-JMM.11.cs.gz :
Ken
On 2012-05-23, at 6:27 AM, David T. Lewis wrote:
On Wed, May 23, 2012 at 07:58:07AM +0000, Dan Corneanu wrote:
Hans-Martin Mosner <hmm <at> heeg.de> writes:
Hans-Martin Mosner wrote:
I have appended the plugin and corresponding source files in a ZIP file (it's not big) so if you want to try it out you could do it right now
Empty promises... I forgot to attach the ZIP. Here it is, now... Attachment (SerialPlugin.zip): application/zip, 9 KiB
Hello, is this plugin available for Squeak 4.3 on Linux/Unix? Where can I get the binary or the source code from?
SerialPlugin is included as an internal plugin in the standard VM here: http://squeakvm.org/unix/index.html
There is a tarball with all source for that exact version of the VM:
http://squeakvm.org/unix/release/Squeak-4.4.7.2357-src.tar.gz
The source code for SerialPlugin is in two parts. The Smalltalk source (aka slang) is class SerialPlugin, which is in the VMMaker package:
http://source.squeak.org/VMMaker
The C language platform source code is in the Subversion repository:
http://squeakvm.org/cgi-bin/viewcvs.cgi/trunk/ svn co http://squeakvm.org/svn/squeak/trunk
How to build:
http://squeakvm.org/unix/devel.html#html/devel.m4.1.2
The recent versions of SerialPlugin have support for named serial ports. I'm not sure if this support is present in Cog VMs yet. I think that it was recently added, so check these links if you are working with a Cog VM:
Binaries: http://www.mirandabanda.org/files/Cog/VM
Source: http://squeakvm.org/cgi-bin/viewcvs.cgi/branches/Cog/
Eliot's blog: http://www.mirandabanda.org/cogblog/
Dave
David T. Lewis <lewis <at> mail.msen.com> writes:
SerialPlugin is included as an internal plugin in the standard VM here: http://squeakvm.org/unix/index.html
Sorry, I forgot to mention that I was talking about the Enhanced/Extended Serial Port plugin.
Anyway, thank you for the directions you have provided me.
Best regards, Dan.
Ken G. Brown <kbrown <at> mac.com> writes:
Here is John McIntosh's file sharing site that has EnhancedSerialPorts-
JMM.11.cs.gz
Do I need to register or something? because I am not able to download the file. I get an "Access denied by access control list." error.
Dan.
I'm not aware of any such thing. I'm getting the same error. Perhaps an email to John McIntosh johnmci@smalltalkconsulting.com would provide an answer.
Ken
On 2012-05-23, at 9:48 AM, Dan Corneanu wrote:
Ken G. Brown <kbrown <at> mac.com> writes:
Here is John McIntosh's file sharing site that has EnhancedSerialPorts-
JMM.11.cs.gz
Do I need to register or something? because I am not able to download the file. I get an "Access denied by access control list." error.
Dan.
Attached is a copy of EnhancedSerialPorts-JMM.11.cs.gz that I had locally.
Ken
On 2012-05-23, at 9:48 AM, Dan Corneanu wrote:
Ken G. Brown <kbrown <at> mac.com> writes:
Here is John McIntosh's file sharing site that has EnhancedSerialPorts-
JMM.11.cs.gz
Do I need to register or something? because I am not able to download the file. I get an "Access denied by access control list." error.
Dan.
Ken G. Brown <kbrown <at> mac.com> writes:
Attached is a copy of EnhancedSerialPorts-JMM.11.cs.gz that I had locally.
Ken
Ok, this is the smalltalk code, but don't I need some native code for this to work?
Dan.
squeak-dev@lists.squeakfoundation.org