quartiq / minimq

Minimal no_std MQTT v5.0 client implementation
MIT License
143 stars 16 forks source link

question #118

Closed LongZoz closed 1 year ago

LongZoz commented 1 year ago

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 commented 1 year ago

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

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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