Netp5 send &receive (byte) negative value problem


#1

Hello,
I need to send and receive 1 MB file between android tablet and esp32. I did in java mode with “processing.net” library on windows. “processing.net” doesn’t work android mode, so I decided to use netp5 lib without oscp5. Speed is important. I prefered TCP because of data is critical.

I use loadBytes() command to load file. Some values are bigger than 127. did not pose a problem In java mode with client.write(data). But, netp5 sends three bytes (239,191,189) in stead of one negative value (bigger 127). So too on receive.

Any suggestions? Thanks,

I solved the problem. But It isn’t posible to receive 10("\n") and 13("\r"). Netlistener remove them.


#2

One suggestion is to use URL encoding. Processing provide encoding and encoding functions. Check this.

Kf