Wrong MQTT credentials (username, password or device ID incorrect) #18

Closed
opened 2026-05-06 19:59:29 +02:00 by p2l · 5 comments

I've scanned multiple times, removed and re-added my printer, ran extract_credentials --verbose and tried as many combinations of them as my sanity would allow by hand. I should probably write a script to test all 1000 possible combinations systematically.

If anyone else has had experience of this and tips on how to overcome it, I'd welcome the insight, otherwise I'll just keep plugging away.

[17:50:39] INFO  bridge: Verbinde mit Drucker 192.168.1.167:9883 …
[17:50:39] INFO  kobrax.mqtt: TLS connected  cipher=TLS_AES_256_GCM_SHA384
[17:50:39] WARNING bridge: Verbindung fehlgeschlagen: Wrong MQTT credentials (username, password or device ID incorrect) – starte im Offline-Modus
[17:50:39] INFO  bridge: Bridge läuft auf http://10.89.1.2:7125
[17:50:39] INFO  bridge: OrcaSlicer → Klipper → Host: 10.89.1.2  Port: 7125
[17:50:39] INFO  bridge: Ctrl-C zum Beenden
[17:50:39] INFO  bridge: Drucker erreichbar – stelle MQTT-Verbindung her …
[17:50:39] INFO  kobrax.mqtt: TLS connected  cipher=TLS_AES_256_GCM_SHA384
[17:50:39] WARNING bridge: Verbindungsaufbau fehlgeschlagen: Wrong MQTT credentials (username, password or device ID incorrect)
[17:50:49] INFO  bridge: Drucker erreichbar – stelle MQTT-Verbindung her …
[17:50:49] INFO  kobrax.mqtt: TLS connected  cipher=TLS_AES_256_GCM_SHA384
[17:50:49] WARNING bridge: Verbindungsaufbau fehlgeschlagen: Wrong MQTT credentials (username, password or device ID incorrect)
[17:50:50] INFO  aiohttp.access: 10.89.1.1 [06/May/2026:17:50:50 +0000] "GET / HTTP/1.1" 200 78698 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
[17:50:50] INFO  aiohttp.access: 10.89.1.1 [06/May/2026:17:50:50 +0000] "GET /api/state HTTP/1.1" 200 768 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
[17:50:50] INFO  aiohttp.access: 10.89.1.1 [06/May/2026:17:50:50 +0000] "GET /api/settings HTTP/1.1" 200 395 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
[17:50:52] INFO  aiohttp.access: 10.89.1.1 [06/May/2026:17:50:52 +0000] "GET /api/state HTTP/1.1" 200 768 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
[17:50:53] INFO  aiohttp.access: 10.89.1.1 [06/May/2026:17:50:53 +0000] "GET /api/settings HTTP/1.1" 200 395 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
[17:50:54] INFO  aiohttp.access: 10.89.1.1 [06/May/2026:17:50:54 +0000] "GET /api/state HTTP/1.1" 200 768 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
[17:50:56] INFO  aiohttp.access: 10.89.1.1 [06/May/2026:17:50:56 +0000] "GET /api/state HTTP/1.1" 200 768 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
[17:50:58] INFO  aiohttp.access: 10.89.1.1 [06/May/2026:17:50:58 +0000] "GET /api/state HTTP/1.1" 200 768 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0"
[17:50:59] INFO  bridge: Drucker erreichbar – stelle MQTT-Verbindung her …
[17:50:59] INFO  kobrax.mqtt: TLS connected  cipher=TLS_AES_256_GCM_SHA384
I've scanned multiple times, removed and re-added my printer, ran extract_credentials --verbose and tried as many combinations of them as my sanity would allow by hand. I should probably write a script to test all 1000 possible combinations systematically. If anyone else has had experience of this and tips on how to overcome it, I'd welcome the insight, otherwise I'll just keep plugging away. ``` [17:50:39] INFO bridge: Verbinde mit Drucker 192.168.1.167:9883 … [17:50:39] INFO kobrax.mqtt: TLS connected cipher=TLS_AES_256_GCM_SHA384 [17:50:39] WARNING bridge: Verbindung fehlgeschlagen: Wrong MQTT credentials (username, password or device ID incorrect) – starte im Offline-Modus [17:50:39] INFO bridge: Bridge läuft auf http://10.89.1.2:7125 [17:50:39] INFO bridge: OrcaSlicer → Klipper → Host: 10.89.1.2 Port: 7125 [17:50:39] INFO bridge: Ctrl-C zum Beenden [17:50:39] INFO bridge: Drucker erreichbar – stelle MQTT-Verbindung her … [17:50:39] INFO kobrax.mqtt: TLS connected cipher=TLS_AES_256_GCM_SHA384 [17:50:39] WARNING bridge: Verbindungsaufbau fehlgeschlagen: Wrong MQTT credentials (username, password or device ID incorrect) [17:50:49] INFO bridge: Drucker erreichbar – stelle MQTT-Verbindung her … [17:50:49] INFO kobrax.mqtt: TLS connected cipher=TLS_AES_256_GCM_SHA384 [17:50:49] WARNING bridge: Verbindungsaufbau fehlgeschlagen: Wrong MQTT credentials (username, password or device ID incorrect) [17:50:50] INFO aiohttp.access: 10.89.1.1 [06/May/2026:17:50:50 +0000] "GET / HTTP/1.1" 200 78698 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0" [17:50:50] INFO aiohttp.access: 10.89.1.1 [06/May/2026:17:50:50 +0000] "GET /api/state HTTP/1.1" 200 768 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0" [17:50:50] INFO aiohttp.access: 10.89.1.1 [06/May/2026:17:50:50 +0000] "GET /api/settings HTTP/1.1" 200 395 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0" [17:50:52] INFO aiohttp.access: 10.89.1.1 [06/May/2026:17:50:52 +0000] "GET /api/state HTTP/1.1" 200 768 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0" [17:50:53] INFO aiohttp.access: 10.89.1.1 [06/May/2026:17:50:53 +0000] "GET /api/settings HTTP/1.1" 200 395 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0" [17:50:54] INFO aiohttp.access: 10.89.1.1 [06/May/2026:17:50:54 +0000] "GET /api/state HTTP/1.1" 200 768 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0" [17:50:56] INFO aiohttp.access: 10.89.1.1 [06/May/2026:17:50:56 +0000] "GET /api/state HTTP/1.1" 200 768 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0" [17:50:58] INFO aiohttp.access: 10.89.1.1 [06/May/2026:17:50:58 +0000] "GET /api/state HTTP/1.1" 200 768 "http://127.0.0.1:7125/" "Mozilla/5.0 (X11; Linux x86_64; rv:150.0) Gecko/20100101 Firefox/150.0" [17:50:59] INFO bridge: Drucker erreichbar – stelle MQTT-Verbindung her … [17:50:59] INFO kobrax.mqtt: TLS connected cipher=TLS_AES_256_GCM_SHA384 ```
Contributor

