[squeak-dev] Question about serial port communication

Víctor C. T. victorct83 at gmail.com
Thu Jun 25 11:56:05 UTC 2009


Finally I tried your previous solution on a laptop with Windows but doesn't
work... Also I send the bytes reversed, and with a delay between but doesn't
work too.

Thanks a lot anyway!

2009/6/23 Jon Hylands <jon at huv.com>

> On Tue, 23 Jun 2009 11:06:29 +0200, Víctor C. T. <victorct83 at gmail.com>
> wrote:
>
> > Sorry but this code didn't work for me, cause I'm on a Mac and it can't
> get port numbers, only names.
>
> Actually, given that you're running a form of Unix, you can probably do a
> soft link to the actual port in the form that Squeak is expecting. I've
> done that with the gumstix (which runs Linux).
>
> So, to make a link for ttyUSB0 so you can reference it as port 4, do this:
>
> ln -s /dev/ttyUSB0 /dev/ttyS4
>
> Then you can pass in 4 as the port number, and it should work.
>
> > Then that's not the problem... I guess that the way I'm sending bytecodes
> it's not correct, because there's no response from board.
>
> It may end up being an endian problem - Macs and PCs are opposite. I can't
> imagine that this would manifest with a ByteArray, but its probably worth a
> try just to rule it out.
>
> Try sending a ByteArray with the bytes reversed... The other thing to try
> is to send the bytes individually, with a slight (say 1 ms) delay in
> between each byte.
>
> Later,
> Jon
>
> --------------------------------------------------------------
>   Jon Hylands      Jon at huv.com      http://www.huv.com/jon
>
>  Project: Micro Raptor (Small Biped Velociraptor Robot)
>           http://www.huv.com/blog
>
>


-- 
Víctor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20090625/b9dbb48f/attachment.htm


More information about the Squeak-dev mailing list