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

Emcute cannot create a double-byte name #12642

Open
ouyangkan opened this issue Nov 5, 2019 · 2 comments
Open

Emcute cannot create a double-byte name #12642

ouyangkan opened this issue Nov 5, 2019 · 2 comments
Assignees
Labels
Area: network Area: Networking Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)

Comments

@ouyangkan
Copy link

Description

When I used the emcute routine, the sub had a double-byte name and I could not accept pub from the PC.

Steps to reproduce the issue

1.Compile main in examples\emcute_mqttsn. Burn write stm32f4.
2.Connect to my server
3.sub a
4.pub a (Pub was successful, but my device did not receive the message)
5.sub asd
6.pub asd(Success to send and receive)

Versions

RIOT-2019.10

@ouyangkan
Copy link
Author

1.I wrote in the emcute thread:
for(int i=0; i<len; i++) { printf("rbuf[%d] = %x\n", i, rbuf[i]); }
2.When I sub a,I get:

sub a
2019-11-05 07:01:24,962 # sub a
2019-11-05 07:01:24,962 # rbuf[0] = 8
2019-11-05 07:01:24,963 # rbuf[1] = 13
2019-11-05 07:01:24,964 # rbuf[2] = 0
2019-11-05 07:01:24,966 # rbuf[3] = 0
2019-11-05 07:01:24,966 # rbuf[4] = 2
2019-11-05 07:01:24,967 # rbuf[5] = 12
2019-11-05 07:01:24,968 # rbuf[6] = 34
2019-11-05 07:01:24,968 # rbuf[7] = 0
2019-11-05 07:01:24,969 # Now subscribed to a

3.When I pub a, I get:

pub a asd
2019-11-05 07:02:52,354 # pub a asd
2019-11-05 07:02:52,355 # rbuf[0] = 7
2019-11-05 07:02:52,356 # rbuf[1] = b
2019-11-05 07:02:52,357 # rbuf[2] = 0
2019-11-05 07:02:52,358 # rbuf[3] = 2
2019-11-05 07:02:52,363 # rbuf[4] = 12
2019-11-05 07:02:52,364 # rbuf[5] = 35
2019-11-05 07:02:52,365 # rbuf[6] = 0
2019-11-05 07:02:52,365 # rbuf[0] = a
2019-11-05 07:02:52,366 # rbuf[1] = c
2019-11-05 07:02:52,370 # rbuf[2] = 2
2019-11-05 07:02:52,371 # rbuf[3] = 61
2019-11-05 07:02:52,372 # rbuf[4] = 61
2019-11-05 07:02:52,372 # rbuf[5] = 0
2019-11-05 07:02:52,373 # rbuf[6] = 0
2019-11-05 07:02:52,389 # rbuf[7] = 61
2019-11-05 07:02:52,390 # rbuf[8] = 73
2019-11-05 07:02:52,391 # rbuf[9] = 64

4.0x61 is the ascall code for 'a'.
I suspect MQTT creates topic_id directly with topic_name when topic_name is less than two bytes.

@stale
Copy link

stale bot commented May 8, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions.

@stale stale bot added the State: stale State: The issue / PR has no activity for >185 days label May 8, 2020
@aabadie aabadie added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label May 8, 2020
@stale stale bot removed the State: stale State: The issue / PR has no activity for >185 days label May 8, 2020
@miri64 miri64 added the Area: network Area: Networking label Jul 6, 2020
@miri64 miri64 added this to the Release 2020.07 milestone Jul 6, 2020
@MrKevinWeiss MrKevinWeiss removed this from the Release 2021.07 milestone Jul 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

No branches or pull requests

5 participants