The monorepo includes an optional Wi‑Fi SoftAP + web UI sketch for bench
checks when you do not want a PC running Python. It is not the production
GCSP firmware — it replaces GrafitoCANStepper_C3 while installed.
Source: can_stepper/firmware/CANStepper_WiFiPortal/
What you get
| Item | Detail |
|---|---|
| Hotspot | ESP32-C3 SoftAP, SSID Grafito-XXXX (chip id) |
| Password | grafito123 |
| Web UI | http://192.168.4.1/ |
| Status | Encoder position, step position, enable, e‑stop, endstop, GPIO8 raw |
| Commands | Enable / disable / stop / e‑stop / set zero / relative moves |
| Endstop polarity | Active-low (SN04-N NPN NO) or active-high (NC optical) |
Serial (115200) prints SSID, password, and URL after boot.
Flash
cd can_stepper
arduino-cli compile --fqbn esp32:esp32:esp32c3:CDCOnBoot=cdc \
firmware/CANStepper_WiFiPortal
arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:esp32c3:CDCOnBoot=cdc \
firmware/CANStepper_WiFiPortalRequirements: ESP32C3 Dev Module, USB CDC On Boot: Enabled. Libraries: FastAccelStepper, TMC2209 (janelia-arduino). Apply main Vin (5–24 V, typically 24 V) during flash — USB does not power the ESP32 for programming.
Healthy serial banner:
# CANStepper WiFi Portal 1.0
# FastAccelStepper on STEP=10 DIR=1
# MT6701 frame=0x…… angle=… enc_ok=1
# WiFi SoftAP: Grafito-XXXX
# Password: grafito123
# Open browser: http://192.168.4.1/Use
- On phone or laptop, join Wi‑Fi
Grafito-XXXX/grafito123. - Open http://192.168.4.1/ (hard-refresh if the page was cached).
- Tap Enable, then a move button (e.g. +90°).
- Confirm Encoder: ok and position updates when the shaft turns.
Motor not moving?
Production enable needs both TMC UART enable() and the EN pin. Current
portal firmware does that. Also check:
- 24 V motor supply on
- Motor connected
- Not e‑stopped (Clear e‑stop then Enable)
- Serial shows
# driver ONand# move_rel … running=1
Encoder shows “no lock”?
The portal must use SPI MODE3 SSI (same as production), not bit-banged GPIO. Portal ≥1.1 matches production. Also: magnet over the MT6701, CS on IO2 high when idle.
Endstop polarity on the portal
| Sensor | Idle | Hit | Portal button |
|---|---|---|---|
| SN04-N NPN NO | GPIO8 HIGH | LOW | Endstop active-LOW |
| NC optical (idle low) | GPIO8 LOW | HIGH | Endstop active-HIGH |
Restore production firmware (no Wi‑Fi)
Python library, GCSP CAN, multi-node, and G-code need GrafitoCANStepper_C3:
cd can_stepper
arduino-cli compile --fqbn esp32:esp32:esp32c3:CDCOnBoot=cdc \
firmware/GrafitoCANStepper_C3
arduino-cli upload -p /dev/ttyACM0 --fqbn esp32:esp32:esp32c3:CDCOnBoot=cdc \
firmware/GrafitoCANStepper_C3Serial should show # GrafitoCANStepper fw 1.7 proto 1 (or newer). Then:
PYTHONPATH=. python3 examples/endstop_monitor.py /dev/ttyACM0 1 0 high
# or SN04-N:
PYTHONPATH=. python3 examples/endstop_monitor.py /dev/ttyACM0 1 0 lowRelated
- Firmware download — production sketch download & preview
- Homing and endstops — IO8, SN04-N, optical
- Hardware — pins and strapping
- Python library — full GCSP host API