On Fri, 26 May 2000 rleggitt@concentric.net wrote: > > MakePacket(LCP,REQ,number,"\x0E\x02\x06\x00\x0A\x00\x00\x07\x02\x08\x02"); > Each of these escape sequences compiles to a single char of the specified > hex value, so "\x00" compiles to binary 0, but zero is string terminator > and can't be contained within a string. If the compiler let it go, > MakePacket would fail because it would see the first \x00 as the end of > the string. I don't think it made MakePacket fail, since I lifted this straight out of Microchip's AN724 source listing. See my reply to Jim, though, I did mistakenly leave out one bit of the function, the last term was const unsigned char *str, not unsigned char *str. I haven't learned anything about pointers and such yet - can you tell? > You need something like: > > const unsigned char IPhack[] = { 0x0e, 0x02, 0x06, 0x00, 0x0a ... }; > > and add packet length param to MakePacket e.g. > > MakePacket(LCP,REQ,number,IPhack,sizeof(IPhack)); I can see where this would work, though I'd also have to rewrite a considerable portion of MakePacket, I think. I'm looking at it and trying to get my brain cells wrapped around it now, in fact. Like I said, I'm not a programmer... though it's looking more and more like it all the time, at least where PICs are concerned. Dale --- The most exciting phrase to hear in science, the one that heralds new discoveries, is not "Eureka!" (I found it!) but "That's funny ..." -- Isaac Asimov