08-15-2020, 11:43 AM
The flashlight, along with many other things, is controlled by reading and writing 'files' under the /sys pseudo-filesystem. You can do that using normal shell tools like echo, tee, pipes etc. or by using a programming language's file read/write methods. In this case you're looking to write either 0 or 1 to /sys/devices/platform/led-controller/leds/white:flash/brightness - note the permissions on that file which may mean you'll need to use sudo or similar to access it.
What level do you want to access the modem at? Low level access is easiest via the serial port using AT commands. Most of the OS versions abstract that out via either ModemManager or oFono, in which case you'd access the modem through those using a dbus interface.
The other bit is how to get things into and out of your program via the cli, but that's usually address in or soon after 'Hello World.'
What level do you want to access the modem at? Low level access is easiest via the serial port using AT commands. Most of the OS versions abstract that out via either ModemManager or oFono, in which case you'd access the modem through those using a dbus interface.
The other bit is how to get things into and out of your program via the cli, but that's usually address in or soon after 'Hello World.'