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. thanks! ------------------------------------------------------------------------------ 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