is there a problem on this simple code
mensanator at aol.com
mensanator at aol.com
Sun Mar 13 00:00:57 EST 2005
John Machin wrote:
> mensanator at aol.com wrote:
> >
> > What actually gets transmitted is "C\x01\x02\x10'\x83".
>
> No, that's repr(What actually gets transmitted)
Drat, I always get burned by that.
>
> > That's 18 bytes. Is the command supposed to be the ASCII
> > characters \x01 or a single byte whose value is 1?
>
> For a start, according to the OP's code, the command ('C' a.k.a. 67)
is
> first. The 1 is a meant to be a message number.
Yeah, that's what I meant.
>
> Secondly, the hardware smells like it's got an 8080 or 6502 inside.
The
> likelihood that it groks Python/C string representation is minimal.
That's what I was thinking. And maybe the replies he's seeing
from the hardware is an error message because it doesn't
understand what it's seeing (which could be due to other things).
A datascope would come in handy for this situation.
> Folk just don't send 18 bytes at 9600 bps when 6 bytes will do.
More information about the Python-list
mailing list