Re: Linux Serial Programming
From: Grant Edwards (grante_at_visi.com)
Date: 04/18/04
- Previous message: Floyd L. Davidson: "Re: Linux Serial Programming"
- In reply to: ibwhoib: "Linux Serial Programming"
- Next in thread: ibwhoib: "Re: Linux Serial Programming"
- Reply: ibwhoib: "Re: Linux Serial Programming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 18 Apr 2004 02:55:02 GMT
In article <6Hkgc.34506$_g4.3436941@news4.srv.hcvlny.cv.net>, ibwhoib wrote:
> char cmd[7];
> cmd[0] = 42;
> cmd[1] = 0;
> cmd[2] = 0;
> cmd[3] = 132;
> cmd[4] = 177;
> cmd[5] = 0;
> cmd[6] = 119;
> cmd[7] = 188;
You declared the array to hold 7 bytes, then filled it with 8
bytes.
> I then try to write the command to the port.
>
> int written;
> written = write(fd, cmd, 7);
That only sent 7 bytes (42 through 119).
> My first question is is this the correct way to send this command?
I think you need to work on your counting skills.
--
Grant Edwards grante Yow! An INK-LING? Sure --
at TAKE one!! Did you BUY any
visi.com COMMUNIST UNIFORMS??
- Previous message: Floyd L. Davidson: "Re: Linux Serial Programming"
- In reply to: ibwhoib: "Linux Serial Programming"
- Next in thread: ibwhoib: "Re: Linux Serial Programming"
- Reply: ibwhoib: "Re: Linux Serial Programming"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]