i had the same issue and reverse engineered anycubic slicer next add printer dialog, i created a pull request.
The resulting script is here:
https://gitea.it-drui.de/bebu/KX-Bridge-Release/src/branch/feature/fetch_credentials/fetch_credentials.py

i had the same issue and reverse engineered anycubic slicer next add printer dialog, i created a pull request. The resulting script is here: https://gitea.it-drui.de/bebu/KX-Bridge-Release/src/branch/feature/fetch_credentials/fetch_credentials.py
Author

Thanks, I grabbed your script and it refuses to connect to my KX.

~/dev/KX-Bridge-Release  master !1 ?2  ./fetch_credentials.py --ip 192.168.1.167                                                                                                   
Error: HTTP request failed for info: HTTPConnectionPool(host='192.168.1.167', port=18910): Max retries exceeded with url: /info (Caused by NewConnectionError("HTTPConnection(host='192.168.1.167', port=18910): Failed to establish a new connection: [Errno 111] Connection refused"))
~/dev/KX-Bridge-Release master !1 ?2  ./fetch_credentials.py --ip 192.168.1.167                                                                                                   
Error: HTTP request failed for info: HTTPConnectionPool(host='192.168.1.167', port=18910): Max retries exceeded with url: /info (Caused by NewConnectionError("HTTPConnection(host='192.168.1.167', port=18910): Failed to establish a new connection: [Errno 111] Connection refused"))
    ~/dev/KX-Bridge-Release    master !1 ?2  ./fetch_credentials.py --ip 192.168.1.167 --port 
    ~/dev/KX-Bridge-Release    master !1 ?2  ./fetch_credentials.py --ip 192.168.1.167 --port 18088                                                                                       1 ✘  system  
Error: HTTP request failed for info: HTTPConnectionPool(host='192.168.1.167', port=18088): Max retries exceeded with url: /info (Caused by NewConnectionError("HTTPConnection(host='192.168.1.167', port=18088): Failed to establish a new connection: [Errno 111] Connection refused"))
    ~/dev/KX-Bridge-Release    master !1 ?2  
    ~/dev/KX-Bridge-Release    master !1 ?2  ./fetch_credentials.py --ip 192.168.1.167 --port 18088                                                                                 1 ✘  system  
