-->
Page 10 of 11

Re: How to clear pending interrupt

PostPosted: Thu Jan 17, 2019 3:56 pm
by McChubby007
Oh yes I forgot... I don't know anything about Modbus, just looked on wikipedia !!

So, are you using a modbus protocol over wifi/tcp or serial or what ?

It does seem that enabling the modbus at least aggravates your problem so I personally would look deeply into that area. Is it the protocol formatter on the esp8266 causing problems, or what/how it communicates over a given GPIO or wi-fi etc? Is it serial/uart attached? Is the uart/wifi/? Getting swamped, running out of buffers/memory etc?

Perhaps you can describe it here, with as much detail as possible, as although I don't know modbus, many different I/O problems stem from the same thing and one of us may spot a problem.

Re: How to clear pending interrupt

PostPosted: Thu Jan 17, 2019 4:03 pm
by McChubby007
Reading more on modbus...

A lot of my experience is working on weird/wacky device protocols (in air traffic we have odd stuff not used anywere else in the world) and so I would definitely put a protocol analyser on the line (serial) or use wireshark (network etc). I reckon it is a rogue/corrupt packet that is causing the problem. Perhaps too small/large than was expected or corrupt data causing your protocol handler to misbehave.

You could also program the protocol analyser/wireshark to detect errors or the esp8266 stopping comms and then save its analyser trace info or raise an alarm etc. That is definitely what I'd do, it's easier than debugging the code as a first step.

Re: How to clear pending interrupt

PostPosted: Sat Jan 19, 2019 10:34 am
by lucasromeiro
McChubby007 wrote:Reading more on modbus...

A lot of my experience is working on weird/wacky device protocols (in air traffic we have odd stuff not used anywere else in the world) and so I would definitely put a protocol analyser on the line (serial) or use wireshark (network etc). I reckon it is a rogue/corrupt packet that is causing the problem. Perhaps too small/large than was expected or corrupt data causing your protocol handler to misbehave.

You could also program the protocol analyser/wireshark to detect errors or the esp8266 stopping comms and then save its analyser trace info or raise an alarm etc. That is definitely what I'd do, it's easier than debugging the code as a first step.


Cool!!
Excelent idea!
I will do this.
I already read about wireshark. but as a modbus RTU network, I do not know how I can use it.
Maybe a protocol analyzer is better.
I'm going to do it Monday. There's an analyzer in the company, but I've never used it. It's an opportunity!

Re: How to clear pending interrupt

PostPosted: Sat Jan 19, 2019 11:42 am
by McChubby007
Great, I'm glad it's something you haven't tried yet as I like to surprise you with new ideas every day. Life would be boring otherwise. To show you how old I am, the first analyser I used was the size of a small suitcase with a pin/plug board for selecting options - it was state of the art in 1982! One of our newest expensive mini-computers had 'cache' ram... I'd never heard of cache before. Exciting times haha.

I always found the biggest issue was cabling... It didn't matter what comms it was, it was cabling, noise, clocks out of sync or drifting!