-
-
Notifications
You must be signed in to change notification settings - Fork 97
Protocol / Queue handling issue #151
Comments
interesting, if you use tx_mode=2 (your implementation) does it start to clear up a little? |
That will be the next step.. first, I have to create triggers for the LA - especially on Rx / Tx BRK. |
getting digitalWrite to work in an ISR is tricky. although it is atomic its slow. I've managed to do this before in earlier versions using the LED to show BRKs using
|
Uups - seems my JPEG rendering is a bit too conservative... |
the uart being initialized and the interrupts enabled at the last minute was by design as to not interfere with anything else that was happening during bootup (serial transmissions, wifi, mqtt, websockets etc). It seemed the sensible thing to do at the time as I didn't want to fill up the Rx buffers. The logic is in line 1569 of ems-esp.cpp. It should be safe to move it forward as you suggested although I'm not sure what advantage it will have? |
btw how you finding the dslogic? I have one too from https://www.dreamsourcelab.com/product/dslogic-plus but found it quite cumbersome to use. I often switch over to a 4 EUR USB logic analyzer and using Saleae's free software |
Advantage is not to block the EMS bus - there's nothing on the line during this time... |
I see. I would have expected it wouldn't pull down the line as the D7/D8 pins are not activated though ? |
Next one... found in tx_mode 2... IMHO, Tx should honour the Rx-Status - simply fail if Rx != IDLE... |
jealous ! |
I also don't understand why they are pulled down. My first thought was that it happens in the Arduino core - at least the traces looks alike... |
Somehow we must handle the duedate of the received package. |
Yep... but it needs some tweeks until it's really usable... |
Is the EMS bus itself actually blocked? |
It‘s simply because GPIO15 has a pulldown resistor connected. Otherwise (GPIO15 open) the ESP tries to boot from SD-Card...
Sent by mobile device
… Am 25.07.2019 um 10:31 schrieb Kees ***@***.***>:
I see. I would have expected it wouldn't pull down the line as the D7/D8 pins are not activated though ?
I also don't understand why they are pulled down. My first thought was that it happens in the Arduino core - at least the traces looks alike...
Is the EMS bus itself actually blocked?
If I recall correctly when the TX input is floating or 0 the TX transistor is active (so the current is drawn through the resistors).
Could be the I/O of the ESP is pulled low at boot so the analyzer sees a logic 0 at those pins but the EMS bus itself might be just fine.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
GPIO15 (D8) which we use for Tx is automatically pulled high by the ESP8266 during boot up, which causes the block on the EMS bus. In the code its forced down so there's only a very short window now (3 bytes I think). |
No... GPIO15 has a pull down (10k) on (nearly) all boards (Wemos, NodeMCU). |
Yes indeed. |
@proddy we have a protocol handling issue when sending to EMS bus. It happens with tx_mode 0 and also with tx_mode 2.
The issue is that we interpret the echo as a poll request because of masking out the "poll bit" from Target ID. |
funny, I noticed that too this morning when I was trying to debug why the 0x19 MonitorSlow messages were getting blocked (buffer of 32 was too small). I saw many telegrams with a length of 1 and a value of 0x19 which was a recursive echo->poll |
Seems I have a more stable version at the moment. Much less Rx-idle warnings and no Tx Brk or Tx Timeout during the last hour.
Still have to clean up a bit and
- add log debug with more Info (Junkers)
- show reboot reason when connecting
Sent by mobile device
… Am 26.07.2019 um 15:21 schrieb Proddy ***@***.***>:
funny, I noticed that too this morning when I was trying to debug why the 0x19 MonitorSlow messages were getting blocked (buffer of 32 was too small). I saw many telegrams with a length of 1 and a value of 0x19 which was a recursive echo->poll
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
great, thanks Juergen. Amazing how you can code in these extreme heats. Shall I take a look at fixing the echo/poll issue or have you already squished that bug? |
wonderful! I'll test tonight and reach out the the HT3 guys to see if they can test |
Been running the txmode2 branch for 12hrs now with no crashes and hardly any corrupt telegrams. Looking good! |
Great!
Now we need the result of the Junkers users.
About the reboots - I suspect MQTT or telnet.
Maybe we should ad a watchdog feed before calling them.
Sent by mobile device
… Am 30.07.2019 um 09:47 schrieb Paul ***@***.***>:
Been running the txmode2 branch for 12hrs now with no crashes and hardly any corrupt telegrams. Looking good!
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
with 1.8.1 I would get reboots every 10-15 mins with tx_mode 2, but none with tx_mode 0 so I don't expect its telnet/mqtt related. you can switch all that off (set mqtt_ip and set publish_time 0) and it still happens. Anyway seems better in 1.9 |
We should really try the watchdog feed before each timeconsuming function call. |
yes, we need to keep the code in ISRs non-blocking and highly optimized. |
Or disable wdt before the Tx is called from ems.cpp with |
I‘ll upload a log in jabber mode - there you can see that Tx/Rx aren‘t the bottlenecks. |
And here an interesting arcticle about soft-wtd: https://www.sigmdel.ca/michel/program/esp8266/arduino/watchdogs_en.html#ESP8266_WDT_TIMEOUT |
pushed a new release of txmode2 branch which injects wdtfeed() in MyESP.loop. |
In all versions up to 1.8.0 I had this line in MyESP.loop():
which somehow got lost after 1.8.1. I think it does the same as the |
It‘s still in. But yield does more than calming the WTD - it also cares about WIFI stuff.
wtdFeed only restarts/resets the HW and SW watchdog and doesn’t have any further overhead.
Sent by mobile device
… Am 31.07.2019 um 13:23 schrieb Paul ***@***.***>:
In all versions up to 1.8.0 I had this line in MyESP.loop():
yield(); // ...and breath
which somehow got lost after 1.8.1. I think it does the same as the wdtfeed() no?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
So I've been running the latest build from yesterday evening in the txmode2 branch. |
There is also a delay(1) in the ems-esp.cpp loop I used to calm down the wifi after seeing how ESPhome and other projects did this because of ardunio 2.5.0. It might no longer be necessary? |
delay() is also doing the WIFI and SWDT handling, so it shouldn't hurt at all. |
Found that one: letscontrolit/ESPEasy#2477 |
nice, didn't know you could do that. Let's add that too as it'll help us find the root cause for the WDT resets. |
Possibly unrelated but ran txmode2 firmware for 20+ hours (with an open but idle Telnet session) without problems. |
that's good news for @susisstrolch's new tx code. the logv does a lot of string manipulation (as I avoid using the String library and sprintf() ) so most probably its a memory error I need to look into. |
@bbqkees @susisstrolch also unrelated - I uploaded my latest web version under the newweb branch if you want to play with it. Still need to refine a few things but I think its stable. Look carefully at the CHANGELOG on how to build it because the build scripts have also changed. I'm off now and will pick things up when I'm back in a week. |
Ok will try. |
I have 2days 6hr parasitare Mode.
Sent by mobile device
… Am 05.08.2019 um 09:44 schrieb Kees ***@***.***>:
Ok will try.
The txmode2 build from last week is still running here uninterrupted at 3 days (bus powered).
Telnet session still active.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@proddy Took me some time because of lots of build errors but I was able to build the firmware in the end. The newweb branch needs two additional libraries: ESPAsyncUDP and ESPAsyncWebServer. (PIO Home->Find libraries->type name-> install) The new web interface looks great, will test it over the weekend. |
Did you use the latest platformio.ini example file? I would have expected
pio to download the libraries automatically.
…On Thu, 8 Aug 2019 at 14:27, Kees ***@***.***> wrote:
@proddy <https://github.com/proddy> Took me some time because of lots of
build errors but I was able to build the firmware in the end.
The newweb branch needs two additional libraries: ESPAsyncUDP and
ESPAsyncWebServer. (PIO Home->Find libraries->type name-> install)
Maybe its Windows or just my particular setup but the gulp build did not
work with the 'debug' parameter.
So did node gulp command in the correct folder and after that went
through fine and the compacted web code files were added to the 'webh'
folder, the build in pio went Ok.
The new web interface looks great, will test it over the weekend.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#151>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAJMO6DM4KG4COMWJ7WMRK3QDQGLJANCNFSM4IEEHHTQ>
.
|
Yes, the new one with the 'pre:scripts/buildweb.py' etc. I had the same issue when you added f.i. OneWire initially. |
That's strange. In theory if you remove the whole .pio folder/directory it should go fetch all the libs. I'll try on a fresh win install this weekend |
@bbqkees tested on a fresh win install with platformio 4 and you shouldn't need to download anything manually. As soon as the platformio.ini file is there it will automatically fetch the latest libraries. We can look at your config next week. @susisstrolch I merged the txmode2 branch into the newweb branch and it's been running fine for the last 8hrs. Eventually I'll move all this into dev which is 1.9.0 so let me know if you're planning any further changes. We still need to test with Junkers. |
closing for now. txmode2 merged into dev. |
Today my Logic Analyzer arrived, so I found the time to look what's going on on EMS-Bus.
Environment:
Issue 1 - EMS-ESP continues sending, even not being polled again
The from MC10 looks fine, it's approx. 1.035ms
Issue 2 - pretty similiar to Issue 1
The text was updated successfully, but these errors were encountered: