How to get the serial number from RB951Ui-2HnD

I am trying to get the serial number from the board of a RB951Ui-2HnD, and I can't find a way to do it. I saw that the dmidecode method doesn't work on mips architecture. I tried searching in /dev/mtdblock ( ) but without success. Is there a way to get the serial number? Beacuse in RouterOS the serial number is displayed in the configuration interface which means that it is written somewhere in the device. Thank you.