I have been trying to build a little project where I use MQTT to send data to my IoT platform. To that extent, I was using the lwip_mqtt_freertos example to test out and get an understanding of the framework. I noticed that when I flashed the example on to the board, it pauses after printing the line "Getting IP address from DHCP". I deduced that it pauses until it receives a valid IP address from DHCP. I read the comments in the header file ethernetif.h, and it says "set IP address to IPADDR_ANY". Would setting that fix my issue of obtaining a valid IP address? If not, how would I prevent this from being an issue? Any help would be appreciated. Many thanks in advance for your time and consideration.
Hello, I reviewed your case did you follow the instructions on the readme?
Make sure the MQTT broker pointed to by EXAMPLE_MQTT_SERVER_HOST and EXAMPLE_MQTT_SERVER_PORT definitions
is up and accessible on your network via unsecured socket. A public MQTT testing server can be used
or you can install a broker locally and modify the definitions mentioned above.
2. Connect a USB cable between the PC host and the OpenSDA(or USB to Serial) USB port on the target board.
3. Open a serial terminal on PC for OpenSDA serial(or USB to Serial) device with these settings:
- 115200 baud rate
- 8 data bits
- No parity
- One stop bit
- No flow control
4. Insert the Ethernet Cable into the target board's RJ45 port and connect it to a router (or other DHCP server capable device).
5. Download the program to the target board.
6. Either press the reset button on your board or launch the debugger in your IDE to begin running the demo.
Running the demo
I recommend install a local server or other, maybe this could help you.
Best regards,
Pavel
Hi Pavel,
Many thanks for your reply. I apologise as I wasn't able to reply earlier as I was severely ill until recently. I will look at this and get back to you shortly. Many thanks once again.
Kind regards
Hello, my name is Pavel, and I will be supporting our case, let me get into your case, when I have more information, I will contact you.
Best regards,
Pavel