From 5c730c0f6c7a8d018f3077439a351c77e9f8c577 Mon Sep 17 00:00:00 2001 From: Brady Date: Mon, 12 Apr 2021 17:09:41 -0500 Subject: [PATCH] Update ssd1306_i2c.c This is set to wlan0. Changed to eth0 for hard wired connections. IP address was showing up as 0.0.0.0 until changed to eth0. --- C/ssd1306_i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C/ssd1306_i2c.c b/C/ssd1306_i2c.c index 8464f2f..82d5424 100644 --- a/C/ssd1306_i2c.c +++ b/C/ssd1306_i2c.c @@ -394,11 +394,11 @@ char* GetIpAddress(void) ifr.ifr_addr.sa_family = AF_INET; /* I want IP address attached to "eth0" */ - strncpy(ifr.ifr_name, "wlan0", IFNAMSIZ-1); + strncpy(ifr.ifr_name, "eth0", IFNAMSIZ-1); ioctl(fd, SIOCGIFADDR, &ifr); close(fd); return inet_ntoa(((struct sockaddr_in *)&ifr.ifr_addr)->sin_addr); /* display result */ -} \ No newline at end of file +}