Giga Serial port cannot read \n?

Hello,

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?

How are you able to confirm this?

How many characters does the receiver say it got?

+1 for placing this in context, either your entire sketch or a small complete example that runs and has a same problem.

a7

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.