Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:iot-open:practical:hardware:sut:esp32:iot_1 [2024/03/26 18:09] – [Steps] pczekalskien:iot-open:practical:hardware:sut:esp32:iot_1 [2024/03/26 18:21] (current) – [Result validation] pczekalski
Line 41: Line 41:
  
 ==== Result validation ==== ==== Result validation ====
-You should be able to see "Hello World" and "Hello IoT" on the LCD now.+Using another node should change the MAC read. Book another device and discover its MAC. 
 + 
 +===== FAQ ===== 
 +**Can I change MAC?**: Actually, yes, you can. It is not advised, however, because you may accidentally generate an overlapping address that will collide with another device in the same network. You must first explicitly configure the ESP32 chip to work as an AP (Access Point, Server) or STA (WiFi Client) to do it. Sample stub code (for STA) may look as follows: 
 +<code c> 
 +#include <WiFi.h> 
 +#include <esp_wifi.h> 
 + 
 +uint8_t newMAC[] = {0xDE, 0xAD, 0xBE, 0xEF, 0xCA, 0xFE}; //Array of bytes with new MAC 
 +void setup() 
 +
 +  WiFi.mode(WIFI_STA); 
 +  esp_wifi_set_mac(WIFI_IF_STA, &newMAC[0]); 
 +
 +</code>
  
 <WRAP noprint> <WRAP noprint>
en/iot-open/practical/hardware/sut/esp32/iot_1.1711476579.txt.gz · Last modified: 2024/03/26 18:09 by pczekalski
CC Attribution-Share Alike 4.0 International
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0