Option1: Open dialer and dial *#06# 

Option2: get the device to fastboot mode, use the volume buttons to navigate to the option “Barcode” and click the power button to select.