![background image](http://html1.mh-extra.com/html/ifm/al1950/al1950_device-manual_3900875043.webp)
IO-Link Master with IoT Interface CabinetLine 8 Ports IP 20
43
>
Example: Update firmware
52252
Task:
Update the firmware of the device; size of the firmware file: 356676 bytes
Solution:
The firmware is transferred to the device in fragments (chunks). The size of the fragments depends on
the size of the flash memory of the IO-Link master. To transfer the firmware, the firmware file must be
converted into a character string using BASE64.
1 Preparations
►
Determine the size of the fragments (g = number of bytes):
{"code":"request", "cid": -1, "adr":"/firmware/container/chunksize/getdata"}
►
Convert the firmware file into a BASE64 string.
2 Start the transfer of the firmware
►
Start the transfer of the firmware via the service start_stream_set (parameter "size": size of the firmware file):
{"code":"request", "cid": -1, "adr":"/firmware/container/start_stream_set", "data":{"size":356676}}
3 Load the firmware into the flash memory of the IO-Link master
►
Send the BASE64 string of the firmware file to the IO-Link master fragment by fragment (value = string value with
length g).
{"code": "request", "cid": -1, "adr": "/firmware/container/stream_set", "cid": -1, "data": {"value":
"aWZtfgIAAABBTDF4NXhfY25faXRfdDIuMi43Nw..."}
►
Repeat step 3 until all fragments of the firmware file have been sent to the IO-Link master.
>
IO-Link master stores the segments received in the container area.
4 Install firmware
►
Start the installation of the transmitted firmware.
{"code": "request", "cid": -1, "adr": "/firmware/install", "data": {}}