Go Down

Topic: Wifinina client.available() client.read() (Read 82 times) previous topic - next topic

spysmily1

I am using firmware 1.3.0. I am connected to a server as a client. There is data available to read when there shouldn't be. At first, I thought maybe the server was sending this data I wasn't expecting, then it crashed and I'm still getting data that could not possibly have been sent since the server is down

Just wanting to know if anyone here has experienced anything like this.

sandeepmistry

Hi @spysmily1,

Would you be able to share a (minimal) sketch to reproduce the issue?

spysmily1

Hey sandeepmistry,

I would have replied sooner, but didn't have the notification on for this topic. Sorry for that.

To give you some history that I forgot to include on the first message. I developed a C# server which the arduino connects. This server has worked fine with no changes as well as the arduino having no changes for a month. The last 2 weeks I have started to see data being read that isn't even being sent. In fact, if this data is being sent, the server can be disconnected and I still see data being sent continuously. I have reduced my loop code to just the following.

Code: [Select]

while (client.available()) {
   char c = client.read();
   Serial.write(c);
}


With the check above, after I receive the trash data, I can disconnect the server and I will still receive data. I did this for 2 hours. There is no way there is data available at that point with no server to send the data. Up until that then, the data that I'm sending is correct. It's just a string of no more than 2 characters which represent an single digit integer. The 2nd character is for a negative when needed.

I can tell you that the trash data does seem to repeat and looks like some alphanumeric characters and about 64 bytes long. I can respond with that data later if you want it but can't now as this is a work project I won't be at until Monday.

I had another arduino wifi rev2 I purchased and decided to try it out. I uploaded the program and now have no issues with trash data. My guess is this is a hardware issue. I'm now worried that the same thing will happen to this arduino if left running for a period of time.

Any advice is appreciated. Plus how were you able to tag my name? I tried yours and it doesn't seem to work as I think it would using the @username as you did.

Go Up