With CLI commands if I wanted to for example remove the set pincode for sim1 I could use either "uci set simcard.sim1.pincode=" to set it to nothing, or I could use "uci delete simcard.sim1.pincode". Both commands have the same result, however I can't seem to get this working in JSON-RPC.
With "set" I have tried setting the pincode value to nothing ("pincode": "") and to null ("pincode": null) with the following command:
{
"jsonrpc":"2.0", "id":1, "method":"call", "params":
[
"8c32d44431271e7ad5ab70ef4fa0d7c9", "uci", "set",
{
"config": "simcard",
"type": "sim1",
"values": {
"pincode": null
}
}
]
}
Neither of these removed the pincode. So I have tried to use the delete command but I'm not entirely clear on how to use it, I don't know how to select the pincode specifically, I have tried the following but it just deleted all of sim1:
{
"jsonrpc":"2.0", "id":1, "method":"call", "params":
[
"59e5ce6282be430bc4da227e49f3f378", "uci", "delete",
{
"config": "simcard",
"type": "sim1",
"values": {
"pincode": "0000"
}
}
]
}
I assume "values": { "pincode": "0000" } is ignored in this command because the syntax is wrong, but I don't know how else to try to select just the pincode.
Does anyone know how I would go about removing the pincode?
EDIT:
For anyone reading this in the future, I managed to remove the pin by using empty square brackets:
{
"jsonrpc":"2.0", "id":1, "method":"call", "params":
[
"8c32d44431271e7ad5ab70ef4fa0d7c9", "uci", "set",
{
"config": "simcard",
"type": "sim1",
"values": {
"pincode": []
}
}
]
}