How to change network mode on device?