-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
No Gateway found when enabling Authentication #242
Comments
Hi, If Authentication of gateway.conf is YES, GW checks whether ClientId, IP address and PortNo of the sent CONNECT message are registered in the clientList. If they do not match, CONNECT is ignored.
must be changed to
PortNo 1883 is for multicast.
|
Hello, I have tried with your advice but still MQTT-SN clients are unable to search gateway. When i disable the Authentication, then my MQTT-SN clients are able to find gateway. Gateway Config File: (Ports are configured by Nordic to run with Nordic OpenThread Examples) ClientAuthentication=YES ClientsList=/etc/clients.conf PredefinedTopic=NO RootCAfile=/etc/mosquitto/certs/rootCA.pem GatewayID=1 GatewayPortNo=10000 GatewayUDP6Port = 47193 And here is my Clients.config file : snode,192.168.1.102:47193,secureConnection |
Hi, Could you attach a gateway log? |
Actually i was not able to watch logs due to some reason. So I retried installing MQTT-SN gateway for Nordics Open Thread example as the MQTT-SN gateway installed in Nordic Border Router image for Thread is little old version ad86a27. I would like to install the latest MQTT-SN gateway on RPi. So can you suggest me which is the latest and the stable version ? I have build the latest master repo and build the gateway. Have followed the steps mentioned here as answer to replace the previous mqtt-sn gateway with new build. But now when i restart the mqtt-sn gateway i get the following error: |
@nikhil30081995 Did you specify udp6 when building? Like this: I have created a docker image with MQTT-SN with OT BR. I use a slightly older version than the master of MQTT-SN (I did not get the latest one to work due to different syntax in the gateway.conf file). Project here: |
Hello, yes i specified udp6 while building. Actually i am experimenting with Nordic Image for Border Router as Jonathan Hui from open thread itself suggested me to use nordic image for border router as i am trying out nordic thread examples. I have used the latest master version of MQTT-SN gateway. In RPi as Marry stated in post on dev zone: Stop the currently running gateway: Edit the service file: Change the ExecStart line to explicitly specify the configuration file: And restarted the mqttsn gateway. The configuration file which i passed is the default configuration file provided in Nordic Image. |
@nikhil30081995 I believe some of the parameters in gateway.conf have changed in the lastest master. Example: Am I right @ty4tw ? |
Which version did you tried out ? I would also like to check that out on the Nordic Image. |
I am using commit f2dcda3 |
Okay i will try that out. |
@nikhil30081995 I don't think my Docker image is exactly like the Nordic BR image but I have successfully used this Docker with the Nordic sleepy end device samples. |
@osaether In the commit which you have used the MAX_CLIENTS is still set to 100, while most of the developer suggestion was to increase the value of max clients. I would like to know what could be the valid value of MAX_CLIENTS ? I see that the following parameters are added in the configuration file, which were not present before: |
@osaether I have successfully built the version of MQTT-SN Gateway that you have mentioned and used in docker image. In Segger Studio debugging the nRF MQTTSN Publish example shows error on Assert line 364 in mqttsn_client.c file: ` case MQTTSN_CLIENT_CONNECTED:
` Have you tested this ? And what could be the possible reason ? |
@nikhil30081995 I don't think the Nordic samples are designed to handle disconnects. I have made my own sleepy publisher that reconnects. You can take a look here: |
Hello, your project was good reference point. Instead of using app event scheduler i have made used of timers to for gateway search, connection establishment and publishing purpose. Can you suggest me which method should i use ? app_timer or event_scheduler ? In your application, you have assumed that the mqttsn connect packet will get transmitted always. What happens if it doesn't ? |
@nikhil30081995 |
@osaether Okay. Thanks. |
I am using commit f2dcda3 for MQTT_SN gateway as suggested by the @osaether for Nordic examples. My setup was working fine for week but suddenly now my devices are unable to connect to MQTT-SN gateway. I am able to search gateway and get gateway information but when i send Connection request, it show the following error in Rpi terminal. " Cant connect to broker. error=113 No route to host " Here is the image from RPI: So can anyone please help me out what could be the issue here ? My end device work flow is : |
Hello,
As i have mentioned before i want to connect my MQTT-SN network to AWS cloud. So for that purpose i have to enable the Authentication to YES. When i enable the authentication in Paho Gateway configuration file, my MQTTSN client devices are unable to find gateway.
What could be the issue here ?
First of all in client.conf file that i have passed there is no much clarity regarding which address should i pass. Currently all my MQTT-SN clients are connecting to local broker with same IP address and different client names. So should i use that IP address ? And which port should i use. In my open thread based application the default PORT that's used is 47193.
Please help me to solve this issue.
Below i have attached my configuration file for clients, where i don't know which IP address and Port to use. Here the clients.conf file already had Gateway Tester and Client Pub Client1,2,3 configuration by default I had only added the last entry.
Here is clients.conf file :
GatewayTester, 172.16.1.11:20020
ClientPUB,172.16.1.11:2010
Client01,172.16.1.11:12001
Client02,172.16.1.11:12002
Client03,172.16.1.11:13003
P-l496G-CELL01,192.168.1.102:1883
The text was updated successfully, but these errors were encountered: