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

question #118

Closed
LongZoz opened this issue Nov 11, 2022 · 4 comments
Closed

question #118

LongZoz opened this issue Nov 11, 2022 · 4 comments

Comments

@LongZoz
Copy link

LongZoz commented Nov 11, 2022

In no std project,how do I reference the appropriate stack and clock packages;Another question is that I tried to connect to an mqtt server of another computer, but I couldn't connect. Is it because I can only connect to the local mqtt server

@ryan-summers
Copy link
Member

ryan-summers commented Nov 11, 2022

In no std project,how do I reference the appropriate stack and clock packages

You have to provide them yourself. If you want to look at a reference design using minimq in an embedded design, check out https://github.com/quartiq/stabilizer/blob/master/src/net/mod.rs

  • Quartiq maintains a stack for smoltcp that we use with minimq. This crate does not provide an actual network stack, you have to bring that yourself. We use smoltcp and w5500 both successfully with minimq
  • Check out mono_clock for a method to provide the clock if you use RTIC. Otherwise, implementing your own embedded_time::Clock is required

Another question is that I tried to connect to an mqtt server of another computer, but I couldn't connect. Is it because I can only connect to the local mqtt server

MQTT and this crate do not care where your MQTT broker are. They can be local, or half way around the globe. This is all entirely managed by IP addresses and routing (i.e. the internet). If you can't connect to a broker on another machine, you need to look at your network infrastructure to make sure that packet routing is properly set up.

@LongZoz
Copy link
Author

LongZoz commented Nov 11, 2022

The local mqtt server and other mqtt servers need account and password for access, but actually the local server does not need the account and password to connect to it. Is the other connection failure caused by the password account

@ryan-summers
Copy link
Member

Very likely. We do not support user/pass authentication currently (because it is insecure when transmitted over unencrypted channels), but would be open to accepting PRs for it!

@ryan-summers
Copy link
Member

I've broken out TLS and authentication support to separate issues (see #119 and #121). Closing this as resolved. Feel free to open up an issue if anything further seems amiss!

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

2 participants