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:stm32:iot_1 [2024/04/25 20:37] – [Steps] ktokarzen:iot-open:practical:hardware:sut:stm32:iot_1 [2024/04/27 08:15] (current) – [Result validation] ktokarz
Line 88: Line 88:
 </code> </code>
 ==== Result validation ==== ==== Result validation ====
 +You should be able to see the MAC address of the ESP32-C3 module.
 +<note>
 Using another node should change the MAC read. Book another device and discover its MAC. Using another node should change the MAC read. Book another device and discover its MAC.
 +</note> 
 +<note info> 
 +Because LCD can't properly display some non-visible characters the presented code sometimes shows additional, non-letter characters. It is out of the scope of this scenario to filter these characters out. We leave the task of making visual improvements to your invention. 
 +</note>
 ===== FAQ ===== ===== 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: +**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.
-<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/stm32/iot_1.1714077455.txt.gz · Last modified: 2024/04/25 20:37 by ktokarz
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