-
Couldn't load subscription status.
- Fork 73
Closed
@dimmu311
Description
Hello,
i try to connect to Mqtt Server on port 443 of worx landroid mower wicht seems to be locatet on aws.
in found in issues somitng about the setTlsAlpn. Without setting this i end up in this errormsg.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Using TLS with self-signed certificates is discouraged. Please use a CA file to verify it.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Enabling TLS on the existing socket connection.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] TLS enabled successfully.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Socket opened and ready to use.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Using the [clean session] flag for the connection.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Using the [username] flag for the connection.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Sending connection handshake to broker.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Sent data over the socket: MQTT�
[USERID]�da?....xxxxxx......
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Read data from the socket (without blocking): TTP/1.1 400 Bad Request
content-type: application/json
content-length: 96
date: 2025年5月07日 11:44:46 GMT
x-amzn-RequestId: 046c140a-bbea-461d-a972-0d94fcccccc8
connection: keep-alive
x-amzn-ErrorType: InvalidRequestException:
access-control-allow-origin: *
because of this and after looking on the who is information of the worx domain i think the host is running on aws.
after setting setTlsAlpn to x-amzn-mqqt-ca i end up in a infint loop
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Using TLS with self-signed certificates is discouraged. Please use a CA file to verify it.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Enabling TLS on the existing socket connection.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] TLS enabled successfully.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Socket opened and ready to use.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Using the [clean session] flag for the connection.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Using the [username] flag for the connection.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Sending connection handshake to broker.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Sent data over the socket: MQTT�
[USERID]�da?....xxxxxx......
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Waiting for 1 bytes of data.
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Read data from the socket:
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Read data from the socket (without blocking):
MQTT [iot.eu-west-1.worxlandroid.com:443] [USERID] Read data from the socket (without blocking):
this is my code. based on the exampele 02_use_tls_without_client_certificate.php
$client = new MqttClient('iot.eu-west-1.worxlandroid.com', 443, $clientID, MqttClient::MQTT_3_1_1, null, $logger);
// Create and configure the connection settings as required.
$connectionSettings = (new ConnectionSettings)
->setUseTls(true)
->setTlsSelfSignedAllowed(true)
->setTlsVerifyPeer(true)
->setUsername($username)
->setTlsAlpn('x-amzn-mqtt-ca');
// Connect to the broker with the configured connection settings and with a clean session.
$client->connect($connectionSettings, true);```
Metadata
Metadata
Assignees
Labels
No labels