I am using Lora communication model between my PC(python) and an Arduino GIGA wifi. The communication is based on bytes. I can confirm the python has sent the message like this: b'MC\x00\x00\x03\xe8\x01\x01\n\n', with the end of \n. The arduino was try to read all of the bytes by the following function:
int E220::receiveData(byte *data, int size) {
if(_streamSerial->available()){
int bytesRead = _streamSerial->readBytes(data,size);
return bytesRead;
}
else{
return 0;
}
}
The question is, why this function cannot read \n as a byte?
I doubt that there is a problem with the Giga reading '\n'. More likely there is some issue with the code you aren't showing.
Please read the following post which not only tells you how to post your code correctly, but also has lots of great hints for what sorts of things to include in order for people to be able to help you.