Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By TAlbarran
#52792 I am working on a project that uses the ESP8266 to send data from an FPGA. The ESP8266 retrieves data from the FPGA via a SPI bus in a 16 bit message. I am struggling to find an efficient way to send the values over a tcp connection.

At the moment, I am using client.write(byte) in order to send the data byte by byte but it is too slow for my application. It seems like it is recreating the socket with every call. I would like to use the client.print(string) function but as my data contains zero values occasionally, I lose a lot of my data due to null terminated strings. Is there a way to bypass the arduino string functions and send a buffer of chars or uint8_t's? Or is there an easier way to do this?

Also, I have gotten UDP to work but I would prefer to use a TCP connection.

Any help would be greatly appreciated. Thanks!
User avatar
By TAlbarran
#53100 I have tried using that function but I can't seem to get around the const buffer. I am getting the error that the const uint8_t *buffer is read only which makes sense. Is there away to get around this and write to a const buffer while the program is running?

Thanks