Welcome to MattzoBricks › Forums › MattzoTrainController for Powered Up (MTC4PU) › MTC4PU – MattzoTrainController for Powered Up
- This topic has 76 replies, 17 voices, and was last updated 2 years, 11 months ago by Max.
-
AuthorPosts
-
-
January 10, 2021 at 15:22 #1656Matthias RunteKeymaster
Questions and ideas around the MTC4PU.
Please read the documentation first:
MattzoTrainController for Powered Up (MTC4PU)Thanks!
- This topic was modified 3 years, 3 months ago by Matthias Runte.
- This topic was modified 3 years, 3 months ago by Matthias Runte.
- This topic was modified 3 years, 3 months ago by Matthias Runte.
- This topic was modified 2 years, 10 months ago by Max.
- This topic was modified 2 years, 10 months ago by Max.
-
January 11, 2021 at 12:52 #1792Hakan TandoganParticipant
Is the casing (maybe even a preview version) already available? I’d like to build a monorail and check how well the printed box would fit in there 🙂
-
January 11, 2021 at 14:46 #1793Thorsten SchmitzParticipant
Hi Hakan, in the Moment there is no available Case. The release of the Casings will come soon. When your space fits exactly with the PF or PU Casings from lego, you will have no problems with our Casing!
-
January 13, 2021 at 10:02 #1803Tobias LiefkeParticipant
Hello together, i have successfully connected my PU Train to Rocrail. But i have a problem with the speed. In rocrail i can only user the train with the trainbutton “F1”. The Train goes immediate to full speed.
in rocrail i see “10:58:40 id=ICE decoder 6051 f1(1)=on”
in mqqtbrocker “<exception text=”id=ICE decoder 6051 f1(1)=on” level=”16384″ id=”9999″/>”
on the terminal “fn> node found. Processing fn message…
function id: ICE
addr: 6051
Consuming message for train ICE (6051)
fnchanged: 1
Function PIN Id: 0
fnchangedstate (raw): true
fnchangedstate: true
Flipping function 1 to 1
Received MQTT message [rocrail/service/command]: <fn shift=”false” group=”1″ fnchanged=”1″ fnchangedstate=”false” fncnt=”0″ id=”ICE” f”regards,
Tobias- This reply was modified 3 years, 3 months ago by Tobias Liefke.
-
January 13, 2021 at 10:16 #1805Tobias LiefkeParticipant
Hi together,
can not edit my last post.
if i user the slider in rocrail for my train ill get on terminal, but nothing happens.
<lc> node found. Processing loco message…
loco id: ICE
addr: 6051
Consuming message for train ICE (6051)
dir (raw): false
direction: backward
V: 25
V_max: 100
Message parsing complete, target speed set to -25 (current: 0, max: 100)
Setting motor speed: -3 (power: -2)
Light event reverse
Light event reverse
Light event reverse
Light event reverse
Flipping function 2 to 1
Flipping function 4 to 1
Setting motor speed: -5 (power: -4)
Setting motor speed: -7 (power: -6)
Setting motor speed: -9 (power: -7)
Setting motor speed: -11 (power: -9)
Setting motor speed: -13 (power: -11)
Setting motor speed: -15 (power: -13)
Setting motor speed: -17 (power: -14)
Setting motor speed: -19 (power: -16)
Setting motor speed: -21 (power: -18)
Setting motor speed: -23 (power: -20)
Setting motor speed: -25 (power: -22)regards,
Tobias -
January 15, 2021 at 20:25 #1831Thorsten SchmitzParticipant
Hi Tobias, please copy your settings from the MTC4PU_Configuration into this post. Maybe we find quickly the answer for your problem.
Best regards, Thorsten -
January 16, 2021 at 14:52 #1832Dan GoreckiParticipant
Tobias, I’d also recommend posting a screen shot of the Train setting from RocRail. make sure you set the decoder step value to 255.
-
January 22, 2021 at 18:58 #1971Erik SwinkelsParticipant
Hi, build the switch controller and made it working in rocrail. Trying the MTC4PU but I keep getting compilation errors and am not able to compile.
Doe anyone know what I am missing…
the error:
MTC4PU:663:27: error: ‘ledColor’ was not declared in this scope
myHubs[i].setLedColor(ledColor, loco._locoAddress);
^
exit status 1
variable or field ‘setLedColor’ declared void-
January 27, 2021 at 21:02 #2036Matthias RunteKeymaster
Hello Erik,
looks as if you did not choose the correct ESP32 controller in the Arduino IDE.Cheers,
Mattze-
February 2, 2021 at 23:27 #2202Erik SwinkelsParticipant
You were completely right…. It was completely my mistake.
And for what it is worth.. Everything is working perfectly… (that is, my testbench)
Really great work!grt. Erik
-
-
-
January 23, 2021 at 07:25 #1972Nikos LygizosParticipant
Hello,
Today I received the ESP32 and I managed to compile and upload the MTC4PU with the custom Config.h
It seems the MQTT is connecting sometimes but after a ESP32 reset does not again. Also, I believe I have configured the Config.h correctly for 2 Loco with 2 hubs and one motor each. I see the Hub Mac addresses but when I try to connect (Bluetooth) to the Loco never does. I have attached some outputs from the serial console, mosquitto and the config file.MattzoController booting…
Loaded mattzoControllerId from EEPROM: 40330
Connecting as MTC4PU40330 to Wifi xxxxxxxxxxxx…
MattzoController setup completed.
Discovering Powered Up Hubs…
Powered Up Hub found. MAC Address: 90:84:2b:21:11:c9
Initializing hub Hub-Croco-1 (90:84:2b:1b:a8:e9)…
*** DEBUG-INFO ***
WiFi + MQTT connection Status: 0
Loco 0: Croco-1 (6051). Target speed: 0, current speed: 0, max speed: 0
Loco 1: Cargo-1 (6061). Target speed: 0, current speed: 0, max speed: 0
next hub to initialize (if any): 0
Hub 0: macAddress=90:84:2b:1b:a8:e9: isConnecting()=0 isConnected()=0 status=0
Hub 1: macAddress=90:84:2b:21:11:c9: isConnecting()=0 isConnected()=0 status=0
******************
also:
(Re)connecting to MQTT 192.168.99.226…
Failed to connect to mqtt, state=-2
*** DEBUG-INFO ***
WiFi + MQTT connection Status: 0
Loco 0: Croco-1 (6051). Target speed: 0, current speed: 0, max speed: 0
Loco 1: Cargo-1 (6061). Target speed: 0, current speed: 0, max speed: 0
next hub to initialize (if any): 0
Hub 0: macAddress=90:84:2b:1b:a8:e9: isConnecting()=0 isConnected()=0 status=0
Hub 1: macAddress=90:84:2b:21:11:c9: isConnecting()=0 isConnected()=0 status=0
******************
(Re)connecting to MQTT 192.168.99.226…
MQTT connected, listening on topic [rocrail/service/command].
*** DEBUG-INFO ***
WiFi + MQTT connection Status: 1
Loco 0: Croco-1 (6051). Target speed: 0, current speed: 0, max speed: 0
Loco 1: Cargo-1 (6061). Target speed: 0, current speed: 0, max speed: 0
next hub to initialize (if any): 0
Hub 0: macAddress=90:84:2b:1b:a8:e9: isConnecting()=0 isConnected()=0 status=0
Hub 1: macAddress=90:84:2b:21:11:c9: isConnecting()=0 isConnected()=0 status=0
******************
*** DEBUG-INFO ***
WiFi + MQTT connection Status: 1
Loco 0: Croco-1 (6051). Target speed: 0, current speed: 0, max speed: 0
Loco 1: Cargo-1 (6061). Target speed: 0, current speed: 0, max speed: 0
next hub to initialize (if any): 0
Hub 0: macAddress=90:84:2b:1b:a8:e9: isConnecting()=0 isConnected()=0 status=0
Hub 1: macAddress=90:84:2b:21:11:c9: isConnecting()=0 isConnected()=0 status=0
******************C:\Program Files\mosquitto>mosquitto.exe -c mosquitto.conf -v
1611385569: mosquitto version 2.0.5 starting
1611385569: Config loaded from mosquitto.conf.
1611385569: Opening ipv6 listen socket on port 1883.
1611385569: Opening ipv4 listen socket on port 1883.
1611385569: mosquitto version 2.0.5 running
1611385572: New connection from 192.168.99.197:49701 on port 1883.
1611385572: New client connected from 192.168.99.197:49701 as MTC4PU40330 (p2, c1, k10).
1611385572: Will message specified (64 bytes) (r0, q0).
1611385572: rocrail/service/command
1611385572: Sending CONNACK to MTC4PU40330 (0, 0)
1611385572: Received SUBSCRIBE from MTC4PU40330
1611385572: rocrail/service/command (QoS 0)
1611385572: MTC4PU40330 0 rocrail/service/command
1611385572: Sending SUBACK to MTC4PU40330
1611385582: Received PINGREQ from MTC4PU40330
1611385582: Sending PINGRESP to MTC4PU40330
1611385592: Received PINGREQ from MTC4PU40330const int NUM_LOCOS = 2;
MattzoLocoConfiguration* getMattzoLocoConfiguration() {
static MattzoLocoConfiguration locoConf[NUM_LOCOS];locoConf[0] = (MattzoLocoConfiguration) {
.locoName = “Croco-1”,
.locoAddress = 6051,
.accelerationInterval = 100,
.accelerateStep = 2,
.brakeStep = 3
};locoConf[1] = (MattzoLocoConfiguration) {
.locoName = “Cargo-1”,
.locoAddress = 6061,
.accelerationInterval = 100,
.accelerateStep = 2,
.brakeStep = 3
};return locoConf;
}const int NUM_HUBS = 2;
MattzoPUHubConfiguration* getMattzoPUHubConfiguration() {
static MattzoPUHubConfiguration hubConf[NUM_HUBS];hubConf[0] = (MattzoPUHubConfiguration){
.hubName = “Hub-Croco-1”,
.macAddress = “90:84:2b:1b:a8:e9”,
.devicePortA = MattzoPUDevice::PU_MOTOR,
.configMotorA = 1,
.devicePortB = MattzoPUDevice::NONE,
.configMotorB = 0,
.locoAddress = 6051
};hubConf[1] = (MattzoPUHubConfiguration){
.hubName = “Hub-Cargo-1”,
.macAddress = “90:84:2b:21:11:c9”,
.devicePortA = MattzoPUDevice::PU_MOTOR,
.configMotorA = 1,
.devicePortB = MattzoPUDevice::NONE,
.configMotorB = 0,
.locoAddress = 6061
};return hubConf;
}const int NUM_FUNCTIONS = 4;
uint8_t FUNCTION_PIN[NUM_FUNCTIONS] = { PU_LIGHT, 22, 4, 2 };
int FUNCTION_PIN_LOCO_ADDRESS[NUM_FUNCTIONS] = { 6051, 6051, 6051, 6051 };
const bool AUTO_LIGHTS = true;
// Digital output PIN to monitor controller operation (typically a LED)
bool STATUS_LED_PIN_INSTALLED = true; // set to true if LED is installed (if not: false)
uint8_t STATUS_LED_PIN = 0;#define TRIGGER_EBREAK_UPON_DISCONNECT false
const char* SYSLOG_APP_NAME = “MTC4PU”;
By the way during the time I was typing this post suddenly I see:
WiFi + MQTT connection Status: 1
and
1611386618: New connection from 192.168.99.197:62016 on port 1883.
1611386618: New client connected from 192.168.99.197:62016 as MTC4PU40330 (p2, c1, k10).
1611386618: Will message specified (64 bytes) (r0, q0).
1611386618: rocrail/service/command
1611386618: Sending CONNACK to MTC4PU40330 (0, 0)
1611386618: Received SUBSCRIBE from MTC4PU40330
1611386618: rocrail/service/command (QoS 0)
1611386618: MTC4PU40330 0 rocrail/service/command
1611386618: Sending SUBACK to MTC4PU40330
1611386628: Received PINGREQ from MTC4PU40330Any thoughts?
-
January 23, 2021 at 16:04 #1977Ulrich SchneiderParticipant
Hi everyone,
I got my controller working with a classic setup: One PU hub plus a PU train motor. However, I have trouble getting my crocodile working which does not have a train motor, but a PU Large Motor. I see that the hub is connected and I see that the controller sends Speed commands to the hub (or at least receives those via mosquito.). However, the crocodile is not moving in any direction. Do I have to change the config file to account that I have a PU Large Motor and not a PU train motor? And how would I do that?
[remark: I noticed that with the LEGO controllers (the Bluetooth control), the crocodile differs from the train motor as it needs constant pressing down the speed button (and only knows one speed)). That is the reason, I suspect that it is not working.]
-
January 24, 2021 at 20:54 #1999Ulrich SchneiderParticipant
For anyone wondering in the future: It does not make any difference if you use a PU train motor or a PU large motor. I am able to connect both to a single MTC4PU.
-
-
January 23, 2021 at 19:23 #1980Nikos LygizosParticipant
Success!
The problem was the Hub names (hostnames?). I used the Lego Powered-Up (3.6.0) application and renamed the Hubs to “HubCroco1” and “HubCargo1”. Also, I removed all hyphens; I do not know if hyphens are significant or not. Then I used the same hostnames in the MTC4PU_Configuration.h:
…
hubConf[0] = (MattzoPUHubConfiguration) {
.hubName = “HubCroco1”,
.macAddress = “90:84:2b:1b:a8:e9”,
…
hubConf[1] = (MattzoPUHubConfiguration) {
.hubName = “HubCargo1”,
.macAddress = “90:84:2b:21:11:c9”,
and worked!Also, the Loco Hubs need to be paired every-time you Load a new firmware to the ESP32.
Some output from the working ESP32:
MattzoController booting…
Loaded mattzoControllerId from EEPROM: 40330
Connecting as MTC4PU40330 to Wifi xxxxxxxxxxxxxx…
MattzoController setup completed.
Discovering Powered Up Hubs…
Powered Up Hub found. MAC Address: 90:84:2b:21:11:c9
Initializing hub HubCroco1 (90:84:2b:1b:a8:e9)…
Connecting to hub 0…
Connection attempt to hub 0 refused.
Initializing hub HubCroco1 (90:84:2b:1b:a8:e9)…
Wifi connected. My IP address is 192.168.99.197.
(Re)connecting to MQTT 192.168.99.226…
MQTT connected, listening on topic [rocrail/service/command].
sending mqtt: roc2bricks/discovery MTC4PU40330 Powered Up Hub discovered: 90:84:2b:21:11:c9
Connecting to hub 0…
Connected to hub 0.
sending mqtt: roc2bricks/connectionStatus MTC4PU40330 HubCroco1 (90:84:2b:1b:a8:e9) connected
Initializing hub HubCargo1 (90:84:2b:21:11:c9)…
Connecting to hub 1…
Connected to hub 1.
sending mqtt: roc2bricks/connectionStatus MTC4PU40330 HubCargo1 (90:84:2b:21:11:c9) connected
*** DEBUG-INFO ***
WiFi + MQTT connection Status: 1
Loco 0: Croco1 (6051). Target speed: 0, current speed: 0, max speed: 0
Loco 1: Cargo1 (6061). Target speed: 0, current speed: 0, max speed: 0
next hub to initialize (if any): 1
Hub 0: macAddress=90:84:2b:1b:a8:e9: isConnecting()=0 isConnected()=1 status=1
Hub 1: macAddress=90:84:2b:21:11:c9: isConnecting()=0 isConnected()=1 status=1
******************1611427976: New connection from 192.168.99.197:54437 on port 1883.
1611427976: Client MTC4PU40330 already connected, closing old connection.
1611427976: New client connected from 192.168.99.197:54437 as MTC4PU40330 (p2, c1, k10).
1611427976: Will message specified (64 bytes) (r0, q0).
1611427976: rocrail/service/command
1611427976: Sending CONNACK to MTC4PU40330 (0, 0)
1611427976: Received SUBSCRIBE from MTC4PU40330
1611427976: rocrail/service/command (QoS 0)
1611427976: MTC4PU40330 0 rocrail/service/command
1611427976: Sending SUBACK to MTC4PU40330
1611427976: Received PUBLISH from MTC4PU40330 (d0, q0, r0, m0, ‘roc2bricks/discovery’, … (56 bytes))
1611427977: Received PUBLISH from MTC4PU40330 (d0, q0, r0, m0, ‘roc2bricks/connectionStatus’, … (51 bytes))
1611427978: Received PUBLISH from MTC4PU40330 (d0, q0, r0, m0, ‘roc2bricks/connectionStatus’, … (51 bytes))
1611427987: Received PINGREQ from MTC4PU40330
1611427987: Sending PINGRESP to MTC4PU40330
1611427997: Received PINGREQ from MTC4PU40330
1611427997: Sending PINGRESP to MTC4PU40330
1611428003: Received PUBLISH from MTC4PU40330 (d0, q0, r0, m0, ‘roc2bricks/battery’, … (33 bytes))Next, Rocrail and learn more of the Arduino IDE and how to connect and monitor the ESP32 through WiFi.
Cheers!
Nikos-
January 27, 2021 at 21:07 #2037Matthias RunteKeymaster
Hi Nikos,
that’s interesting. I did not experience that hub name problem here, and neither did any of the testers. We will observe if we get more feedback into this direction.I agree that the PU hubs sometimes do not reconnect so quickly after uploading a new firmware to the ESP-32, but as they are specifically addressed with their MAC ID, a real bluetooth pairing as such should not be required at all. But please keep on posting your findings, they are all interesting.
Cheers,
Mattze-
March 15, 2021 at 13:08 #2759Matthias EnderParticipant
I’ve got the same problem with the names. But with the right names everythings work fine.
-
-
-
January 25, 2021 at 13:40 #2013YevgenParticipant
Hello Everyone! First of all, hat off to Herr Runte and the crew for sharing the code and getting us to this point of automation without going broke (Lego is doing that part)!!!
I was wandering if anyone can point me in a right direction with a small issue. I have 3 locos and 3 hubs set up – 60197, 60198, 60052, in that order in the header file. I can connect all three locos to the controller, but only in that order. If I do not power up 60197 first, the other locos will not connect.
I will check the hub names, as stated in the topic above, but that seems to be a different issue.
Thanks!
-
January 25, 2021 at 22:43 #2016Nikos LygizosParticipant
Hi! With my 2 locomotives with one hub each. After the Bluetooth pairing is completed successfully both hubs should have a steady light. Also, look at the ESP32 serial console. If everything connects then you should have something like “isConnected()=1”:
Hub 0: macAddress=90:84:2b:1b:a8:e9: isConnecting()=0 isConnected()=1 status=1
Hub 1: macAddress=90:84:2b:21:11:c9: isConnecting()=0 isConnected()=1 status=1
Also, I found out that most of the times already paired hub will re-connect to the ESP32 at any time as long as you see the serial console looping:
*** DEBUG-INFO ***
WiFi + MQTT connection Status: 1
Loco 0: Croco-1 (6051). Target speed: 0, current speed: 0, max speed: 0
Loco 1: Cargo-1 (6061). Target speed: 0, current speed: 0, max speed: 0
next hub to initialize (if any): 0
Hub 0: macAddress=90:84:2b:1b:a8:e9: isConnecting()=0 isConnected()=0 status=0
Hub 1: macAddress=90:84:2b:21:11:c9: isConnecting()=0 isConnected()=0 status=0
…….
until it connects.I hope this helps.
Nikos
-
January 26, 2021 at 01:51 #2017YevgenParticipant
Thanks for replying, Nikos. My issue seems to be the sequence. I can get them all connected, but only in the sequence that they are in the configuration file.
`*** DEBUG-INFO ***
WiFi + MQTT connection Status: 0
Loco 0: 60197_1 (1). Target speed: 0, current speed: 0, max speed: 0
Loco 1: 60198_1 (2). Target speed: 0, current speed: 0, max speed: 0
Loco 2: 60052_1 (3). Target speed: 0, current speed: 0, max speed: 0
next hub to initialize (if any): 2
Hub 0: macAddress=90:84:2b:17:ac:52: isConnecting()=0 isConnected()=1 status=1
Hub 1: macAddress=90:84:2b:20:ec:fb: isConnecting()=0 isConnected()=1 status=1
Hub 2: macAddress=90:84:2b:21:d6:b0: isConnecting()=0 isConnected()=1 status=1If I don’t power up and connect on esp boot Hub O, I can’t connect the other 2. Once I power up and connect it, I am able to connect the other 2. And once I have them all connected, I can disconnect and reconnect them in that sequence only. If I power up the second or third hub, but not the first, they will not connect.
Also, once disconnecting, the second and third hubs’ statuses stay at 1, but the first changes to 0
*** DEBUG-INFO ***
WiFi + MQTT connection Status: 0
Loco 0: 60197_1 (1). Target speed: 0, current speed: 0, max speed: 0
Loco 1: 60198_1 (2). Target speed: 0, current speed: 0, max speed: 0
Loco 2: 60052_1 (3). Target speed: 0, current speed: 0, max speed: 0
next hub to initialize (if any): 0
Hub 0: macAddress=90:84:2b:17:ac:52: isConnecting()=0 isConnected()=0 status=0
Hub 1: macAddress=90:84:2b:20:ec:fb: isConnecting()=0 isConnected()=0 status=1
Hub 2: macAddress=90:84:2b:21:d6:b0: isConnecting()=0 isConnected()=0 status=1
******************But if I power them down in reverse sequence, 3-2-1, then they all get reset to 0.
*** DEBUG-INFO ***
WiFi + MQTT connection Status: 0
Loco 0: 60197_1 (1). Target speed: 0, current speed: 0, max speed: 0
Loco 1: 60198_1 (2). Target speed: 0, current speed: 0, max speed: 0
Loco 2: 60052_1 (3). Target speed: 0, current speed: 0, max speed: 0
next hub to initialize (if any): 0
Hub 0: macAddress=90:84:2b:17:ac:52: isConnecting()=0 isConnected()=0 status=0
Hub 1: macAddress=90:84:2b:20:ec:fb: isConnecting()=0 isConnected()=0 status=0
Hub 2: macAddress=90:84:2b:21:d6:b0: isConnecting()=0 isConnected()=0 status=0-
January 27, 2021 at 21:12 #2038Matthias RunteKeymaster
Your observation is correct. The Powered Up hubs must be connected in exactly the order they are listed in the configuration. The reason for this are technical limitations in the Powered Up and Bluetooth libraries that we use to connect to the Powered Up hubs.
I am quite positive that we will find a better for this in the future.
Cheers,
Mattze -
January 28, 2021 at 02:26 #2060YevgenParticipant
Thanks for the update! I suppose it would not matter if I used one controller per one hub.
-
January 29, 2021 at 10:44 #2093Matthias RunteKeymaster
No, that is not problem at all. It even has the advantage that you can put the controller on the train and connect some nice LEDs as train lights to it!
-
-
-
-
January 26, 2021 at 19:38 #2022Thorsten SchmitzParticipant
Hi Everybody in the Chat. Thanks for joining us and reporting your issues. By now we have a Bug in PU, disconnecting the Hub in weird moments. If that happens the controller (ESP32) won`t reconnect and Failsafe activates! We are searching for the reasons and have found some interesting Points to fix this. Please stay tuned. We report immediately and send a new firmware when ready!
Regards
Thorsten -
January 26, 2021 at 19:45 #2023YevgenParticipant
Thanks, Thorsten, let me know if I can be of any use.
-
January 30, 2021 at 02:00 #2111Henk van LingenModerator
A note the all in this thread; connecting wifi/bluetooth with the mtc4pu is indeed not flawless, we are trying/testing alternative code. Besides that it looks as there is a problem with the battery check code enabled in the main loop(). As the esp32 is a dual core there are mqtt and hub callbacks running concurrently, both doing mqtt things, which leads to corrupted mqtt messages sometimes. I investigated this with extra logging. I bit technical maybe. My simple advise for now is to comment the requestPoweredUpBatteryLevel(); line.
- This reply was modified 3 years, 2 months ago by Henk van Lingen.
-
January 30, 2021 at 18:56 #2136Nikos LygizosParticipant
Thank you Henk!
I will re-compile with the line commented and get back. -
February 3, 2021 at 19:47 #2222Nikos LygizosParticipant
I have not seen any hang-up after re-compiling.
-
February 3, 2021 at 20:37 #2224Matthias RunteKeymaster
Nikos, thanks for sharing your findings! This is indeed very helpful. We are interested in more feedback from the user base, so we are keen to hear more results from others as well.
Henk from the core developer team has pretty much nailed down the problem, we just need some more empirical basis for issueing the fix for the firmware.
Thank you all!
-
-
February 3, 2021 at 21:56 #2228Nikos LygizosParticipant
Mattze, I am glad and provide any help for this awesome project. Btw I tried to start a new topic for Sensors but I think it went to the Cosmic Backet!
Cheers!
Nikos-
February 3, 2021 at 22:00 #2232Matthias RunteKeymaster
Oops, my bad. The topics should no be visible in the forum.
-
February 8, 2021 at 01:17 #2284Nikos LygizosParticipant
No worries!
Cheers!
Nikos
-
-
-
February 7, 2021 at 20:10 #2282Matthias RunteKeymaster
Hi everybody,
for your information: we put some substantial work into the bugfix for the MTC4PU, but we did not eliminate the problems completely yet.We are actively working on it and hope to find and eliminate the root cause soon.
Cheers,
Mattze- This reply was modified 3 years, 2 months ago by Matthias Runte.
-
February 10, 2021 at 13:45 #2325MaxParticipant
Hi Mattze and Team!
While working on a troubleshooting guide I ran into the following “bug” of a MTC4PU.
After shutdown of Rocrail, the MTC4PU looped into the following:... Feb 10 13:30:51 MTC4PU61785 MTC4PU Flipping function 2 to 1 Feb 10 13:30:51 MTC4PU61785 MTC4PU Flipping function 3 to 0 Feb 10 13:30:51 MTC4PU61785 MTC4PU Flipping function 4 to 1 Feb 10 13:30:51 MTC4PU61785 MTC4PU Received MQTT message [rocrail/service/command]: <sys cmd="ebreak" informall="true" controlcode="" slavecode="" server="infw76700B84"/> Feb 10 13:30:51 MTC4PU61785 MTC4PU <sys> node found. Processing sys message... Feb 10 13:30:51 MTC4PU61785 MTC4PU rocrail system command: ebreak Feb 10 13:30:51 MTC4PU61785 MTC4PU received ebreak, stop or shutdown command. Stopping train. Feb 10 13:30:51 MTC4PU61785 MTC4PU Flipping function 1 to 1 Feb 10 13:30:51 MTC4PU61785 MTC4PU Flipping function 2 to 0 Feb 10 13:30:51 MTC4PU61785 MTC4PU Flipping function 3 to 1 Feb 10 13:30:51 MTC4PU61785 MTC4PU Flipping function 4 to 0 ...
After restarting Rocrail even a ebreak could not stop the MTC4PU. Maybe you can find the root cause in the code..
Many greetings!
-
February 10, 2021 at 14:05 #2326YevgenParticipant
I believe this is the code for blinking lights once the Rocrail power goes off.
-
February 10, 2021 at 14:31 #2327MaxParticipant
Hey Yevgen, that is correct. But even after restarting Rocrail, my MTC4PU thought he was a Christmas tree 🙂
-
February 10, 2021 at 16:56 #2330YevgenParticipant
I think this is by design – a failsafe. Mine goes into the Christmas mode as well until you put main power back on and put the train back in auto mode. Was the train still moving when you shut down Rocrail? I’m rebuilding my layout and probably won’t be able to test for a few days.
-
February 10, 2021 at 17:07 #2333Matthias RunteKeymaster
Section “emergency brake”.
-
February 10, 2021 at 20:23 #2335MaxParticipant
From “bug” to feature. Thank you Mattze!
The emergency brake situation remains until you have reset it. To reset, you need to virtually switch the “power” in Rocrail off and on again.
-
-
-
-
February 12, 2021 at 23:29 #2379Herbert S.Participant
Hi, unfortunately I ran into a problem and I am not able to solve it. I managed to include the libraries. The compilation is without errors. The upload works – the AZ Delivery ESP 32 is blinking red. But the controller keeps rebooting with following message:Rebooting…
ets Jun 8 2016 00:22:57rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
assertion “heap != NULL && “free() target pointer is outside heap areas”” failed: file “/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/heap/heap_caps.c”, line 267, function: heap_caps_free
abort() was called at PC 0x40123513 on core 1Backtrace: 0x400916c0:0x3ffcc720 0x400918f1:0x3ffcc740 0x40123513:0x3ffcc760 0x40084b67:0x3ffcc790 0x40085129:0x3ffcc7b0 0x4000bec7:0x3ffcc7d0 0x400ef386:0x3ffcc7f0 0x400ef46a:0x3ffcc810 0x400d1bd1:0x3ffcc830 0x400d1cf2:0x3ffcc850 0x400d2e37:0x3ffcc8a0 0x400ef9c7:0x3ffcc8f0 0x4008dae5:0x3ffcc910
Rebooting…
line 267 is a counter for the number of Locos, I set it 1 in the config file
Can anybody help me?
One more question. I have to set the IP adress for the MQTT. Is it “localhost” if it is running on the same Win 10 Notebook. Where do I get it? -
February 13, 2021 at 10:41 #2382Herbert S.Participant
Hi Max, thank you for your hint with the Boot/Rst pins. So far I have not even noticed them. I’m a beginner with microcontrollers.So you really have to write some tutorial for Mattzo and Arduino/Controllers. But my problem is still not solved. When uploading everything looks good to me: these are the last messages from Arduino
Compressed 3072 bytes to 128…
Wrote 3072 bytes (128 compressed) at 0x00008000 in 0.0 seconds (effective 1170.3 kbit/s)…
Hash of data verified.Leaving…
Hard resetting via RTS pin…
When I press Boot/RTS, the flashing and rebooting stops, but now, the monitor writes the system is waiting for download again:
Rebooting…
ets Jun 8 2016 00:22:57rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
ets Jun 8 2016 00:22:57rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
Rebooting…
ets Jun 8 2016 00:22:57rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1216
ho 0 tail 12 room 4
load:0x40078000,len:9720
ho 0 tail 12 room 4
load:0x40080400,len:6352
entry 0x400806b8
ets Jun 8 2016 00:22:57rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
so it is in infinite loop, pressing Boot or Reset by itself had no effect, so far from Arduino I got correctly the MAC Adress, but an original boot with the Mattzo Controller ID did not happen. Right now, I have only one ESP32, so I cannot change the hardware. Any Ideas?-
February 13, 2021 at 15:03 #2383MaxParticipant
Hi Herbert,
you need to press the button from the begining until the very end of the flash.
I am happy to help you out!
But as some problems are very controller or Arduino related, I think it is easier to find solutions for those on other ressources like Arduino Forums.You can find some hints in the thread MattzoBricks Train Automation for Beginners
-
-
April 8, 2021 at 00:26 #3058wwwchrisdeParticipant
Hello there in this nice little Bricktrainworld. I love this wonderful project as I come from the golden 12V LEGO train ages where switches, level crossings and their signals as well as decouplers were remotely controlled.
I just offered me the 10277 crocodile last week along with a PoweredUp Hub and an AZ-Delivery ESP32 DevKitC V4 with it and I am since then trying to get it controllable from my MacBookPro.
I installed the necessary software, included all the libraries and configured my network settings in the corresponding file.
const int NUM_LOCOS = 1; locoConf[0] = (MattzoLocoConfiguration){ .locoName = "Krokodil", .locoAddress = 10277, .accelerationInterval = 100, .accelerateStep = 2, .brakeStep = 2 }; const int NUM_HUBS = 1; hubConf[0] = (MattzoPUHubConfiguration){ .hubName = "CROCO", .macAddress = "90:84:2b:22:3a:4b", .devicePortA = MattzoPUDevice::PU_MOTOR, .configMotorA = 1, .devicePortB = MattzoPUDevice::NONE, .configMotorB = 0, .locoAddress = 10277 };
I started Mosquitto and were able to verify that it receives the Rocrail commands:
rocrail/service/info <lc id="CROCO" V="83" fn="false" dir="true" throttleid="rv16635" controlcode="" slavecode="" server="infwD1904330" iid="29799" uid="0" sid="0" addr="10277" secaddr="0" placing="true" blockenterside="true" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="1020" mtime="0" rdate="1617832985" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="0" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/>
I managed to upload the firmware and my network controller showed me the AZ-Delivery ESP32 V4 I use with an IP Adress and the generated MattzoID in the hostname. I managed to find the MAC Adress of the Hub and added this information to the config file. I rey-loaded the firmware to the controller but it didn’t show up as active device in my network.
Those are the following messages I got from the serial monitor:
00:18:10.936 -> ⸮IE⸮⸮r:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
00:18:10.936 -> mode:DIO, clock div:1
00:18:10.936 -> load:0x3fff0018,len:4
00:18:10.936 -> load:0x3fff001c,len:1216
00:18:10.936 -> ho 0 tail 12 room 4
00:18:10.936 -> load:0x40078000,len:10944
00:18:10.936 -> load:0x40080400,len:6388
00:18:10.956 -> entry 0x400806b4
00:18:11.269 ->
00:18:11.269 -> MattzoController booting…
00:18:11.302 -> Loaded mattzoControllerId from EEPROM: 29799
00:18:11.302 -> Connecting as MTC4PU29799 to Wifi ncis
00:18:11.405 -> [1] MattzoController setup completed.
00:18:11.405 -> [1] Discovering Powered Up Hubs…
00:18:13.512 -> [1] Powered Up Hub found. MAC Address: 90:84:2b:22:3a:4b
00:18:13.512 -> .
00:18:13.512 -> [1] Initializing hub CROCO (90:84:2b:22:3a:4b)…
00:18:13.547 -> [1] Connecting to hub 0…
00:18:14.522 -> [1] Connected to hub 0.
00:18:14.522 -> [1] sending mqtt: roc2bricks/connectionStatus MTC4PU29799 CROCO (90:84:2b:22:3a:4b) connected
00:18:14.555 -> .
00:18:15.034 -> .
00:18:15.527 -> .
00:18:16.049 -> .
00:18:16.538 -> .
00:18:17.066 -> .
00:18:17.556 -> .
00:18:18.042 -> .
00:18:18.570 -> .
00:18:19.063 -> .
00:18:19.545 -> .
00:18:20.069 -> .
00:18:20.562 -> .
00:18:21.052 -> .
00:18:21.265 -> [1] *** DEBUG-INFO ***
00:18:21.265 -> [1] WiFi + MQTT connection Status: 0
00:18:21.265 -> [1] Loco 0: Krokodil (10277). Target speed: 0, current speed: 0, max speed: 0
00:18:21.265 -> [1] next hub to initialize (if any): 0
00:18:21.265 -> [1] Hub 0: macAddress=90:84:2b:22:3a:4b: isConnecting()=0 isConnected()=1 status=1
00:18:21.265 -> [1] Free heap size: 139448
00:18:21.300 -> [1] Leargest free heap block: 113792
00:18:21.300 -> [1] Minimm free heap size since boot: 136376
00:18:21.300 -> [1] ******************The ESP won’t connect to the Wifi anymore. I uploaded a wifi test to the board that immediately connected to my wifi with the exact settings I provided in the config file for the MTC4PU so I am sure that it’s not an hardware issue.
Any ideas on how to proceed here? Thanks for your support and good night.
wwwchrisde
-
April 8, 2021 at 10:14 #3067Matthias RunteKeymaster
Hi Chris,
I have my roots in the golden 12V age as well.We have experienced a couple of problems on ESP32 boards when trying to connect to connect to WiFi and Bluetooth concurrently. Usually it helps to reboot the controller a couple of times.
Please make sure you are using Firmware 0.4 or above – we have improved the stability of the connection procedere with 0.4. WiFi connectivity should be working now without a problem. The controller will now establish the WiFi connection at first and only thereafter start to connect to Bluetooth devices. This seems to work more reliably on most boards.
We are actively working on improving to control bluetooth devices. The next version of the MTC4PU will likely also connect to SBricks and is (hopefully) going to work significantly better in terms of reliability and stability.
Cheers,
Mattze-
April 8, 2021 at 13:26 #3072wwwchrisdeParticipant
Hello Mattze, I Süd- the latest Firmware 0.4.1 for the Project. I will try rebooting multiple times. shall I use the reset button or just cut power and power on again?
-
April 8, 2021 at 13:34 #3074Matthias RunteKeymaster
Reset button should do, powering the unit off for 20+ seconds might help in severe crash situations.
-
-
-
-
April 8, 2021 at 01:18 #3064Matthias EnderParticipant
You need an password protected network. could you try it with the reset button on the board? an try an other network?
-
April 8, 2021 at 10:49 #3069wwwchrisdeParticipant
Hello Matthias, thanks for your quick answer. The network I use is password protected and I provided both SSID and password in the network configuration file. The controller did once connect to the wifi using those credentials but with subsequent flashes e.g. to add the MAC Address of the PU Hub it didn’t reconnect anymore.
I tried the reset button but that didn’t work either. Will try to set up a different wifi later in the day and see if that works.
-
April 8, 2021 at 11:29 #3070wwwchrisdeParticipant
No change when trying to connect to a freshly created wifi with SSID and password. Serial monitor shows that the controller tries to connect to the right wifi but I don’t get a success message and the controller doesn’t show up in the network environment.
-
April 8, 2021 at 12:58 #3071Matthias RunteKeymaster
Hmm, good question. Sure you try to connect to a 2.4 GHz network? ESP32s can not connect to 5 GHz networks.
-
April 8, 2021 at 13:27 #3073wwwchrisdeParticipant
My APs create the networks on 2.4 and 5.0 simultaneously
-
-
-
-
April 8, 2021 at 17:42 #3076ZoltanParticipant
Hi, exactly the same here.
Ich habe das gleiche Problem.
Board ist “AZDelivery ESP32 NodeMCU Module WLAN WiFi Dev Kit C Development Board mit CP2102”, im Arduino IDE Board Manager ist “ESP 32 Dev Module” ausgewählt.
Ich habe die notwendigen Parametern (SSID, Passwort, MQTT Broker IP und Port) in Netconfig korrekt eingetragen, ebenfalls die Lokadresse und Namen und die MAC Adresse des Hubs dem Mattzo Sketch korrekt angegeben.
Port A hat einen Motor, Port B hat nichts.
Compile und Upload funktioniert.
In Rocrail habe ich die Lokadresse und die Fahrstufen auch korrekt eingetragen.
Rocrail spricht MQTT korrekt an:
<lc id="LPERS" bus="0" addr="3001" V="25" fn="false" dir="true" usesecaddr="false" throttleid="rv4101" controlcode="" slavecode="" server="infw5C000ED0" iid="" uid="0" sid="0" secaddr="0" placing="true" blockenterside="true" blockenterid="" modeevent="false" mode="stop" modereason="" resumeauto="false" manual="false" shunting="false" standalone="false" blockid="" destblockid="" runtime="244" mtime="0" rdate="1617893601" mint="0" active="true" waittime="0" scidx="-1" scheduleid="" tourid="" scheduleinithour="16" len="0" weight="0" train="" trainlen="0" trainweight="0" V_realkmh="0" fifotop="false" image="LPERS.png" imagenr="0" energypercentage="0" lookupschedule="false" pause="false" consist=""/> <exception text="id=LPERS: addr=3001, protocol=default, calculated speed=63, command=- V=25, dir=fwd, lights=off, throttleid=rv4101" level="16384" id="9999"/>
Serial Monitor zeigt, dass der Controller gut bootet und auch zum Hub connectet:
6:55:10.398 -> ets Jun 8 2016 00:22:57 16:55:10.398 -> 16:55:10.398 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) 16:55:10.398 -> configsip: 0, SPIWP:0xee 16:55:10.398 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 16:55:10.398 -> mode:DIO, clock div:1 16:55:10.398 -> load:0x3fff0018,len:4 16:55:10.398 -> load:0x3fff001c,len:1216 16:55:10.398 -> ho 0 tail 12 room 4 16:55:10.431 -> load:0x40078000,len:10944 16:55:10.431 -> load:0x40080400,len:6388 16:55:10.431 -> entry 0x400806b4 16:55:10.729 -> 16:55:10.762 -> MattzoController booting... 16:55:10.762 -> Loaded mattzoControllerId from EEPROM: 51908 16:55:10.762 -> Connecting as MTC4PU51908 to Wifi PBS-6074F5 16:55:10.861 -> [1] MattzoController setup completed. 16:55:10.894 -> [1] Discovering Powered Up Hubs... 16:55:12.948 -> [1] Powered Up Hub found. MAC Address: 90:84:2b:1f:43:9d 16:55:12.981 -> . 16:55:12.981 -> [1] Initializing hub LPERS (90:84:2b:1f:43:9d)... 16:55:12.981 -> [1] Connecting to hub 0... 16:55:13.809 -> [1] Connected to hub 0. 16:55:13.809 -> [1] sending mqtt: roc2bricks/connectionStatus MTC4PU51908 LPERS (90:84:2b:1f:43:9d) connected 16:55:13.809 -> . 16:55:14.305 -> . 16:55:14.802 -> . 16:55:15.299 -> . 16:55:15.795 -> . 16:55:16.325 -> .
Aber er connectet nicht zu Wifi!
Zwischen
16:55:10.762 -> Connecting as MTC4PU51908 to Wifi PBS-6074F5
und
16:55:10.861 -> [1] MattzoController setup completed.
müsste doch die Quittung vom Wifi Connect kommen?
Er erscheint nicht im Heimnetz (10.0.0.x) und meldet daher natürlich auch nichts ins MQTT und bekommt auch nichts vom MQTT.
Mehrere Resets und Power Cycles helfen nicht. Das DIng connectet nicht zur WLAN.
Ich habe eine andere SW auch getestet: dort connectet der ESP zur gleichen Wifi, und ich kann die gleiche Lok vie BT mit der Z21 App steuern. HW Issues und Inkompatibilitäten schliesse ich damit aus.
Was ist hier faul?
Für jede Hilfe bin ich dankbar.
-
April 9, 2021 at 12:05 #3080wwwchrisdeParticipant
Hi, schön zu sehen dass ich nicht der einzige mit dem Problem bin. Da ich neu in diesem Gebiet bins suche ich den Grund für’s scheitern erst mal bei mir 😉 bin jetzt doch beruhigt und hoffe dass es da bald eine Lösung für gibt – vielleicht eine Pause bis das Wifi connect zurückgemeldet wird bevor die Bluetooth Verbindungen aufgebaut werden? Nur so eine noob Idee.
-
-
April 9, 2021 at 20:38 #3081ZoltanParticipant
Ich bin beim debuggen. Da ich kein Programmiergenie bin, und Mattzes Code ziemlich kompliziert ist, kann ich es nur mit zeilenweise Debuggen machen. Bis jetzt sieht es so aus, dass das Problem irgendwo im mattzocontroller.h beim wificheck/wifireconnect ist, da loopt er aber connectet nicht. Morgen werde ich versuchen, weiter einzugrenzen und ich werde die Logs hier einschreiben. Vielleicht kann Mattze damit etwas anfangen und uns helfen.
Frage: gibt es jemanden, bei dem es funktioniert? Und wenn ja, mit welcher Version? Lohnt es sich evtl. mit V0.3 zu experimentieren?
-
April 10, 2021 at 12:22 #3082ZoltanParticipant
So, ich habe folgendes gefunden (?).
In MattzoController_Library.h in der Funktion void checkWifi() geht er weder in den “if”-Ast, und schreibt ” wifi lost”, noch in den “else if”-Ast und schreibt “Wifi connected”, sondern fällt durch und geht wieder ins reconnectWiFi hinein – und damit loopt er unendlich.
Ich kann natürlich nichts nachvollziehen, ob er sich evtl. schon im WiFi.h (den es neu beim ESP32 lib gibt) etwas neues holt, was hier nicht verdaut wird – Hauptsache, er schreibt kein “connect” (und ruft auch den OTA Listener nicht auf).
Ich bin am Ende meiner Latein, Mattze, schau bitte nach, was wir falsch machen…!
Danke!
-
April 10, 2021 at 14:41 #3083ZoltanParticipant
So, die Lok läuft nun.
Die alte (V0.3) Version von MTC4PU funktioniert.
Die neuere (V0.4) Version von MTC4PU konnte ich nicht zum Laufen bringen.
Nun, nur Mattze kann es herausfinden, ob ich (wir) etwas falsch machen, oder ob im Code etwas noch nicht 100% stimmt.
-
April 10, 2021 at 18:28 #3084wwwchrisdeParticipant
Hi, kann man die V 0.3 noch irgendwo laden? Bin erst letzte Woche hier gelandet und habe auf def Seite nur die 0.4 und 0.4.1 geladen.
-
-
April 10, 2021 at 18:52 #3085ZoltanParticipant
Ich weiß es nicht, aber Mattze kann dir sicher helfen.
(Er scheint hier zZ nicht zu lesen, schreibe ihn vielleicht per Mail an.)
Ich habe zwar die alten Versionen, aber ohne Mattzes Erlaubnis kann ich sie dir nicht schicken – ich weiß nicht, wie er dazu stehen würde.
-
April 11, 2021 at 13:30 #3086Matthias RunteKeymaster
Ich lade die alten Versionen demnächst mal hoch und baue ein Archiv auf. Meine Behauptung wäre jedoch, dass die 0.4.1 besser ist als die 0.3.
Was mir noch eingefallen ist: als Ihr das Update heruntergeladen habt, habt Ihr da auch die Datei MattzoController_Library.h im Arduino-Library Verzeichnis aktualisiert? Da waren auch Änderungen drin.
-
April 11, 2021 at 13:39 #3101Matthias RunteKeymaster
I added download links for older firmware versions on the firmware page.
-
April 11, 2021 at 20:48 #3104wwwchrisdeParticipant
Danke für die V 0.3 – damit lief das Krokodil sofort und stabil.
-
-
April 11, 2021 at 15:05 #3102ZoltanParticipant
Vielen Dank für die Bereitstellung der alten Version(en).
So ein Archiv ist immer gut.Ja, ich habe den ganzen Firmware Batch heruntergeladen, auch den MattzoController_Library.h.
Da sind wirklich änderungen drin (die ganze Geschichte mit dem reconnectwifi, wo auch das wifi.begin diesmal drin ist, vielleicht liegt hier der Hund begraben? Kannst nur du herausfinden…)“Meine Behauptung wäre jedoch, dass die 0.4.1 besser ist als die 0.3.”
Sicherlich ist das so, denn nicht umsonst hast du mit dem Upgrade gearbeitet – aber was sollen wir tun, wenn V0.4 nicht funktioniert? (bei den beiden relevanten Files sind V4.0 und V4.0.1 identisch bis auf die Zeilenenden)
In dem erwähnten Stück (checkwifi) im MattzoController_Library.h geht er weder is “if”, noch ins “else if” hinein, sondern “fällt unten durch”.
-
April 11, 2021 at 19:51 #3103Matthias EnderParticipant
Bei mir läuft die V0.4 wunderbar. Die V0.4.1 habe ich noch nicht getestet.
-
April 11, 2021 at 21:29 #3105ZoltanParticipant
Interessant. Bei mir lief V0.4.x nicht. V0.3 schon. Und bei Chris war es auch so.
Hauptsache wir haben alle funktionierende Controller 🙂
-
April 12, 2021 at 13:02 #3107Matthias RunteKeymaster
Was für einen ESP-32 Controller-Typ habt Ihr verwendet?
- This reply was modified 3 years ago by Matthias Runte.
-
April 12, 2021 at 14:16 #3109wwwchrisdeParticipant
Ich habe einen AZDelivery ESP32 Dev Kit C V4 NodeMCU gekauft.
-
April 12, 2021 at 19:43 #3110ZoltanParticipant
Wie im Beitrag #3076 geschrieben: Board ist “AZDelivery ESP32 NodeMCU Module WLAN WiFi Dev Kit C Development Board mit CP2102”, im Arduino IDE Board Manager ist “ESP 32 Dev Module” ausgewählt. Er funzt mit V0.3 gut, und mit einem anderen SW mit der selben BT Library funzt es auch. Ich werde irgendwann noch einmal versuchen, von Grund auf mit V4.0.1 (oder evtl. neuer wenn ein neuer kommt) wieder, aber vorerst “never touch a running system” solange ich mit V0.3 glücklich bin 🙂
-
April 12, 2021 at 23:02 #3111Matthias RunteKeymaster
Okay. Und das Library File hattet Ihr aktualisiert, oder?
-
April 13, 2021 at 06:39 #3112ZoltanParticipant
Ich habe das komplette Paket aktualisiert. Auch die Files, die ich nicht benutze (zB. SignalController). Dann habe ich die entsprechenden Files editiert, kompiliert und draufgeladen.
-
April 13, 2021 at 11:33 #3113wwwchrisdeParticipant
Welches Library file meinst Du? Die MattzoController_Network_Configuration.h habe ich selbstverständlich mit den Daten des WLAN gefüttert.
Ich habe die Firmware Datei extrahiert und komplett den Ordner MatzzoBricks der im Archiv im Unterordner libraries war in meinen Ordner Dokumente/Arduino/libraries verschoben. Dort habe ich dann die Network Configuration bearbeitet und mit SSID und PW versehen.
Das Projekt habe ich direkt am Ort belassen wohin es extrahiert wurde und dort die entsprechenden Änderungen in der Config Datei gemacht.
Als Boardtyp habe ich auch “ESP32 Dev Module” in Arduino ausgewählt.
Die gleiche Vorgehensweise hat mit V 0.3 zum Erfolg geführt.
Grüße aus Mannheim
Chris
-
April 13, 2021 at 11:48 #3114Matthias RunteKeymaster
Ich meine die Datei “MattzoController_Library.h”. Bitte diese Datei auch aktualisieren falls noch nicht geschehen.
Der Update-Prozess ist derzeit noch etwas hakelig. Wir arbeiten dran.
- This reply was modified 3 years ago by Matthias Runte.
-
April 13, 2021 at 13:47 #3117ZoltanParticipant
MattzoController_Library.h wurde selbstverständlich auch aktualisiert – trotzdem hat 4 nicht funktioniert, die alte 3 dagegen schon.
-
-
-
April 13, 2021 at 12:00 #3116wwwchrisdeParticipant
Hatte bei V 0.4.1 im Ordner Arduino/libraries/MattzoBricks folgende Dateien liegen:
- MattzoController_Library.h
- MattzoController_Network_Configuration.h (editiert)
- MattzoPowerFunctions.cpp
- MattzoPowerFunctions.h
Habe gerade nochmal den kompletten Library Ordner der v 0.3 aus dem Arduino Folder weggeschoben und den 0.4.1 reingeschoben. Die Konfiguration habe ich 1:1 aus der v 0.3 übernommen kompiliert und hochgeladen – connect Bluetooth funktioniert, Wifi nicht.
Das Ganze in die andere Richtung gemacht und Lok läuft sofort wieder.Soweit mal ein Update zur Reproduzierbarkeit des Problems. Für’s erste reicht mir das mal um im Kleinen damit rumzuspielen.
Danke für die tolle Arbeit.
- This reply was modified 3 years ago by wwwchrisde. Reason: Additional information
-
May 23, 2021 at 18:13 #3313Rob AlblasParticipant
Hi,
I did run into the same issue as Zoltan and Chris. I am also using the AZDelivery ESP32 Dev Kit C V4 NodeMCU.
I was wondering: on which ESP32 NodeMCU does the 0.4.1 version of the code work?
Regards,
Rob -
May 24, 2021 at 21:52 #3315Rob AlblasParticipant
Hi,
Just set up the MTC4PU with the 0.3 firmware. Worked flawlessly!
Rob
-
May 25, 2021 at 08:16 #3316Olivier AuParticipant
Hello,
I had the same issue with the ESP32 board not connecting to my wifi.
I have added line 229 in the MattzoController_library.h file the following:Serial.print(“Connecting”);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(“.”);
}Now it connects to the wifi and the board works with no issue!
Board used is Espressif ESP32-Wroom-32.
Thanks.
-
May 25, 2021 at 08:42 #3317MaxParticipant
Hi Olivier,
thank you for this solution! We’ll analyse this and include it in the next version as a fix.
Stay tuned! 🙂
-
-
AuthorPosts
- You must be logged in to reply to this topic.