So for some reason the things I have been doing with JSON RPC on the older firmware versions doesn't work anymore.
I always get error: { code: -32002, message: 'Access denied' }
I know that in versions before 07 I had to enable JSON RPC in the settings, but as far as I know now it should be enabled by default?
I have added permissions to my user in rpcd config:
config login
option username 'admin'
option group 'root'
option password '$p$admin'
list read '!superuser'
list read '*'
list write '!superuser'
list write '*'
option _dummy_time '1653471475'
Is there anything I'm missing in the latest version?
This is what I'm trying to do with JSON RPC:
{
jsonrpc: '2.0',
id: 1,
method: 'call',
params: [
'9f7775131e7ac1aaf2bb96e40a545b61',
'file',
'write',
{
path: '/overlay/upper/readLoop.sh',
data: 'for i in $(seq 1 $1); do cat /sys/class/gpio/$2/value; done'
}
]
}