Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Usage instructions were outdated.
|
|
The imgtool.py should be used directly by the user but is deeply nested
inside the folder structure. A symlink solves this issue.
|
|
|
|
Using it for the native_sim board is not trivial. Thus it is first only
added for the Nucleo board.
|
|
This provides the source code for the used bootloader.
|
|
This ignores the special build tree for the Nucleo board.
|
|
This allows to set custom IPv6 addresses while there is not runtime
configuration.
|
|
Using Kconfig for now is a way to continue faster for now. Proper
runtime configuration should be added later.
The firmware in general should be fully usable without a DHCPv6 server
to not require central infrastructure.
While IPv6 link-local addresses provide static and unique addresses for
local communication and SLAAC provides global addresses there is still a
need for an additional static address.
For this there are basically two choices:
- global IPv6 prefixes
- IPv6 unique local addresses (ULAs)
ULAs are picked with this commit. They cannot be routed which makes
isolation from the internet independent of firewall rules adding
security.
Furthermore by picking them randomly they are in practise always unique.
This allows to assign them without a central IP network management and
allows to keep those addresses forever. Both great advantages over the
IPv4 192.168.0.0/16 and similar ranges.
|
|
|
|
The scope of the mac.{c,h} files was very small. Furthermore more
network related logic needs a place. Thus making the name more general
makes sense.
|
|
This makes it transparent to the user that there is an active connection
to the firmware. If the connection is broken the user notices that
quickly and can re-load the page.
|
|
The primary interface for this firmware was so far HTTP. This protocol
is not suitable for small and bidirectional messages which are
time-critical.
If something like this needs to be implemented with HTTP the best
approach is likely long-polling which at least makes it possible for the
server / the firmware to send data to the client / user as reaction to
an event like a closed door sensor.
TCP would fix this issue and is a good choice. Nevertheless web clients
are not allowed to open TCP connections for security purposes.
Thus the WebSocket protocol was created to fill this gap.
To not duplicate the any effort the WebSocket API should be used for
small, time-critical messages for all clients (one with TCP support like
CLI tools as well as web clients).
HTTP is still kept to provide a web page but also for functionality
where HTTP is more suitable like firmware uploads.
|
|
This is required for upcoming WebSocket APIs.
|
|
The heartbeat of the firmware might be used for multiple purposes. It
can trigger a blinking LED on the PCB, can be displayed in a client
program or might serve additional purposes.
Since at least display in client programs should be implemented and
multiple clients should be support in long term it improves the code
structure to use a zbus channel here to publish heartbeat messages in a
publish-subscribe pattern.
That way the publishing of the heartbeat message and the receiving by an
unknown number of observers is completely decoupled. A central trait of
the publish-subscribe pattern and an advantage for a modular code
structure.
|
|
Common browsers always request this URL. Not responding to it shows up
as an error.
To silence this error report the firmware just responds with HTTP 204 No
Content since a favicon is currently not available.
|
|
This script allows to easily:
- build for real hardware
- flash to the microcontroller
- open the Zephyr shell UART
|
|
|
|
|
|
This provides the index HTML page.
|
|
This follows the pattern:
* ERR in error handler if statements
* DBG at top of each function and on demand
* INF at end of function
|
|
The used MAC address is from an example range. Later it can easily be
combined with reading from a MAC-providing EEPROM chip to using a unique
hardware MAC on the device.
|
|
|
|
|
|
|
|
Network-based logging via the syslog protocol allows to log from many
IoT devices to a central log server.
This makes reading logs way easier. Choosing UDP removes the need for
logic keeping a state. Maybe dropped packages are acceptable for the use
case but should be rare anyway.
|
|
This script can be called with root permissions and without any
arguments to provide a virtual network interface `zeth` and an IPv6
router advertisement daemon to provide a realistic network environment
without any hardware.
|
|
Using this board by default allows easier development since it compiles
to a Linux executable which can be executed with `./zephyr.exe`,
debugged with `gdb zephyr.exe` and has a virtual serial port for the
Zephyr shell.
Later the 32 bit version or even a QEMU variant should be used but the
64 bit variant is a low hanging fruit since the host libraries can be
used. This is not wanted but easy to accomplish.
|
|
This makes it easier to develop the whole network-related firmware parts
on a simulation board instead of hardware.
The nucleo_f767zi board has likely a hardware bug making Ethernet
sometimes fail. This is not suitable for development.
|
|
This is the latest release of the Zephyr real-time operating system.
|
|
|
|
|
|
This makes it easier to keep the descriptions and the text inside the
schematic in sync.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Power over Ethernet (PoE) has the disadvantage that GND is significantly
below earth. This requires that GND of a PoE-powered device is never
attached to earthed devices.
In production use cases this is no problem. The earth lines are
isolated.
Nevertheless for debugging it is sometimes useful to connect measuring
equipment like logic analyzers and oscilloscopes to the board. This is
not possible with PoE. Thus an alternative earth-based 5V power input is
useful.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|