Is there a script command to change the device's bluetooth name?

LB
Leonardo Bozi
Petroleo Brasileiro S.A. (PETROBRAS)

I've tried the command below without success.

writesecuresetting –sec bluetooth_name NEW_DEVICENAME
4 years ago
Android Scripting
ANSWERS
RC
Raymond Chan Diamond Contributor
4 years ago

What are the brand and model of the devices you targeted?

Are you using OEM specific Android+ device agent or generic Android-Enterprise device agent?

What are the version and build numbers of your device agent?

From where did you find the argument "–sec bluetooth_name" that you used?  Or did you just guess and make it up yourself?

LB
Leonardo Bozi
4 years ago

Raymond,

Thanks for your answer.

The brand and model of the device are Sonimtech - Smart-Ex 01.

This devices are using OEM Specific Android+ device agent version 14.5.0.1011 and plugin 1.6.3.109

First I sent the script command watchsettings on to the device and got the log when I changed the bluetooth name:

Custom log (URI:content://settings/secure SETTING:bluetooth_name VALUE:NEW_DEVICENAME)

After that, I sent the script commad:

writesecuresetting –sec bluetooth_name NEW_DEVICENAME
RC
Raymond Chan Diamond Contributor
4 years ago (edited 4 years ago)

It's good that you've got the argument information using "watchsettings on" on your Sonim device.  So, the syntax should be correct.  However, it is possible that the  writesecuresetting command using the reported argument won't work.  This also happened quite often for some arguments on different Samsung devices I tested in the past seven or eight years.  

Maybe you can try the following to see if there is any improvment:

1. Confirm in App Manager of your device's Settings that the "Change System Settings" permission of the MobiControl device agent app has been granted.

2. retry the command using a different Sonim device agent downloadable from Soti web page at https://docs.soti.net/mobicontrolagentdownloads/