Welcome to MattzoBricks › Forums › MattzoTrainController for Bluetooth (MTC4BT) › No BLE: Discovered shown?
- This topic has 10 replies, 3 voices, and was last updated 1 year ago by Venderwel.
-
AuthorPosts
-
-
October 15, 2023 at 14:52 #6487Wouter BreveParticipant
Hi all,
I’m completely new to this and just started.
After some puzzling I finally got the MQTT working but then everything stops. I don’t see any BLE messages as in the example, which means I can’t get any further with connecting the HUBs.
My controller_config is still empty and I get the following in the monitoring screen:1] Setup: Starting MattzoTrainController for BLE…
[1] Setup: Loading network configuration…
Syslog: Server: 1:514
Syslog: Hostname: null
Syslog: Appname: MottzoController MTC4BT v1
[0000] [1] Logging: Configured.
[0001] [1] Setup: Loading controller configuration…
[0002] [1] Config: Read controller name: MTC4BT
[0003] [1] Config: Read ESP pin configuration (0).
[0004] [1] CTRL: Local channels initialized.
[0005] [1] Setup: Initializing BLE…
[0006] [1] Setup: Controller configuration completed.
E (3382) wifi_init_default: netstack cb reg failed with 12289
[1] Wifi: Connecting to TP..
[0007] [1] MQTT: Connecting to :1883…
[0008] [1] Setup: MattzoTrainController for BLE running.
[0009] [1] Setup: Number of locos to discover hubs for: 0
[0009] [0] MQTT: Subscriber configuring last will…
[0011] [0] MQTT: Subscriber attempting to connect…
[0012] [0] MQTT: Subscriber connected
[0013] [0] MQTT: Subscriber subscribed to topic ‘rocrail/service/command’Hopefully someone can help. Thank you in advance!
-
October 16, 2023 at 18:22 #6488Matthias RunteKeymaster
I’d say the configuration in the MTC4BT is missing. Are you sure you uploaded it?
-
October 19, 2023 at 11:49 #6490Wouter BreveParticipant
controller_config.json has been added but left empty because I don’t know the mac-addresses of the Hubs yet.
I did a new installation with a folder data/MTC4BT1 containing the controller_config.json(empty) and network_config.json(Network and MQTT have connection).
This time I received two notifications:
1: platformio – under [env:esp32doit-devkit-v1] build_flags = ${my_common.build_flags} removed this and then the installation ran fine.2: message during installation:
Archiving .pio\build\az-delivery-devkit-v4\lib07b\libSPIFFS.a
lib/MCNetwork/MattzoMQTTSubscriber.cpp: In static member function ‘static void MattzoMQTTSubscriber::taskLoop(void*)’:
lib/MCNetwork/MattzoMQTTSubscriber.cpp:156:63: warning: ISO C++ forbids converting a string constant to ‘char*’ [-Wwrite-strings]
sendMessage(“roc2bricks/ping”, _subscriberName);This installation also gives the same result.
-
October 20, 2023 at 17:13 #6491Wouter BreveParticipant
I don’t know how, but I’m one step further. The problem is solved!
Thanks for your response @Mattze -
October 20, 2023 at 17:21 #6492Wouter BreveParticipant
Next problem is:
BLE : Unable to attach to remote control service.
Loop: Connect failed. Will retry…
BLE : Disconnected from hub ‘mac-adress’.
BLE : Scanning for 1 hub(s)…
BLE : Discovered hub: N03RV (mac address).
BLE : Scanning for 1 hub(s) aborted.
BLE : Connecting to hub ‘mac-adress’…
BLE : Connected to hub ‘mac-adress’.
BLE : Reconnected to hub ‘mac-adress’…
BLE : Unable to attach to remote control service. -
November 1, 2023 at 23:20 #6502VenderwelParticipant
-
November 2, 2023 at 15:52 #6508Wouter BreveParticipant
Thank you for your message and sorry to hear that you are encountering the same problem.
– I did a new download in a new folder.
– Then in VS Code: File – Open Workspace from File – MTC4BT-workspace
– Checked whether PIO Platforms Espressif 32 was installed.
– Removed: platformio – under [env:esp32doit-devkit-v1] build_flags = ${my_common.build_flags} removed this and then the installation ran fine.
– adjusted the default network config
– uses the default controller_config
– Upload Filesystem Image
– Upload and MonitorAnd then it worked.
Unfortunately I still can’t get any further after that. See MAC addresses passing by, but when I enter them in the controller_config nothing happens or he can no longer find the address.Does anyone know how to solve this? Should you use/connect the remote control or just flash the HUB?
Hope this helps you and would love to hear how you went about the next step to get it working.
-
November 2, 2023 at 16:12 #6509VenderwelParticipant
Check, maybe I’ll do a new download too.
If I then encouter the same problems as you did, maybe I can help you.
-
November 2, 2023 at 16:29 #6510Wouter BreveParticipant
Hopefully you succeed. If I get any further, I will let you know. Good luck!
-
November 22, 2023 at 13:37 #6540VenderwelParticipant
Okay, started over again with brand new download and workspace, now it works! Also got it running in RocView!
-
-
AuthorPosts
- You must be logged in to reply to this topic.