Establishing HTTP Connection for Real-Time Temperature Monitoring with ATmega2560, MCP9808, Zephyr
I'm building a real-time temperature monitoring system with an ATmega2560 microcontroller, MCP9808 sensor, and Zephyr OS. My goal is to send temperature data to a server via HTTP, but I'm unable to establish a connection. The network interface is configured in Zephyr, and a basic HTTP client is implemented to transmit data. The code creates a socket, attempts to connect to the server (IP: 192.168.1.100, port 80), and send "Temperature data", but it fails with errors: "Failed to create socket." I've used Zephyr's logging module for error handling. Any suggestions to resolve this issue would be appreciated!
this is my code snippet:
@Middleware & OS
Solution:Jump to solution
The error message “Failed to create socket” indicates that there’s a problem with socket creation
3 Replies
Solution
The error message “Failed to create socket” indicates that there’s a problem with socket creation
oh yeah, thanks @boualleg sabrina I had checked it through. I was able to resolve it.
you're welcome