Viewing 9 reply threads
  • Author
    Posts
    • #6487
      Wouter BreveWouter Breve
      Participant

      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!

    • #6488
      Matthias RunteMatthias Runte
      Keymaster

      I’d say the configuration in the MTC4BT is missing. Are you sure you uploaded it?

    • #6490
      Wouter BreveWouter Breve
      Participant

      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.

    • #6491
      Wouter BreveWouter Breve
      Participant

      I don’t know how, but I’m one step further. The problem is solved!
      Thanks for your response @Mattze

    • #6492
      Wouter BreveWouter Breve
      Participant

      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.

    • #6502
      VenderwelVenderwel
      Participant

      Do you know what you did to solve the first problem, because I have the exact same problem, MTC4BT is not scanning for Bluetooth items.
      Wifi and broker are working.

      • This reply was modified 6 months ago by Venderwel.
    • #6508
      Wouter BreveWouter Breve
      Participant

      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 Monitor

      And 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.

    • #6509
      VenderwelVenderwel
      Participant

      Check, maybe I’ll do a new download too.

      If I then encouter the same problems as you did, maybe I can help you.

    • #6510
      Wouter BreveWouter Breve
      Participant

      Hopefully you succeed. If I get any further, I will let you know. Good luck!

      • #6511
        VenderwelVenderwel
        Participant

        Grrrr….downloaded new, but no run into other errors. Any change you can have a look with me?

        • This reply was modified 6 months ago by Venderwel.
        • This reply was modified 6 months ago by Venderwel.
        • This reply was modified 5 months, 1 week ago by Venderwel.
    • #6540
      VenderwelVenderwel
      Participant

      Okay, started over again with brand new download and workspace, now it works! Also got it running in RocView!

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