Getting Device Serial Number
You can get the serial number of the device using a "Long Math" block.
The serial number is kept in a special register with address "30000". To be able to access that register you need to use "Get" math operator in "Long Math" block. The following image shows the necessary configuration.