Willkommen bei MattzoBricks › Foren › MattzoTrainController for Bluetooth (MTC4BT) › Issue with W5500: UNKNOWN NETWORK TYPE
- Dieses Thema hat 10 Antworten sowie 4 Teilnehmer und wurde zuletzt vor vor 4 Monaten, 3 Wochen von
Mitja Cernich aktualisiert.
-
AutorBeiträge
-
-
April 30, 2025 um 16:44 Uhr #8484
Frank R.
TeilnehmerHi all,
As our setup continues to grow and more trains are being added, I want to use a W5500 module with the ESP32 for improved stability. Unfortunately, I haven’t been able to get it to work. When booting the ESP, I get the following messages:
[1] Setup: Starting MTC4BT…
[1] Setup: Loading network configuration…
Config: UNKNOWN NETWORK TYPE: null, falling back to wireless!
[0000] [1] [INFO] Logging: Configured.
Config: File is emptyAs described in the documentation, I added the -DWIRED flag to the common section of my my_platformio.ini:
[common] additional_build_flags = -DWIRED upload_com_port = /dev/tty.usbserial-0001
However, I also noticed that the -DWIRED flag is already present in the esp32 section of platformio.ini:
[env:esp32] board = az-delivery-devkit-v4 build_flags = ${common.additional_build_flags} ${common.build_flags} -DWIRED -DCONFIG_BT_NIMBLE_MAX_CONNECTIONS=9
Since I’m seeing the message Config: File is empty, I assume something is wrong with my configuration. Has anyone experienced this or could suggest how to debug it properly?
Thanks in advance!
-
April 30, 2025 um 17:30 Uhr #8485
Matthias Runte
AdministratorHi Frank,
welcome to the forum. Could you post your network_config.json, please?Thanks!
-
Diese Antwort wurde vor 4 Monaten, 4 Wochen von
Matthias Runte geändert.
-
Diese Antwort wurde vor 4 Monaten, 4 Wochen von
-
April 30, 2025 um 21:22 Uhr #8487
Frank R.
TeilnehmerThank you and thanks for the fast reply!
Sorry… I missed the whole network part in the network_config.json.
It is working now after I added “network” : {“type” : “wired”}. -
April 30, 2025 um 23:57 Uhr #8488
Matthias Runte
AdministratorGood to hear, perfect!
-
Mai 6, 2025 um 21:17 Uhr #8489
Mitja Cernich
TeilnehmerHi, i have the same problem:
network_config.json
{
“logging”: {“min_level”: “info”,
“serial”: {“enabled”: true
},
“syslog”: {“enabled”: true,
“server”: “192.168.x.y”,
“port”: 514,
“appname”: “MTC4BT”
}
},
“network” : {“hostname”: “mtc4bt”,
“otaPassword”: “xxxxxx”,
“type” : “wired”
},
“wifi”: {“SSID”: “Rocrail”,
“password”: “Rocc”,
“wait”: 500
},
“mqtt”: {“broker”: “192.168.0.200”,
“port”: 1883,
“keepalive”: 10,
“ping”: 0
}
}my_platformio.ini
[platformio]
default_envs = esp32; This controller must be configured through config files in the folder you define below.
; Configure your network in thenetwork_config.json
file.
; Configure the controller in thecontroller_config.json
file.
; See the/data_example
folder for example configuration files.
; Runplatformio.exe run --target uploadfs
to upload the data-folder content to the ESP32.
; moved to my_platformio.ini
; for Linux you have to add a / before $PROJECT_DIR
data_dir = /$PROJECT_DIR/data/MTC4BT1[common]
; To show memory usage every minute, uncomment the line -DTICKER=1
; To see what the hubs report back on not cached messages uncomment the lines,
; this is for debugging only and should only be used if instructed to do so
; To reduce the delays in the BLE driver loops change the value of DRIVERTASKDELAY,
; changing this yourself without a hint of the developers may cause strange behaviors
; and even crashes!
additional_build_flags =
-DWIRED
; -DTICKER=1
; -DDEBUGNOTIFYBUWIZZ2
; -DDEBUGNOTIFYPU
; -DDEBUGNOTIFYPUREMOTE
; -DDRIVERTASKDELAY=100
; -DPUFREELISTACTIONDELAY=250
upload_com_port = /dev/cu.usbserial-0001
; for macOS, just as example
;upload_com_port = /dev/tty.usb[env:esp32]
; Use either the ‘upload_port’ line above if the ESP32 is connected to your PC’s USB port or enable/configure the three lines below to use OTA updates.
; The IP address should match that of the controller on your network.
; The <otaPassword> should match the current password from the network_config.json you previously uploaded to the controller.
;upload_protocol = espota
;upload_port = 192.168.x.y
;upload_flags =
; –auth=<ota password>;[env:seeed_xiao_esp32-s3]
;upload_protocol = espota
;upload_port = 192.168.x.z
;upload_flags =
; –auth=<ota password>from the monitor on boot of eps32:
[1] Setup: Starting MTC4BT…
[1] Setup: Loading network configuration…
Syslog: Server: 192.168.x.y:514
Syslog: Hostname: mtc4bt
Syslog: Appname: MTC4BT
[0000] [1] [INFO] Logging: Configured.
Config: File is empty
[0002] [1] [INFO] Setup: Loading controller configuration…
[0003] [1] [INFO] Config: Read controller name: MTC4BT
[0004] [1] [INFO] Config: Read ESP pin configuration (0).
[0007] [1] [INFO] CTRL: Local channels initialized.
[0008] [1] [INFO] Setup: Controller configuration completed.
[0009] [1] [INFO] setup: WiFi Event ID: 4
[0016] [1] [INFO] Wait for WiFi/ETH…
[0017] [1] [INFO] MQTT: Connecting to 192.168.0.200:1883…
[0018] [1] [INFO] Setup: Initializing BLE…
[0019] [1] [INFO] Setup: MattzoTrainController for BLE running.
[0020] [1] [INFO] Setup: Number of locos to discover hubs for: 2
[0021] [1] [INFO] Setup: Number of remotes to discover hubs for: 0
[0024] [0] [INFO] BLE : Scanning for 2 hub(s)…Where am i going wrong? thank you so much
-
Mai 7, 2025 um 09:05 Uhr #8490
Matthias Runte
AdministratorCould you swtch debug info on and post the console output again? Thanks.
-
Mai 7, 2025 um 10:25 Uhr #8491
Mitja Cernich
TeilnehmerHow can I switch the debug info on? Thanks
-
Mai 7, 2025 um 10:33 Uhr #8492
Mitja Cernich
TeilnehmerOK i switch from “info to “debug” in network_config.json on logging > min_level
[1] Setup: Starting MTC4BT…
[1] Setup: Loading network configuration…
Syslog: Server: 192.168.x.y:514
Syslog: Hostname: mtc4bt
Syslog: Appname: MTC4BT
[0000] [1] [INFO] Logging: Configured.
Config: File is empty
[0001] [1] [DEBUG] No lookuptable found, or empty
[0002] [1] [INFO] Setup: Loading controller configuration…
[0003] [1] [INFO] Config: Read controller name: MTC4BT
[0004] [1] [INFO] Config: Read ESP pin configuration (1).
[0005] [1] [DEBUG] Number of events loaded: 0.
[0006] [1] [DEBUG] Number of events loaded: 0.
[0007] [1] [INFO] CTRL: Local channels initialized.
[0008] [1] [INFO] Setup: Controller configuration completed.
[0009] [1] [INFO] setup: WiFi Event ID: 4
[0010] [1] [DEBUG] [WiFi-event] event: 0[0011] [1] [DEBUG] WiFi interface ready
[0012] [1] [DEBUG] [WiFi-event] event: 2[0013] [1] [DEBUG] WiFi client started
[0014] [1] [DEBUG] [WiFi-event] event: 18[0015] [1] [DEBUG] Ethernet started
[0016] [1] [INFO] Wait for WiFi/ETH…
[0017] [1] [INFO] MQTT: Connecting to 192.168.0.200:1883…
[0018] [1] [INFO] Setup: Initializing BLE…
[0019] [1] [INFO] Setup: MattzoTrainController for BLE running.
[0020] [1] [INFO] Setup: Number of locos to discover hubs for: 2
[0021] [1] [INFO] Setup: Number of remotes to discover hubs for: 0
[0022] [1] [DEBUG] SetE-Brake: 1
[0023] [1] [DEBUG] SetE-Brake: 1
[0024] [0] [INFO] BLE : Scanning for 2 hub(s)…-
Mai 7, 2025 um 10:48 Uhr #8493
Mitja Cernich
TeilnehmerI don’t know how, but not it working:
[0031] [1] [DEBUG] [WiFi-event] event: 20[0032] [1] [DEBUG] Ethernet connected
[0033] [1] [DEBUG] [WiFi-event] event: 22Obtained ETH IP address: 192.168.0.100
ETH connected
IP address:
192.168.0.100
MAC Address: A2:A3:B3:96:47:ED
-
-
-
-
Mai 7, 2025 um 10:59 Uhr #8494
Hilbert B
AdministratorHi Mitja,
At this point you are connected via ETH to your network.
There should come a message that you are connected to MQTT.
Did you get this message?
Hilbert
-
Mai 7, 2025 um 11:00 Uhr #8495
Mitja Cernich
TeilnehmerHi Hilbert,
after a few minutes it started working
-
-
-
AutorBeiträge
- Du musst angemeldet sein, um auf dieses Thema antworten zu können.