from cli
Code: Select all
>ofono-phonesim -p 12345 -gui /usr/share/phonesim/default.xml&
>dbus-send --print-reply --system --dest=org.ofono /phonesim org.ofono.Modem.SetProperty string:"Powered" variant:boolean:true
method return time=1612370672.056339 sender=:1.553 -> destination=:1.556 serial=35 reply_serial=2
>dbus-send --print-reply --system --dest=org.ofono /phonesim org.ofono.Modem.SetProperty string:"Online" variant:boolean:true
method return time=1612370672.056339 sender=:1.553 -> destination=:1.556 serial=35 reply_serial=2
Put it in a bash script, and the first line executes (ofono-phonesim runs) and the next two lines give:
Code: Select all
>./myscript.sh
>Error org.ofono.Error.Failed: Operation failed
>Error org.ofono.Error.Failed: Operation failed
Now I am suspecting some permissions issue. Googling
didn't seem to help.using dbus-send inside a bash script
Could anyone help, please ?
SOLVED
Even though the ofono-phonesim process had started, it wasn't ready to accept connections ... inserting a
Code: Select all
sleep 5