Get your LAN IoT device up and running in 15 minutes.
Disclosure: As an Amazon Associate I earn from qualifying purchases made with links from the products on this document.
Before you begin, ensure you have:
- ✅ Seed Studio XIAO ESP32S3 Microcontroller or compatible
- ✅ Perfboard 47x34mm for assembly
- ✅ RS232 to TTL Serial Port Module (if using serial devices)
- ✅ Right Angle Tactile Button
- ✅ Pin Headers and Jumper Wires
- ✅ USB-C cable for power and programming
- ✅ Computer with ESP-IDF v5.5.1 installed
- ✅ WiFi network (2.4 GHz)
- ✅ LAN IoT certificate signer deployed (see Certificate Signer Setup)
-
Assemble on Perfboard (recommended)
- Mount ESP32S3 on perfboard
- Connect RS232 module for serial communication
- Add tactile button for reset/function
- Use pin headers and jumper wires for connections
- Connect GPIO43 (UART2 RX) to RS-232 TX
- Connect GPIO44 (UART2 TX) to RS-232 RX
- Connect GND to RS-232 GND
- Connect 3V3 to RS-232 VCC
- Connect GPIO3 to TAC BUTTON
- Connect GND to TACT BUTTON
-
Optional: Install in Enclosure
-
Connect USB Cable
- Plug USB-C cable into ESP32-S3
- Connect to your computer
# Clone the core firmware repository
git clone https://github.com/laniot/core.git
cd core
# Set up ESP-IDF environment
. $HOME/esp/esp-idf/export.sh
# Create configuration file from template
cp main/app_config.h.bak main/app_config.hOpen main/app_config.h and update:
// Certificate Signer Configuration
#define APP_CFG_SIGNER_URL "https://your-signer.example.com"
#define APP_CFG_SIGNER_TOKEN "your-auth-token-here"
// Device Configuration
#define APP_CFG_DEVICE_NAME_PREFIX "LAN-IOT"
#define APP_CFG_AP_SSID "LAN-IOT-Setup"
#define APP_CFG_AP_PASSWORD "iot123456"Important: Keep your auth token secure! The
app_config.hfile is in.gitignoreto prevent accidental commits.
# Build the firmware
idf.py build
# Flash to ESP32-S3 (adjust port as needed)
idf.py -p /dev/ttyUSB0 flash
# Monitor serial output
idf.py -p /dev/ttyUSB0 monitorWindows Users: Replace /dev/ttyUSB0 with COM3 (or appropriate COM port)
macOS Users: Use /dev/cu.usbserial-* or /dev/tty.usbserial-*
-
Watch for AP Mode
- Device starts in Access Point mode
- Look for WiFi network:
LAN-IOT-Setup
-
Connect to AP
- SSID:
LAN-IOT-Setup - Password:
iot123456 - Captive portal should open automatically
- SSID:
-
Configure WiFi
- Select your WiFi network from the scan results
- Enter WiFi password
- Click "Connect"
- Device will save credentials and restart
Watch the serial monitor for:
I (1234) wifi_manager: WiFi Connected
I (2345) wifi_manager: IP Address: 192.168.1.100
I (3456) cert_manager: Requesting certificates...
I (4567) cert_manager: Certificates received and stored
I (5678) web_server: HTTPS server started on port 443
Option 1: Serial Monitor (easiest)
- Look for
IP Address: 192.168.1.xxxin serial output
Option 2: Router Admin Page
- Check DHCP client list
- Look for device with hostname
LAN-IOT-*
Option 3: Network Scanner
# Using nmap (if installed)
nmap -p 443 192.168.1.0/24- Open your browser
- Navigate to:
https://192.168.1.xxx(use your device's IP) - Certificate Warning: You'll see a security warning
- This is expected on first connection
- Accept/proceed (certificate is valid, just not in browser's trust store)
- You should see the LAN IoT admin interface
To remove certificate warnings:
- Download root CA certificate from the IOT device
- Import into your Operating system trusted certificates
- See Certificate Management for details
The device provides a WSS endpoint for real-time data:
// Connect from browser console or web application
const ws = new WebSocket('wss://192.168.1.xxx/ws');
ws.onopen = () => {
console.log('Connected to LAN IoT device');
};
ws.onmessage = (event) => {
console.log('Data:', event.data);
};For legacy devices or direct connections:
# Connect using netcat
nc 192.168.1.xxx 5000
# Or using telnet
telnet 192.168.1.xxx 5000Press GPIO0 button (BOOT button on most dev boards):
- Short Press: Sends test message to UART → WSS → TCP clients
- Long Press (3 seconds): Wipe & reset device to factory defaults
- System Overview - Understand the architecture
- API Reference - Available endpoints
- Configuration Guide - Advanced options
- Custom Firmware Builds - Modify behavior
- Connecting Serial Devices - RS-232 integration
- Hardware Designs - Build custom enclosures
- ✅ Check WiFi password
- ✅ Ensure 2.4 GHz network (5 GHz not supported)
- ✅ Check signal strength
- ✅ Try from captive portal again
- ✅ Verify internet connectivity
- ✅ Check signer URL in
app_config.h - ✅ Verify auth token is correct
- ✅ Ensure signer service is running
- ✅ Verify device IP address
- ✅ Check HTTPS (not HTTP) -
https:// - ✅ Accept certificate warning
- ✅ Try from different browser
- ✅ Check firewall settings
- ✅ Verify RS-232 connections (TX↔RX, RX↔TX)
- ✅ Check voltage levels (ESP32 uses 3.3V, RS-232 uses ±12V)
- ✅ Ensure MAX3232 or compatible converter is used
- ✅ Check baud rate matches source device (default configured via app_config.h)
- ❓ Have you tried turning it off and on again? (No really, power cycling fixes 90% of issues!)
See Troubleshooting Guide for more help.
Your LAN IoT device is now:
- ✅ Connected to your WiFi network
- ✅ Running secure HTTPS server
- ✅ Providing WebSocket Secure (WSS) endpoint
- ✅ Offering TCP server for legacy devices
- ✅ Bridging RS-232/UART data to the network
What's Next? Explore the tutorials to build real-world applications!