If I convert any byte value to ascii to send it over serial for example, lots of the numbers are lost. The ones below 32 are particularly important. I can cope with going up to 150 but I can't lose the lowest ones. The standard ascii set goes to 127 but is clearly incomplete in unique characters.
I'm making a workaround in case there is not extended set that covers the range 0-150. A routine to allocate a character to the numbers missing, and unpack at the other end. It will work but it's intensive on resources.
where TX1ToSend is a string (ignore the 'byte' in the name).
At the other end is MIT App Inventor and it receives any zany character the ESP32 is asked to send, so it will work if I enumerate the missing characters at both ends.
The serial monitor is not capable of displaying non-printing characters, so you will not see anything for ASCII characters below 32 (which is itself a space).
The Bluetooth sending was not including those characters also, yet these are reaching the other end OK for example "".
I'm using a case statement to select characters and any which don't send OK I'll change.
There was a setting which could be altered in the preferences file for Arduino regarding character sets. But the instructions I've found for those seem to be for an old version only.
If you are going to send ASCII control characters, then you will need something on the receiving end that can understand those in the way you want. There are terminal programs that can print out a representation of a control character, or you need to create your own character set that has special characters for non-printing ASCII codes. If all you want is to send binary data, don't expect it to make any sense if displayed in a terminal as ASCII.
The redefining of the characters below 32 did not work well. When using other characters the amount of data in each send began to increase because of overheads I think that those characters brought.
I will use multiple sends to get the packet across.
This would be so much easier if you explained exactly what you are trying to do. As explained earlier you can send the ASCII code for each character as a single byte if you write() it instead of using print(). That way the message will be much smaller
The library has options to send bytes but much fewer. With text there are up to 20 per send, so it would have been ideal if the 7 bit ascii set was more complete.