Pi Webserver

Click the image or here to see the project's repository!


What is the Pi Webserver?

Pi Webserver is a webserver powered by a bare-metal programmed Raspberry Pi. By bare-metal, I mean that the Raspberry Pi has no operating system, and code is running directly on the ARM processor, the BCM2835 (Raspberry Pi A+ or Raspberry Pi Zero--really cool fact is that the code ports over automatically to the pi zero!). You might know that the Raspberry Pi A+ has no wifi chip--so the Pi Webserver uses an ESP2866 as a peripheral for wifi.

You can see a basic demo of the Pi Webserver here! And here is the web interface to interact with the rpi webserver remotely (you can upload binary files to execute, as well as read and write to GPIO pins)

What Technology does Pi Webserver Utilize?

  • Raspberry Pi, bare-metal, programmed completely in C.
  • ESP2866
  • HTTP
  • React
  • HTML/CSS/Javascript
  • Software Implemented UART
  • Hardware UART
  • ARM System Calls
  • Makefiles
  • GPIO and Timer Interrupts
  • Bootloader
  • Bit Banging
  • self-implemented C libraries
  • FUSE filesystem (for independently testing system calls)
  • Network Bootloading

What Are the Coolest Parts of Pi Webserver?

With proper setup, you can control your baremetal raspberry pi from anywhere around the world! You can bootload programs over a TCP connection, then see live feedback from the pi as your program runs!

What Were the Biggest Challenges of Pi Rat?

The ESP2866 can be finnicky at times, so you need to be careful when using it.

Since we communicate to the ESP2866 over uart, and we also bootload programs and receive output over the uart, we need to implement a second (software) uart to simulate as if we had two hardware uarts.

Overall, this project went smoothly, which I attribute to great instruction from each of the courses I've taken so far, as well as the countless hours I've spent building a solid understanding of baremetal on the rpi.

What did I learn from Pi Webserver?

  • Proper planning gives great results.
  • How to hack on makefiles
  • Hacking on embedded systems (obviously haha)

How can Pi Webserver be expanded?

  • Ability to accept multiple connections
  • Make more robust; if server crashes, it will restart itself.
  • Increase throughput of ESP by amping up UART baud rate, more efficient communication to ESP, or even writing your own ESP embedded OS that deals with TCP in a better way than the current firmare does!