I sussed it,
The hex array readCard is encoded into ascii by first encoding it into a long by shifting, then I use ultoa as you suggested Mr. Rogers, it works perfect, the same line that prints 'ascii' also does the conversion from (long) output into ascii characters.
char ascii[10];
unsigned long output = 0;
output += (long)readCard[0] << 24;
output += (long)readCard[1] << 16;
output += (long)readCard[2] << 8;
output += (long)readCard[3];
Serial.println (ultoa (output, ascii, 16));
Then at 'tother end I came up with an idea not too different from yours pommie by converting pairs of ascii characters into 4 hex bytes which can then be compared, this also works perfect.
atoi is no good for this as I found out as atoi only converts numerics, a to f as found in hex are not converted.
Arduino C would benefit from an atoh function.
unsigned char high_nibble,low_nibble,value[4];
for (uint8_t i=0;i<8;i+=2) {
high_nibble = h2d(packetBuffer);
low_nibble = h2d(packetBuffer[i+1]);
value[i/2] = (high_nibble << 4) | low_nibble;
}
unsigned char h2d(unsigned char hex)
{
if(hex > 0x39) hex -= 7; // adjust for hex letters upper or lower case
return(hex & 0xf);
}
Thankyou guys for your input.