Error: HTTP request failed for info: HTTPConnectionPool(host='192.168.1.167', port=18088): Max retries exceeded with url: /info (Caused by NewConnectionError("HTTPConnection(host='192.168.1.167', port=18088): Failed to establish a new connection: [Errno 111] Connection refused"))
    ~/dev/KX-Bridge-Release    master !1 ?2    
Thanks, I grabbed your script and it refuses to connect to my KX. ``` ~/dev/KX-Bridge-Release master !1 ?2 ./fetch_credentials.py --ip 192.168.1.167 Error: HTTP request failed for info: HTTPConnectionPool(host='192.168.1.167', port=18910): Max retries exceeded with url: /info (Caused by NewConnectionError("HTTPConnection(host='192.168.1.167', port=18910): Failed to establish a new connection: [Errno 111] Connection refused")) ~/dev/KX-Bridge-Release master !1 ?2 ./fetch_credentials.py --ip 192.168.1.167 Error: HTTP request failed for info: HTTPConnectionPool(host='192.168.1.167', port=18910): Max retries exceeded with url: /info (Caused by NewConnectionError("HTTPConnection(host='192.168.1.167', port=18910): Failed to establish a new connection: [Errno 111] Connection refused"))    ~/dev/KX-Bridge-Release    master !1 ?2  ./fetch_credentials.py --ip 192.168.1.167 --port    ~/dev/KX-Bridge-Release    master !1 ?2  ./fetch_credentials.py --ip 192.168.1.167 --port 18088  1 ✘  system  Error: HTTP request failed for info: HTTPConnectionPool(host='192.168.1.167', port=18088): Max retries exceeded with url: /info (Caused by NewConnectionError("HTTPConnection(host='192.168.1.167', port=18088): Failed to establish a new connection: [Errno 111] Connection refused"))    ~/dev/KX-Bridge-Release    master !1 ?2     ~/dev/KX-Bridge-Release    master !1 ?2  ./fetch_credentials.py --ip 192.168.1.167 --port 18088  1 ✘  system  Error: HTTP request failed for info: HTTPConnectionPool(host='192.168.1.167', port=18088): Max retries exceeded with url: /info (Caused by NewConnectionError("HTTPConnection(host='192.168.1.167', port=18088): Failed to establish a new connection: [Errno 111] Connection refused"))    ~/dev/KX-Bridge-Release    master !1 ?2  ```
Contributor

Is it in lan mode?

(venv)  benjamin@bso-linux  ~/kx   feature/fetch_credentials  python fetch_credentials.py --ip 192.168.2.32         
Decrypted config saved to: decrypted_printer_config.json
(venv)  benjamin@bso-linux  ~/kx   feature/fetch_credentials  cat decrypted_printer_config.json 
{
  "broker": "mqtts://192.168.2.32:9883",
  "deviceId": "6a08bbe7a8bd4defd09e2310792a3f9c",
  "deviceType": "fdm",
  "devicecrt": "####",
  "devicepk": "####",
  "ip": "192.168.2.32",
  "modeId": "20030",
  "modelId": "20030",
  "modelName": "Anycubic Kobra X",
  "password": "######",
  "username": "userQGtM9vlQ"
}

Is it in lan mode? ``` (venv) benjamin@bso-linux  ~/kx   feature/fetch_credentials  python fetch_credentials.py --ip 192.168.2.32 Decrypted config saved to: decrypted_printer_config.json (venv) benjamin@bso-linux  ~/kx   feature/fetch_credentials  cat decrypted_printer_config.json { "broker": "mqtts://192.168.2.32:9883", "deviceId": "6a08bbe7a8bd4defd09e2310792a3f9c", "deviceType": "fdm", "devicecrt": "####", "devicepk": "####", "ip": "192.168.2.32", "modeId": "20030", "modelId": "20030", "modelName": "Anycubic Kobra X", "password": "######", "username": "userQGtM9vlQ" } ```
Author

I tried it in LAN and not in LAN to see if it made a difference. Which Firmware version are you on? I get nothing on port 9883 at all, only 18088 is listening, and doesn't do anything useful. No firewall weirdness as far as I can see :/

I am on Firmware V1.2.0.2.

I tried it in LAN and not in LAN to see if it made a difference. Which Firmware version are you on? I get nothing on port 9883 at all, only 18088 is listening, and doesn't do anything useful. No firewall weirdness as far as I can see :/ I am on Firmware V1.2.0.2.
Author

Actually, I got it working with your script now thanks! I power cycled the printer after switching back into LAN mode, and sure enough, 9883 was open now.

Actually, I got it working with your script now thanks! I power cycled the printer after switching back into LAN mode, and sure enough, 9883 was open now.
p2l closed this issue 2026-05-08 12:36:18 +02:00
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: viewit/KX-Bridge-Release#18
No description provided.