HTTP-Ethernet-Assistant

HTTP-Ethernet Assistant

Project Website

Network-controlled hardware assistant that parses JSON commands to execute real-time tasks.

Unique Approach: Implemented twice—first using industry-standard HAL for rapid prototyping, then rewritten in pure bare-metal C to master low-level driver architecture.


🆚 Dual-Implementation Strategy

I maintain two active branches to demonstrate the difference between “Application Development” and “System Engineering.”

The Bare-Metal Engine (Dev Branch)

“The Deep Dive”

The HAL Reference (Main Branch)

“The Prototype”


🏗️ System Architecture


🛠️ Tools & Debugging

Development relied heavily on network analysis tools to validate the custom stack:


🔌 Hardware Connections

Pinout matches NUCLEO-G071RB configuration

ENC28J60 Signal STM32 Pin Arduino Header Function
SCK PA1 A1 SPI Clock
MISO PA6 D12 SPI Master In Slave Out
MOSI PA7 D11 SPI Master Out Slave In
CS PA5 D13 Chip Select
INT PB0 D3 Interrupt (Optional)
RESET PB1 - Hardware Reset
VCC 5V 5V Power
GND GND GND Ground

🚀 Roadmap

This project is evolving from a simple network endpoint to a fully functional IoT assistant.

Phase 1: Basic Infrastructure (Current Focus)

Phase 2: Smart Assistant Logic (Next Steps)


🧪 Testing the System

1. Monitor Serial Debug (MobaXterm)

  1. Open MobaXterm
  2. Click SessionSerial
  3. Select the STM32 COM Port
  4. Set baud rate to 115200
  5. Result: You should see IP Assigned: 192.168.0.200 (or similar) in logs

2. Verify Network Connectivity

# Ping the device from your PC terminal
ping 192.168.0.200

3. TCP Echo Test (Packet Sender)

Before trying HTTP, validate the stack using raw TCP Echo test.

4. Control via Web Browser

Once Echo test passes, use the HTTP server.

  1. Open web browser (Chrome/Edge/Firefox)
  2. Type the IP address: http://192.168.0.200
  3. Result: You will see custom control page hosted by STM32
  4. Action: Click “Toggle LED” button to control hardware in real-time

⚔️ The Hard Parts

LwIP in NO_SYS Mode: Integrating full TCP/IP stack without RTOS meant manually managing sys_check_timeouts() loop. Had to ensure Ethernet interrupts didn’t corrupt main loop’s packet processing.

The SPI Bottleneck: ENC28J60 is an SPI device, not memory-mapped. Optimized SPI driver to handle 10Mbps traffic without stalling CPU.

Parsing JSON in C: Standard libraries too heavy. Implemented token-based parser (JSMN style) to read { "cmd": "led", "val": 1 } directly from TCP buffer without malloc.


Built by Sri Hari Shankar Sharma. Part of the transition from Automotive Applications to Embedded Systems Engineering.