Viewing 9 reply threads
  • Author
    Posts
    • #4894
      Steven ElstonSteven Elston
      Participant

      **Add this board to the working ESP32’s** I’ll spare you the mistakes/troubleshooting I went through in it getting this to work and edit to say it does. The only caveat is that to get it to load, you will need to push the “boot” button on the device when you see the ‘attempted to connect to COM XX’ when downloading-that’s it.**

      —below is the sart of the original thread—

      Anyone got the esp32doit-devkit-v1 board to work? The board is listed in VS and platformio (and I saw it on Dr. Mattzo’s MTC4BT page on his platformio upload screenshot) so I got one from amazon. It will not connect when I try to upload. (typical “Timed out error for packet header”) Tried the “boot” button trick, but it is hard to tell if it worked as I do not get the same data that is shown on the webpage.

      I cannot say I am an expert in VS or Platformio. I just downloaded them and followed the posted directions the best I could. I didn’t get any errors, but then again, I don’t know if I did it right either 😉 I’d like to get the AZ-Delivery board that Dr. Mattzo is using, but shipping to the USA is 80 euros according to their webpage!

      Any (and all) help is appreciated!

      Steve

      • This topic was modified 2 years, 2 months ago by Steven ElstonSteven Elston. Reason: added comment on top
      • This topic was modified 2 years, 2 months ago by Steven ElstonSteven Elston.
      • This topic was modified 2 years, 2 months ago by Steven ElstonSteven Elston.
      • This topic was modified 2 years, 2 months ago by Steven ElstonSteven Elston.
    • #4896
      Steven ElstonSteven Elston
      Participant

      Ok, I think I have my upload done correctly. I ran the serial Monitor after upload and this is what I got:

      > Executing task in folder Train test: C:\Users\Brickbuilder\.platformio\penv\Scripts\platformio.exe device monitor <

      — Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
      — More details at https://bit.ly/pio-monitor-filters
      — Miniterm on COM32  115200,8,N,1 —
      — Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —
      ts Jun  8
      [1] Setup: Starting MattzoTrainController for BLE…
      [1] Setup: Loading network configuration…
      Syslog: Server: 192.168.x.y:514
      Syslog: Hostname: mtc4bt      
      Syslog: Appname: MTC4BT
      [1] Logging: Configured.
      [1] Setup: Loading controller configuration…
      [1] Config: Read controller name: YourControllerNameHere
      [1] Config: Read ESP pin configuration (2).
      [1] Config: Read function configuration (1).
      [1] Config: Read function configuration (2).
      [1] Config: Read loco configuration (1).
      [1] Ctrl: Found status led attached to ESP pin 23. Initializing…
      [1] Trying to retrieve an ESP pin number from a non ESP pin device.
      [1] Setup: Initializing BLE…
      [1] Setup: Controller configuration completed.
      [1] BLE : Scanning for 1 hub(s)…
      [1] Wifi: Connecting {redacted}.[1] MQTT: Connecting to {redacted}:1883…
      [1] Setup: MattzoTrainController for BLE running.
      [1] Setup: Number of locos to discover hubs for: 1
      [0] BLE : Discovered hub: HUB NO.4 (90:84:2b:be:e2:11).
      [1] BLE : Scanning for 1 hub(s) aborted.
      [1] BLE : Connecting to hub ’90:84:2b:be:e2:11’…
      [1] BLE : Connected to hub ’90:84:2b:be:e2:11′.
      [1] BLE : Watchdog timeout successfully set to s/10:
      [1] Loop: Connected to all hubs of loco ‘60198 Cargo Train’.
      [0] port 0 is connected with device 2
      [0] port 1 is connected with device 8
      [0] port 32 is connected with device 17
      [0] Found RGB light at port 32
      [0] port 3b is connected with device 15
      [0] port 3c is connected with device 14

      Does this seem to be correct? I have never used Rocrail, so that is my next learning step

    • #4897
      Raymond BrinkRay
      Keymaster

      Hi Steven,

      The controller has read your configuration fine, found your PU hub with MAC address 90:84:2b:be:e2:11 and connected to it. So far your controller is working as expected.

      It also attempts to connect to WiFi and MQTT, but I don’t see successful connection messages. So I’d focus my attention on that first, before going to Rocrail. Your next step should be setting up WiFi and then MQTT (both are configured in network_config.json), which will function as a gateway between the controller and Rocrail. More information can be found in the General controller section, under WiFi and MQTT: https://mattzobricks.com/controllers/general

      Please ignore any references to other configuration files as those don’t apply to MTC4BT.

      Cheers,
      Ray

      • This reply was modified 2 years, 2 months ago by Raymond BrinkRay.
    • #4899
      Steven ElstonSteven Elston
      Participant

      Thanks for the reply. Yeah, I have MAC filtering on my Router and I dont see a new device trying to get on the wifi…I looked at my network_config.json file, nothing really sticks out as being incorrect.

    • #4900
      Steven ElstonSteven Elston
      Participant

      DO these ESP32’s work on 2.4Ghz or 5Ghz? I tried the Network_config with both and didn’t see anything change. I am assuming that they work over WPA2-PSK [AES] since they need a PWD in the file. Gonna take a break for the rest of the night-too much line programming for me today.

    • #4923
      Steven ElstonSteven Elston
      Participant

      — Available filters and text transformations: colorize, debug, default, direct, esp32_exception_decoder, hexlify, log2file, nocontrol, printable, send_on_enter, time
      — More details at https://bit.ly/pio-monitor-filters
      — Miniterm on COM32 115200,8,N,1 —
      — Quit: Ctrl+C | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H —

      [1] Setup: Starting MattzoTrainController for BLE…
      [1] Setup: Loading network configuration…
      Syslog: Server: redacted:514
      Syslog: Hostname: mtc4bt
      Syslog: Appname: MTC4BT
      [1] Logging: Configured.
      [1] Setup: Loading controller configuration…
      [1] Config: Read controller name: YourControllerNameHere
      [1] Config: Read ESP pin configuration (2).
      [1] Config: Read function configuration (1).
      [1] Config: Read function configuration (2).
      [1] Config: Read loco configuration (1).
      [1] Ctrl: Found status led attached to ESP pin 23. Initializing…
      [1] Trying to retrieve an ESP pin number from a non ESP pin device.
      [1] Setup: Initializing BLE…
      [1] Setup: Controller configuration completed.
      [1] BLE : Scanning for 1 hub(s)…
      [0] BLE : Discovered unknown device: (4f:b4:c9:f5:fc:d6).
      [1] Wifi: Connecting to Link Down.[1] MQTT: Connecting to redacted:1883…
      [1] Setup: MattzoTrainController for BLE running.
      [1] Setup: Number of locos to discover hubs for: 1
      [0] BLE : Discovered unknown device: (32:a2:95:a6:45:51).
      [0] BLE : Discovered hub: HUB NO.4 (90:84:2b:be:e2:11).
      [1] BLE : Scanning for 1 hub(s) aborted.
      [0] Wifi: Connected (IPv4: redacted.46).
      [0] OTA: Initialized.

      —-Got the ESP32 to connect the wifi (had an underscore between words on my SSID)—-

      Now I just have to figure out why MQTT is not working…..

      [0] MQTT: Subscriber configuring last will…
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [0] MQTT: Subscriber attempting to connect…
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [1] BLE : Connecting to hub ’90:84:2b:be:e2:11’…
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [1] BLE : Connected to hub ’90:84:2b:be:e2:11′.
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [1] BLE : Watchdog timeout successfully set to s/10:
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [1] Loop: Connected to all hubs of loco ‘60198 Cargo Train’.
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [0] port 0 is connected with device 2
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [0] port 1 is connected with device 8
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [0] Found RGB light at port 32
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [E][WiFiUdp.cpp:183] endPacket(): could not send data: 12
      [E][WiFiClient.cpp:258] connect(): socket error on fd 56, errno: 113, “Software caused connection abort”
      [0] MQTT: Subscriber connect failed, rc=4294967294. Try again in a few seconds…
      [0] MQTT: Subscriber configuring last will…
      [0] MQTT: Subscriber attempting to connect…
      [E][WiFiClient.cpp:258] connect(): socket error on fd 57, errno: 113, “Software caused connection abort”
      [0] MQTT: Subscriber connect failed, rc=4294967294. Try again in a few seconds…
      [0] MQTT: Subscriber configuring last will…
      [0] MQTT: Subscriber attempting to connect…
      Exception in thread rx:

    • #4925
      Steven ElstonSteven Elston
      Participant

      Got mosquitto to work by shutting off service in windows services and ran mosquitto -c mosquitto.conf -v from the cmd window from the mosquitto dir. probably will put that as a startup command in the window services

    • #4926
      Steven ElstonSteven Elston
      Participant

      Whohoo! Got the motor running in rocrail! now I just need to fingure out how to make the lights works and the 10,000 other things I need to learn about it….

    • #4927
      Steven ElstonSteven Elston
      Participant

      OK, it is running off a USB power brick so Other than tweaking, I can say that the esp32doit-devkit-v1 (https://www.amazon.com/ESP32-WROOM-32-Development-ESP-32S-Bluetooth-Arduino/dp/B084KWNMM4) does work

      • This reply was modified 2 years, 2 months ago by Steven ElstonSteven Elston. Reason: added link
    • #4955
      Raymond BrinkRay
      Keymaster

      Great Steven! I’ve added the DOIT DevKit to the list of supported boards for MTC4BT: https://mattzobricks.com/controllers/mtc4bt#board

      • This reply was modified 2 years, 2 months ago by Raymond BrinkRay.
      • This reply was modified 2 years, 2 months ago by Raymond BrinkRay.
Viewing 9 reply threads
  • You must be logged in to reply to this topic.