Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT Subscription Failed #23

Closed
Luke-Guangzhong opened this issue Aug 18, 2021 · 12 comments
Closed

MQTT Subscription Failed #23

Luke-Guangzhong opened this issue Aug 18, 2021 · 12 comments

Comments

@Luke-Guangzhong
Copy link

Hello!

Here is my text which used to build the factory reset database:
image
I used Device.MQTT.Client.1.Subscription three times. But when I login in the MQTT Broker, I can only see the topic defined in the Device.LocalAgent.MTP.1.MQTT.ResponseTopicConfigured
image
How to subscribe more topics for the MQTT Client?
Can you help me point out where I have written wrong?

Thanks !

@holme-r
Copy link
Contributor

holme-r commented Aug 18, 2021

MQTT Subscriptions should work. Are the subscriptions present in the output of 'obuspa -c show database' ?

@RamonRomeroQro
Copy link

RamonRomeroQro commented Aug 18, 2021

Hello!

Same problem here, the subscriptions are defined on the obuspa factory file and on the output for the data base, but no subscribe message is sent to the broker

Device.MQTT.Client.1.Subscription.3.Alias => cpe-3
Device.MQTT.Client.1.Subscription.3.Topic => status/usp/newtopic
Device.MQTT.Client.1.Subscription.3.QoS => 1
Device.MQTT.Client.1.Subscription.3.Enable => true

Notes:

  • Running using the dockerfile
  • My mosquitto acl were also tested to publish and subscribe without problems.
  • Also Device.LocalAgent.MTP.1.MQTT.ResponseTopicConfigured subscribes but not receiving message from broker
  • messages sent to Device.LocalAgent.Controller.1.MTP.1.MQTT.Topic received.

Maybe our configuration files for subscriptions are wrong, could you please share a tested configuration file for one or multiple subcriptions?

Thanks !

@Luke-Guangzhong
Copy link
Author

MQTT Subscriptions should work. Are the subscriptions present in the output of 'obuspa -c show database' ?

Hi !
Thank you for reply.
Here is my output of obuspa -c show database:
%6P 2))EYT8A@`3PMK~WGNJ

By the way, I'm using Ubuntu 16.04.2 LTS (GNU/Linux 4.4.0-62-generic x86_64). Do I need to do something else because of my OS?

Thanks !

@holme-r
Copy link
Contributor

holme-r commented Aug 19, 2021

I can reproduce the issue and am working on a fix.

@Luke-Guangzhong
Copy link
Author

Thank you very much ! 😁

holme-r pushed a commit that referenced this issue Aug 20, 2021
Bug Fixes:
* MQTT Subscriptions don't work at startup (GH Issue #23)
* MQTT subscribe-topic in CONNACK is not retrieved correctly
* Unnecessary log message for object deletion subscription containing
wildcard and partial path
@RamonRomeroQro
Copy link

@Luke-Guangzhong hello, have you already tested your mqtt factory file with the new code?

@Luke-Guangzhong
Copy link
Author

@RamonRomeroQro Hi!
I'm sorry, my team leader postponed the task.
Now I am preparing for the internal exam.
If I test it, I'll let you know as soon as possible.

@RamonRomeroQro
Copy link

@Luke-Guangzhong already tested with an example similar to the one which you posted, it seems to be working

@Luke-Guangzhong
Copy link
Author

@RamonRomeroQro
I'm sorry, it took a long time to prepare for the internal exam.:sweat_smile:
Thank you very much. 👍

@holme-r
Copy link
Contributor

holme-r commented Sep 3, 2021 via email

@RamonRomeroQro
Copy link

@holme-r Thank you so much for your work and replies, I have already solve those issues 😁

@holme-r
Copy link
Contributor

holme-r commented Sep 17, 2021

Closing as the fix is committed.

@holme-r holme-r closed this as completed Sep 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants