Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

broker client communication problem

37 views
Skip to first unread message

kushal bhattacharya

unread,
Nov 5, 2016, 2:27:59 AM11/5/16
to MQTT
Hi,
I am building  mqtt broker now.Currently ihave finished sending CONNECT packet from client and  sending CONNACK from broker .the process works fine upto when the client sends SUBSCRIBES packet to the broker.But when the broker sends SUBACK to the client ,the client doesnt recieve it instead it receives a random packet in this case when i debug it i see the messages type of CONNECT packet but the other bytes ot the packet are garbage and it doesn't correspond to the one sent from SUBACK.
Thanks,
Kushal Bhattacharya

Ozan t

unread,
Nov 5, 2016, 3:57:57 AM11/5/16
to mq...@googlegroups.com
Kushal,


I think this mail list is for mqtt protocol itself, not for mqtt implementations.

It s clear that you have a bug in your implementation. You ask people here to fix your bug? Do you think it is possible? 

Bugs could be posted to stackoverflow etc.
For protocol itself, you'd better read the spec and inspect existing implementations before posting to this list. 

Ozan.

--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+unsubscribe@googlegroups.com.
To post to this group, send email to mq...@googlegroups.com.
Visit this group at https://groups.google.com/group/mqtt.
For more options, visit https://groups.google.com/d/optout.

kushal bhattacharya

unread,
Nov 5, 2016, 4:33:03 AM11/5/16
to MQTT
Actually am not here to ask for a complete fix but the thing am asking here is related to mqtt implementation and the group states that i can post questions related to mqqt protool and its implementation not solely on mqtt protocol itself.What i am asking is just bring out my flaw in my implementation not a complete fix

Nicholas O'Leary

unread,
Nov 5, 2016, 4:46:02 AM11/5/16
to MQTT
Kushal, given the information you've provided it isn't clear what you are asking. From a protocol standpoint it sounds like you're trying to do the right thing. As for why it isn't working, that will depend on how you've written the code... which isn't something your one line description of the problem sheds any light on.

Nick

On Sat, 5 Nov 2016, 08:33 kushal bhattacharya, <bhattachar...@gmail.com> wrote:
Actually am not here to ask for a complete fix but the thing am asking here is related to mqtt implementation and the group states that i can post questions related to mqqt protool and its implementation not solely on mqtt protocol itself.What i am asking is just bring out my flaw in my implementation not a complete fix

--
To learn more about MQTT please visit http://mqtt.org
---
You received this message because you are subscribed to the Google Groups "MQTT" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mqtt+uns...@googlegroups.com.

kushal bhattacharya

unread,
Nov 5, 2016, 4:52:02 AM11/5/16
to MQTT
by tracing the packets on wireshark i found out that the after the server sends CONNACK  to client ,after that moment  the server again sends a CONNECT packet to the client but no where in the code have i send it from server ,

Nicholas O'Leary

unread,
Nov 5, 2016, 4:57:33 AM11/5/16
to MQTT

The broker must never send a connect packet to clients.

Can't tell you why your code is doing that... you'll have to debug that yourself.

Nick


On Sat, 5 Nov 2016, 08:52 kushal bhattacharya, <bhattachar...@gmail.com> wrote:
by tracing the packets on wireshark i found out that the after the server sends CONNACK  to client ,after that moment  the server again sends a CONNECT packet to the client but no where in the code have i send it from server ,

--

kushal bhattacharya

unread,
Nov 8, 2016, 1:26:08 AM11/8/16
to MQTT
Actually i think there is some flaw in the library's documentation.It totally misinterpreted some code and thats why the connect packet was resend.The issue is now resolved :)
Reply all
Reply to author
Forward
0 new messages