Thanks for the clarification. On Windows 10, I also had problems. Managed on one occasion to get firmata isConnected to return True, but writing to a port had no effect. I got multiple error messages; I think one of them referenced a SerialPiort primitive, consistent with your findings. Playing with VMs is beyond me, so I will give PyFirmata a try. With much appreciation, Lou Cleveland
On Nov 30, 2018, at 2:42 AM, Nicolai Hess <nicolaihess@gmail.com> wrote:
Good to know!
Am Fr., 30. Nov. 2018 um 02:25 Uhr schrieb Ricardo Moran <richi.moran@gmail.com <mailto:richi.moran@gmail.com>>: Hi,
I think I found a bug with the named serial ports in windows. I can open a named port without problem the first time but if I close it and try to open it again it fails until I restart the image. This doesn't happen with numeric ports. I could reproduce this bug in both Squeak5.2 and Pharo6.1 (both using windows 8.1).
I think the problem is that SerialPort>>#primClosePortByName: calls the "primitiveSerialPortCloseByName" but I couldn't find this primitive anywhere in the SerialPlugin source (https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/src/plugins/Seria... <https://github.com/OpenSmalltalk/opensmalltalk-vm/blob/Cog/src/plugins/Seria...>). So I'm guessing that the port is never properly closed.
I added the missing primitive (find attached) and recompiled the vm, and now it seems to work. So my question is: how can I contribute this small fix? Should I commit to the VM Maker Inbox repository?
Thanks, Richo