After a little chat with mickeyl, I realised that exposing crucial functions like load() and unload() was not that of a good idea considering how odeviced is supposed to closely interact with the underlying devices. Consequently there has been some changes over the last week,
SysFS (/sys in 2.6.x.x) is sort of similar to the /proc filesystem and acts as an interface for user-space applications to control/access various devices. One of the neat things about sysfs is the fact that all files consist of only a single entry. This means I don’t have to write a separate parser to extract data from them. So a simple fprintf or fscanf or even the seemingly mundane “echo” can be used to control the devices.
I am also planning to work on the python shell for odeviced for a while. This will be really convenient for testing the service. Something like this,
> Wifi is_on wlan0
True
The code can be checked out from here. I can’t wait till I get hold of a FreeRunner to test odeviced out. ![]()
