Closed anujmattoo closed 6 years ago
Dear anujmattoo,
For a simple mqtt example, see the link below. example 1 example 2
I don't know what you're going to do, but applying mqtt to wiz550s2e requires a lot of trouble.
I am trying to create a sensor-to-Ethernet (mqtt) based on wiz550s2e. That is a sensor gateway.
I will proceed that with an open project.
If you are interested please leave a comment.
Please open this issue. As WIZ5500S2E has on board MCU, so development gets easy. The link you mentioned has MQTT implemented on STM32 MCU whereas WIZ550S2E has LPC11E36 MCU.
I added mqtt to wiz550s2e. To use mqtt, you need a v1.10 Configuration Tool .
And the sensor to ethernet is still in my plan and will go on as an open project. I'll let you know when the project repository is created.
That's Great! Which bin file to update WIZ550S2E.bin or WIZ550S2E_App.bin for using MQTT?
You should use a WIZ550S2E_App.bin file. WIZ550S2E.bin is all firmware.(app+boot)
Please upload the firmware using the v1.03 Configuration Tool.
The guide is here.
Okay. I uploaded the firmware using Flash Magic software provided by NXP to flash LPC Controller. Is that right way to flash?
It is also possible.
In that case can use only just .hex file.
@Ricky-Kwon I uploaded the latest firmware and after that factory reset using Configuration tool v1.03. I downloaded the configuration tool v1.10. I then searched the ethernet mac address on the network, it did find.
Here is the snapshot :
I will now select the MQTT option in Working mode and will fill up MQTT details username, password and topic. My question is where is an option for filling up MQTT port number? Also after entering the details and setting it, how will I send data over MQTT? Are there any commands or format to be sent to com port in order to send data?
Share and use the remote port. That is, you can write the port of mqtt server on the remote port. The same is true of host ip.
If you do it correctly, it indicates that you are connected on the network status. After entering any data into the serial it is sent to the mqtt server. If you want to create a packet, use packing conditions.
@Ricky-Kwon Understood. The MQTT Server IP provided by the broker is m12.cloudmqtt.com
but the Host IP only accept the IP in digits and displays Host IP Input Error
.
you can use a dns.
Can you share some screenshot of the same. I selected use DNS and inputted m12.cloudmqtt.com
in DNS Server IP, it displays error DNS server IP input error
Oh, check the DNS server addresses on your PC using the commands such as ipconfig. If you don't know, use Google DNS server, such as 8.8.8.8. m12.cloudmqtt.com must be written to a domain. I'll make a guided video later on and show it to you.
@Ricky-Kwon I am still unable to connect to MQTT.
Here is the setting for MQTT :
The module should be Internet. Make sure that the Internet is compatible with the same IP bandwidth as your PC.
Please refer to the attached video(static).
Please refer to the attached video(dhcp).
@Ricky-Kwon Wooah! 😄 The MQTT is working over WIZ5500S2E. Can you implement AT commands to configure MQTT serially?
Of course. I am wondering what commands are convenient for the user.
Can you give us your opinion? For example...
Is it better to add MQTT to AT + NOPEN, AT + NSEND? Or would you make the command independently? For example, AT + MQTT ...
Anyway, it is under development.
Why not keep commands already made for WizFi modules, this way it will universal for all the Wiznet family. Adding different commands for this specific module is not worth it. Comments?
Setting topic every time when publishing data is a good option but it should be optional, not mandatory. Sending data without topic should be default option when someone has to send data to some other topic, a specific command should be there which will not replace the original topic.
Subscribe to single topic only, should be done exactly what mentioned above.
I think adding commands specifically for MQTT is a good idea.
Commands such as [They already exist for WizFi modules] :-
- AT+MQTTSET=<UserName>,<Password>,<ClientID>,<AliveTime>
- AT+MQTTSET=?
- AT+MQTTCON=<Con/Discon>,<BrokerIP>,<BrokerPort>,<SSL_Enable>
- AT+MQTTCON=?
- AT+MQTTPUB=<Topic>,<Length>
- AT+MQTTSUB=<Sub/Unsub>,<Topic>
After setting, all the parameters should be saved in flash/EEPROM and upon power up should retain and automatically connects to the saved configuration and topic and should work transparently as it's working now. For this, it's important to set the working mode to MQTT or change to UDP/TCP Server or client when MQTT not required.
What do you say about this?
I upgraded the WIZ5500S2E module to v1.1.2. It has an LPC1136E microcontroller. How to use MQTT library for it?