httpsrv

command
v0.0.0-...-8fa69d0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2024 License: MIT Imports: 20 Imported by: 0

README

httpsrv

Httpsrv is an example HTTP server, based on soypat/cyw43439/examples/http-server, adapted for being used with LAN865x.

The server makes use of soypat/seqs as TCP/IP stack.

httpsrv on Raspberry Pi Pico

The example may be run on boards supported by TinyGo that provide at least 256 KiB ROM. Currently it has been tested to run on the Raspberry PI Pico.

To compile httpsrv and flash the board, run

make tinygo-flash

The node uses the IP address 192.168.5.100 on default. Entering this address into a web browser will load a simple web page from httpsrv, that contains a toggle button that will, for each click, send a HTTP request to the /toggle-led URL implemented by httpsrv. On the Pico, the green LED will toggle accordingly.

httpsrv on Raspberry Pi 4B

A binary for the Raspberry Pi 4B may be built using make rpi or just make.

The executable supports some flags:

  -D uint
        ethernet packet trace level
  -intr-pin string
        name of LAN865x interrupt pin (default "GPIO26")
  -ip string
        IP address (default "192.168.5.100")
  -reset-pin string
        name of LAN865x reset pin (default "GPIO13")
  -spidev string
        name of the SPI device (default "/dev/spidev6.0")

To be able to access an SPI device like /dev/spidev6.0, a device tree overlay can be applied, like

spi6-1cs,cs0_pin=16

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL