but wouldn't that reversal return SET MDI ACK\n\r
instead of what i'm getting: \rSET MDI ACK\n ? it seems like i'm getting the ACK string *between* the cr and lf instead of having them reversed at the end. thanks! On Sat, Jun 12, 2010 at 10:29 PM, Eric H. Johnson <ejohn...@camalytics.com> wrote: > > It looks to me like there is a case in using the 'set' command that the > termination cr lf gets reversed. IOW it is terminated as lf cr. If you > swallow the cr lf, regardless of order, you should be ok. When I get a > chance, I will update it to always return cr lf in that order. > > Regards, > Eric > > > I've been working on a client that talks to emcrsh. I've figured out > that I'm getting unexpected output over the socket. Unexpected > because the format of the returned strings vary. The variance is in > the escape characters so I will write my strings as raw strings below. > For example, if I send: > > HELLO EMC 1 1\r\n > > i get: > > HELLO ACK EMCNETSVR 1.1\r\n > > makes sense. Same goes for (me: is what I send, it: is what it sends back): > > me: SET ECHO OFF\r\n > it: SET ECHO OFF\r\n > > But once I ask for verbose, things get funky. First, with the verbose: > > me: SET VERBOSE ON\r\n > it: SET VERBOSE ACK\n > > It dropped the \r. Now, the rest of the commands do it this way: > > me: SET ENABLE ACK\r\n > it: \rSET ENABLE ACK\n > > me: SET SET_WAIT DONE\r\n > it: \rSET SET_WAIT ACK\n > > me: SET MDI G0 X0 Y0\r\n > it: \rSET MDI ACK\n > > etc. > > In other words, from then on it precedes each output with \r and ends > it with \n. Is this by design? I'm not sure how to code things to > expect this although maybe i can figure it out. But since it's > varying I wanted to check it. It does seem to be in response to the > SET VERBOSE ON command so it's not random. I tried looking through > emcrsh.cc, but my C is rusty and I'm not seeing it. > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > Emc-users mailing list > Emc-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/emc-users > ------------------------------------------------------------------------------ ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users