Welcome to MattzoBricks Forums MattzoBricks General Forum Implementation of V1.2.2 with W5500

Viewing 2 reply threads
  • Author
    Posts
    • #8509
      Des MatejkaDes Matejka
      Participant

      This topic refers to my last post where I have tried to use a W5500 Ethernet module without success.

      I’m including the code for the W5500 Ethernet module.

      Hopefully some advice will follow.

      [1] Setup: Starting MTC4BT…
      [1] Setup: Loading network configuration…
      Syslog: Server: 192.168.1.1:514
      Syslog: Hostname: mtc4bt
      Syslog: Appname: MTC4BT
      [0000] [1] [INFO] Logging: Configured.
      [0001] [1] [DEBUG] Reading lookuptable
      [0002] [1] [INFO] Setup: Loading controller configuration…
      [0003] [1] [INFO] Config: Read controller name: gb_t_1-4_c-1-4f_eth
      [0004] [1] [INFO] Config: Read ESP pin configuration (1).
      [0005] [1] [DEBUG] hub address: “90:84:2b:21:24:78”, config address: “90:84:2b:21:24:78”
      [0006] [1] [DEBUG] Number of triggers (2) and actions (1) loaded for this event.
      [0007] [1] [DEBUG] hub address: “90:84:2b:21:24:78”, config address: “90:84:2b:21:24:78”
      [0008] [1] [DEBUG] Number of triggers (3) and actions (1) loaded for this event.
      [0009] [1] [DEBUG] Number of events loaded: 2.
      [0010] [1] [DEBUG] hub address: “90:84:2b:21:d7:01”, config address: “90:84:2b:21:d7:01”
      [0011] [1] [DEBUG] Number of triggers (2) and actions (1) loaded for this event.
      [0012] [1] [DEBUG] hub address: “90:84:2b:21:d7:01”, config address: “90:84:2b:21:d7:01”
      [0013] [1] [DEBUG] Number of triggers (3) and actions (1) loaded for this event.
      [0014] [1] [DEBUG] Number of events loaded: 2.
      [0015] [1] [DEBUG] hub address: “90:84:2b:21:92:08”, config address: “90:84:2b:21:92:08”
      [0016] [1] [DEBUG] Number of triggers (2) and actions (1) loaded for this event.
      [0017] [1] [DEBUG] hub address: “90:84:2b:21:92:08”, config address: “90:84:2b:21:92:08”
      [0018] [1] [DEBUG] Number of triggers (3) and actions (1) loaded for this event.
      [0019] [1] [DEBUG] Number of events loaded: 2.
      [0020] [1] [DEBUG] hub address: “90:84:2b:21:92:0c”, config address: “90:84:2b:21:92:0c”
      [0021] [1] [DEBUG] Number of triggers (2) and actions (1) loaded for this event.
      [0022] [1] [DEBUG] hub address: “90:84:2b:21:92:0c”, config address: “90:84:2b:21:92:0c”
      [0023] [1] [DEBUG] Number of triggers (3) and actions (1) loaded for this event.
      [0024] [1] [DEBUG] Number of events loaded: 2.
      [0025] [1] [DEBUG] Starting reading remotes json
      [0026] [1] [DEBUG] freeButtonItem action 34 device 1.
      [0027] [1] [DEBUG] freeButtonItem action 35 device 1.
      [0028] [1] [DEBUG] freeButtonItem action 36 device 1.
      [0029] [1] [DEBUG] freeButtonItem action 2 device 1.
      [0030] [1] [DEBUG] freeButtonItem action 2 device 1.
      [0031] [1] [DEBUG] freeButtonItem action 49 device 6.
      [0032] [1] [DEBUG] freeButtonItem action 48 device 6.
      [0033] [1] [DEBUG] Config: number of remotes 1.
      [0034] [1] [DEBUG] Starting reading remotes json
      [0035] [1] [DEBUG] freeButtonItem action 34 device 1.
      [0036] [1] [DEBUG] freeButtonItem action 35 device 1.
      [0037] [1] [DEBUG] freeButtonItem action 36 device 1.
      [0038] [1] [DEBUG] freeButtonItem action 2 device 1.
      [0039] [1] [DEBUG] freeButtonItem action 2 device 1.
      [0040] [1] [DEBUG] freeButtonItem action 49 device 6.
      [0041] [1] [DEBUG] freeButtonItem action 48 device 6.
      [0042] [1] [DEBUG] Config: number of remotes 1.
      [0043] [1] [DEBUG] Starting reading remotes json
      [0044] [1] [DEBUG] freeButtonItem action 34 device 1.
      [0045] [1] [DEBUG] freeButtonItem action 35 device 1.
      [0046] [1] [DEBUG] freeButtonItem action 36 device 1.
      [0047] [1] [DEBUG] freeButtonItem action 2 device 1.
      [0048] [1] [DEBUG] freeButtonItem action 2 device 1.
      [0049] [1] [DEBUG] freeButtonItem action 49 device 6.
      [0050] [1] [DEBUG] freeButtonItem action 48 device 6.
      [0051] [1] [DEBUG] Config: number of remotes 1.
      [0052] [1] [DEBUG] Starting reading remotes json
      [0053] [1] [DEBUG] freeButtonItem action 34 device 1.
      [0054] [1] [DEBUG] freeButtonItem action 35 device 1.
      [0055] [1] [DEBUG] freeButtonItem action 36 device 1.
      [0056] [1] [DEBUG] freeButtonItem action 2 device 1.
      [0057] [1] [DEBUG] freeButtonItem action 2 device 1.
      [0058] [1] [DEBUG] freeButtonItem action 49 device 6.
      [0059] [1] [DEBUG] freeButtonItem action 48 device 6.
      [0060] [1] [DEBUG] Config: number of remotes 1.
      [0061] [1] [INFO] CTRL: Local channels initialized.
      [0062] [1] [DEBUG] Init remote
      [0063] [1] [DEBUG] Init remote
      [0064] [1] [DEBUG] Init remote
      [0065] [1] [DEBUG] Init remote
      [0066] [1] [INFO] Setup: Controller configuration completed.
      [0067] [1] [INFO] setup: WiFi Event ID: 4
      [0068] [1] [DEBUG] [WiFi-event] event: 0

      [0069] [1] [DEBUG] WiFi interface ready
      [0070] [1] [DEBUG] [WiFi-event] event: 2

      [0071] [1] [DEBUG] WiFi client started
      [0072] [1] [INFO] Wifi: Connecting to DigiFX 2.4GHz.
      [0073] [1] [INFO] Wait for WiFi/ETH…
      [0074] [1] [INFO] MQTT: Connecting to 192.168.1.207:1883…
      [0075] [1] [INFO] Setup: Initializing BLE…
      [0076] [1] [INFO] Setup: MattzoTrainController for BLE running.
      [0077] [1] [INFO] Setup: Number of locos to discover hubs for: 4
      [0078] [1] [INFO] Setup: Number of remotes to discover hubs for: 4
      [0079] [1] [DEBUG] SetE-Brake: 1
      [0080] [1] [DEBUG] SetE-Brake: 1
      [0081] [1] [DEBUG] SetE-Brake: 1
      [0082] [1] [DEBUG] SetE-Brake: 1
      [0083] [0] [INFO] BLE : Scanning for 8 hub(s)…
      [0084] [0] [INFO] BLE : Discovered unknown device: (61:4f:93:af:e5:7c).
      [0085] [0] [INFO] BLE : Discovered unknown device: (76:58:d8:2d:bb:7a).
      [0086] [0] [INFO] BLE : Discovered unknown device: (57:e6:95:52:5c:61).
      [0087] [0] [INFO] BLE : Discovered unknown device: (46:fe:60:64:74:d6).
      [0088] [0] [INFO] BLE : Discovered unknown device: (65:7a:14:1d:df:3e).
      [0089] [0] [INFO] BLE : Discovered unknown device: (46:04:3a:a7:82:d6).
      [0090] [0] [INFO] BLE : Discovered unknown device: (50:32:37:c3:e1:74).
      [0091] [0] [INFO] BLE : Discovered unknown device: (74:2a:3d:9a:28:ad).
      [0092] [0] [INFO] BLE : Discovered unknown device: (42:08:5f:98:ed:9e).
      [0093] [0] [INFO] BLE : Discovered unknown device: (e7:22:cd:33:56:1c).
      [0094] [0] [INFO] BLE : Discovered unknown device: (54:c4:7e:04:7e:a4).
      [0095] [0] [INFO] BLE : Scanning for 8 hub(s) aborted.
      [0096] [1] [DEBUG] [WiFi-event] event: 5

      [0097] [1] [DEBUG] Disconnected from WiFi access point
      WiFi lost connection. Reason: 203
      [0098] [1] [DEBUG] [WiFi-event] event: 4

      [0099] [1] [DEBUG] Connected to access point
      [0100] [1] [DEBUG] [WiFi-event] event: 7

      Obtained WiFi IP address: 192.168.1.106
      WiFi connected
      IP address:
      192.168.1.106
      MAC Address: 2C:BC:BB:0C:27:88
      [0101] [1] [INFO] Try mqtt reconnect…
      [0102] [1] [INFO] MQTT: Connected gb_t_1-4_c-1-4f_eth
      [0103] [1] [INFO] Reconnected!
      [0104] [1] [DEBUG] SetE-Brake: 0
      [0105] [1] [DEBUG] SetE-Brake: 0
      [0106] [1] [DEBUG] SetE-Brake: 0
      [0107] [1] [DEBUG] SetE-Brake: 0
      [0108] [1] [INFO] MQTT: Received ‘shutdown’ command. Stopping all locos.
      [0109] [1] [DEBUG] SetE-Brake: 1
      [0110] [1] [DEBUG] SetE-Brake: 1
      [0111] [1] [DEBUG] SetE-Brake: 1
      [0112] [1] [DEBUG] SetE-Brake: 1
      [0113] [0] [INFO] BLE : Scanning for 8 hub(s)…
      [0114] [0] [INFO] BLE : Discovered unknown device: (e7:80:e6:89:e6:bd).
      [0115] [0] [INFO] BLE : Discovered unknown device: (ce:8c:39:b4:15:00).
      [0116] [0] [INFO] BLE : Scanning for 8 hub(s) aborted.
      [0117] [0] [INFO] BLE : Scanning for 8 hub(s)…
      [0118] [0] [INFO] BLE : Discovered hub: (90:84:2b:21:92:08).
      [0119] [0] [INFO] BLE : Discovered unknown device: (c5:e0:c6:a9:f3:7c).
      [0120] [0] [INFO] BLE : Discovered unknown device: (ea:28:00:8c:a3:ef).
      [0121] [0] [INFO] BLE : Discovered unknown device: (d7:77:4a:4a:b2:da).
      [0122] [0] [INFO] BLE : Scanning for 8 hub(s) aborted.
      [0123] [0] [INFO] BLE : Connecting to hub ’90:84:2b:21:92:08’…
      [0124] [0] [DEBUG] hub created: 1073663160 (90:84:2b:21:92:08)
      [0125] [0] [INFO] BLE : Connected to hub ’90:84:2b:21:92:08′.
      [0126] [0] [DEBUG] connected connected address 90:84:2b:21:92:08, has callback 1
      [0127] [0] [INFO] BLE : Watchdog timeout not set for PU hubs
      [0128] [0] [INFO] PU : Found integrated RGB LED at port 32
      [0129] [0] [INFO] Loop: Connected to all hubs of loco ‘7740 Int City’.
      [0130] [0] [INFO] BLE : Scanning for 7 hub(s)…
      [0131] [0] [INFO] BLE : Discovered hub: (90:84:2b:21:24:78).
      [0132] [0] [INFO] BLE : Discovered hub: (90:84:2b:21:d7:01).
      [0133] [0] [INFO] BLE : Discovered hub: (90:84:2b:21:92:0c).
      [0134] [0] [INFO] BLE : Scanning for 7 hub(s) aborted.
      [0135] [0] [INFO] BLE : Connecting to hub ’90:84:2b:21:24:78’…
      [0136] [0] [DEBUG] hub created: 1073658248 (90:84:2b:21:24:78)
      [0137] [0] [INFO] BLE : Connected to hub ’90:84:2b:21:24:78′.
      [0138] [0] [DEBUG] connected connected address 90:84:2b:21:24:78, has callback 1
      [0139] [0] [INFO] BLE : Watchdog timeout not set for PU hubs
      [0140] [0] [INFO] PU : Found integrated RGB LED at port 32
      [0141] [0] [INFO] Loop: Connected to all hubs of loco ‘7777 Steam Tender’.
      [0142] [0] [INFO] BLE : Connecting to hub ’90:84:2b:21:d7:01’…
      [0143] [0] [DEBUG] hub created: 1073669768 (90:84:2b:21:d7:01)
      [0144] [0] [INFO] BLE : Connected to hub ’90:84:2b:21:d7:01′.
      [0145] [0] [DEBUG] connected connected address 90:84:2b:21:d7:01, has callback 1
      [0146] [0] [INFO] BLE : Watchdog timeout not set for PU hubs
      [0147] [0] [INFO] PU : Found integrated RGB LED at port 32
      [0148] [0] [INFO] Loop: Connected to all hubs of loco ‘10219 Maersk’.
      [0149] [0] [INFO] BLE : Connecting to hub ’90:84:2b:21:92:0c’…
      [0150] [0] [WARN] BLE : Max clients reached – no more connections available.
      [0151] [0] [WARN] Loop: Connect failed. Will retry…
      [0152] [0] [INFO] BLE : Scanning for 4 hub(s)…
      [0153] [0] [INFO] BLE : Discovered hub: (90:84:2b:21:92:0c).
      [0154] [0] [INFO] BLE : Discovered unknown device: (63:fb:a3:13:f6:a0).
      [0155] [0] [INFO] BLE : Scanning for 4 hub(s) aborted.
      [0156] [0] [INFO] BLE : Connecting to hub ’90:84:2b:21:92:0c’…
      [0157] [0] [WARN] BLE : Max clients reached – no more connections available.
      [0158] [0] [WARN] Loop: Connect failed. Will retry…
      [0159] [0] [INFO] BLE : Scanning for 4 hub(s)…
      [0160] [0] [INFO] BLE : Scanning for 4 hub(s) aborted.
      [0161] [0] [INFO] BLE : Scanning for 5 hub(s)…
      [0162] [0] [INFO] BLE : Scanning for 5 hub(s) aborted.
      [0163] [0] [INFO] BLE : Scanning for 5 hub(s)…
      [0164] [0] [INFO] BLE : Discovered unknown device: (66:d5:0c:d6:76:6d).
      [0165] [0] [INFO] BLE : Scanning for 5 hub(s) aborted.
      [0166] [0] [INFO] BLE : Scanning for 5 hub(s)…
      [0167] [0] [INFO] BLE : Scanning for 5 hub(s) aborted.
      [0168] [0] [INFO] BLE : Scanning for 5 hub(s)…

      • This topic was modified 3 months ago by Des MatejkaDes Matejka. Reason: remove unnecessary code
    • #8511
      Hilbert BHilbert B
      Keymaster

      Hi Des,

      I am not seeing anything that it is trying to make a wired connection. In the file “network_config.json” have you something like this:

      
          "network" : {
              "hostname": "mtc4bt001",
              "otaPassword": "foobar",
              "type" : "wired"
      

      If "type" : "wired" is not there it won’t do wired.

      And use the [env:esp32] in platformio, this does a -DWIRED which makes the the W5500 code active.

      Without these two you never get a wired connection. In the log you should see that it is trying the wired connection.

      You should see an message with Obtained ETH IP address this indicates that you are using the wired connection.

      Hope this helps.

      Hilbert

    • #8513
      Des MatejkaDes Matejka
      Participant

      Hello Hilbert,
      Thanks for taking the time to reply.

      I;m not seeing that I have a problem.

      My “network_config.json” seems OK

      The platformio, contains -DWIRED

      I will check my hardware.

      This is from my “network_config.json” file with my network data removed

      {
      “logging”: {

      “min_level”: “debug”,
      “serial”: {

      “enabled”: true
      },
      “syslog”: {

      “enabled”: true,
      “server”: “12345”,
      “port”: 514,
      “appname”: “MTC4BT”
      }
      },
      “network” : {
      “hostname”: “mtc4bt”,
      “otaPassword”: “xxx”,
      “type” : “wired”
      },
      “wifi”: {

      “SSID”: “xxx 2.4GHz”,
      “password”: “xxx”,
      “wait”: 500
      },
      “mqtt”: {

      “broker”: “12345”,
      “port”: 1883,
      “keepalive”: 10,
      “ping”: 0
      }
      }

Viewing 2 reply threads
  • You must be logged in to reply to this topic.