Skip to content

This is the micro controller code generated by PTB WG 1.71 in WP1 of the EMPIR project.

Notifications You must be signed in to change notification settings


Repository files navigation

Software for the Met4FoF Smartup Unit V2

See this publication as well


  1. Download this repo

  2. install Python dependencies [add needed deps]

    pip install protobuf
  3. Flash the µC with the newest release [see this link] (doc/

  4. Connect µC and PC directly via Lan (or over an switch with DHCP anabled to 192.168.2.x Subnet)

  5. In case you are working behind a firewall, set an exception for incoming UDP packets from the IP address of the Smartup Unit on port 7654.

  6. Set ip Adress of pc to

  7. Power on µC Board

  8. Observe Display and LEDS see Picture

  9. Start Python Interpreter and run /tools/

  10. Start data Receiver node with:


If every thing works correctly you will see that a new sensor is found

Data receiver now running wating for packets 
FOUND NEW SENSOR WITH ID=hex0x37300000==>dec:925892608

Attach your callback function to Sensor



Build System.

The software was and is created with SW4STM32 (gcc). SEGGER Systemview can be used for debugging.

Dependencies and used libraries

Used for Library Name Version Link
real-time operating system FreeRTOS 9.0.0
Ethernet LWIP 2.0.3 ST DM00103685
Data serialization nanopb a2db482...

using nanopb to generate Code


see also and


cd nanopb/
mkdir messages
cp ../protobuff_deps/messages.proto messages/
cp generator/proto/nanopb.proto ./
protoc -o message.pb messages/messages.proto
python generator/ message.pb
cp message.* ../protobuff_deps/
cd ./generator/proto


cd protobuff_deps
mkdir python
protoc --python_out=python messages.proto

Converting St-Link to Segger J-link Download software extract and run STLinkReflash.exe

  1. Accept Segger license
  2. Accept ST license
  3. Choose Upgrade to J-Link [1] The device is flashed and reconnected Output looks like
Preparing for FW update (can take up to 10 seconds)...O.K.
Identifying ST-LINK variant...O.K.: ST-LINK/V2-1
Performing firmware update...O.K.

now you have an working J-Link at your STM32-Board.

Debug Output


Telnet Config for RTT dumping
Param Value
Timeout 20 sec
Port 19021