Mantis Bugtracker
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0007266 [Squeak] VM major always 01-12-09 23:43 04-18-10 22:04
Reporter skadge View Status public  
Assigned To tim
Priority normal Resolution fixed  
Status closed   Product Version 3.11
Summary 0007266: SerialPlugin doesn't handle arbitrary nodes names
Description A quick summary of the issue: today, you can open a serial port in Squeak with "SerialPort new openPort:portNum.". Eg,for portNum = 1, it would map to COM1 under Windows and /dev/ttyS1 under Linux.
That's fine, except that recent Linux kernels don't mount most serial
devices on /dev/ttySxx, but on more specific nodes, like /dev/ttyACMxx
for modems, /dev/ttyUSBxx for certain USB->COM converters, etc.

To circumvent it, I modified the UNIX version of the Serial Port plugin to accept either port numbers or arbitrary paths. I modified
SqueakPlugin.c to introduce new primitive calls (plus their
corresponding "exports" declaration), namely:
EXPORT(sqInt) primitiveSerialPortCloseByName(void);
EXPORT(sqInt) primitiveSerialPortOpenByName(void);
EXPORT(sqInt) primitiveSerialPortReadByName(void);
EXPORT(sqInt) primitiveSerialPortWriteByName(void);

The modifications introduced by the attached patch should be transparent for all the existing code base. New code can access the serial ports either with a port number or with the node path using the same Squeak messages: SerialPort openPort:'/dev/ttyUSB0'.
Additional Information
Attached Files  serialplugin.patch [^] (20,547 bytes) 01-12-09 23:43
 M7266-SerialPortManagingNamedNodes-Sk.1.cs.gz [^] (1,315 bytes) 02-15-09 17:40
 SerialPluginNamedDevices-dtl-M7266.1.cs [^] (5,624 bytes) 04-24-09 02:50
 platforms-Cross-plugins-SerialPlugin-SerialPlugin.h.diff [^] (608 bytes) 04-24-09 02:51
 platforms-unix-plugins-SerialPlugin-sqUnixSerial.c.diff [^] (1,020 bytes) 04-24-09 02:52

- Relationships
related to 0007286closed lewis SerialPlugin doesn't handle arbitrary nodes names (image fixes) 

- Notes
(0012921 - 50 - 50 - 50 - 50 - 50 - 50)
skadge
01-13-09 08:02

Squeak change set for the serial port class added.
 
(0013091 - 915 - 993 - 1040 - 1040 - 1040 - 1040)
lewis
04-24-09 03:00
edited on: 08-21-09 03:15

Uploaded three additional files that incorporate Severin's changes into VMMaker SerialPlugin. Two patch files are to be applied after Severin's patch, in order to change method signatures to declare pointers properly (fixes pre-existing bug to make SerialPlugin work on 64-bit platforms). These change will require updates to win32 and Mac OS platform support files.

The change set provides a Slang implementation of Severin's new primitives:

Change Set: SerialPluginNamedDevices-dtl-M7266
Date: 21 April 2009
Author: David T. Lewis

Add support for named serial devices for SerialPlugin. The new primitives and support code are by Severin Lemaignan <severin.lemaignan@laas.fr>, with portions reimplemented here by dtl.

Also changes method signatures to declare pointers correctly, permitting SerialPlugin to work on 64-bit host platforms. Additional platform code changes are required to match.

 
(0013249 - 354 - 366 - 366 - 366 - 366 - 366)
lewis
08-23-09 01:24

The SerialPluginNamedDevices-dtl-M7266 change set is now included in VMMaker-dtl.136 on SqueakSource. The platforms/Cross and platforms/unix changes are now in Subversion. Updates for OS X and Windows should be completed soon.

A Unix VM built from the latest VMMaker and Subversion platform sources should now provide support for named serial devices.
 
(0013250 - 117 - 117 - 117 - 117 - 117 - 117)
lewis
08-23-09 01:25

Should be working now, at least for Unix/Linux VMs. Need confirmation from someone who works with USB serial devices.
 
(0013338 - 26 - 26 - 26 - 26 - 26 - 26)
lewis
10-04-09 23:09

No known issues, resolved.
 

- Issue History
Date Modified Username Field Change
01-12-09 23:43 skadge New Issue
01-12-09 23:43 skadge Status new => assigned
01-12-09 23:43 skadge Assigned To  => tim
01-12-09 23:43 skadge File Added: serialplugin.patch
01-13-09 08:00 skadge File Added: 7266serialPortManagingNamedNodes-Sk.1.cs.gz
01-13-09 08:01 skadge Issue Monitored: skadge
01-13-09 08:02 skadge Note Added: 0012921
02-15-09 17:40 Keith_Hodges File Added: M7266-SerialPortManagingNamedNodes-Sk.1.cs.gz
02-15-09 17:40 Keith_Hodges Note Added: 0012970
02-15-09 17:43 Keith_Hodges Issue cloned 0007286
02-15-09 17:43 Keith_Hodges Relationship added related to 0007286
02-15-09 17:48 Keith_Hodges File Deleted: 7266serialPortManagingNamedNodes-Sk.1.cs.gz
02-15-09 17:48 Keith_Hodges Description Updated
02-15-09 18:05 Keith_Hodges Note Deleted: 0012970
04-24-09 02:50 lewis File Added: SerialPluginNamedDevices-dtl-M7266.1.cs
04-24-09 02:51 lewis File Added: platforms-Cross-plugins-SerialPlugin-SerialPlugin.h.diff
04-24-09 02:52 lewis File Added: platforms-unix-plugins-SerialPlugin-sqUnixSerial.c.diff
04-24-09 03:00 lewis Note Added: 0013091
08-21-09 03:15 lewis Note Edited: 0013091
08-23-09 01:24 lewis Note Added: 0013249
08-23-09 01:25 lewis Note Added: 0013250
08-23-09 01:25 lewis Status assigned => testing
10-04-09 23:09 lewis Status testing => resolved
10-04-09 23:09 lewis Resolution open => fixed
10-04-09 23:09 lewis Note Added: 0013338
04-18-10 22:04 andreas Status resolved => closed


Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
91 total queries executed.
44 unique queries executed.
Powered by Mantis Bugtracker