Hi again,

1) In leee80211.s i created a new parameter (int remain_energy)

2) I created a function in debugfs.c class to read the energy file:
DEBUGFS_READONLY_FILE(energy, "%d", local->remain_energy);

3) And finally i get the value in mesh_hwmp.c with local->remain_energy

The module compiles OK. But i can't create a file in
/sys/kernel/debug/ieee80211/phy0 because i always have the permission
denied error (enter with sudo, mount /sys/kernel/debug)
Exist another way to create the file and give the necessary privileges
to change them after? this process is correct?

Thanks,
Carlos Meralto

2015-10-10 15:24 GMT+01:00 Carlos Meralto <[email protected]>:
> Ok Bob,
>
> I think we're coming to that I want! So, i can make a script to log
> and feed variable(s) in
> /sys/kernel/debug/ieee80211/wlan0/mesh_params/alm_batt(1...3).txt
>
> But how can i update the ALM calculation? I need to insert a parameter
> in airtime_link_metric_get to read the value in that file, and this is
> the same problem or not?
>
> Sorry for time, but this is my last task to conclude my Msc Thesis!
>
> Thanks,
> Carlos Meralto
>
> 2015-10-10 15:17 GMT+01:00 Bob Copeland <[email protected]>:
>> On Sat, Oct 10, 2015 at 02:05:29PM +0100, Carlos Meralto wrote:
>>> Thanks for the answer Bob.
>>>
>>> I do not quite understand the debugfs. I will explain what i want to do:
>>> I want to add in airtime link metric some parameters of the Android
>>> battery, i can access that parameters from Shell script (dumpsys bat..
>>> | grep . ..) or from a specific file (/sdcard/bat_log.txt). But I want
>>> to access these parameters in the airtime_link_metric_get function.
>>> How i can do this with debugfs?
>>
>> For prototyping's sake, you can do something like:
>>
>> while true; do grep whatever /sdcard/bat_log.txt > \
>>     /sys/kernel/debug/ieee80211/wlan0/mesh_params/alm_batt.txt
>> done
>>
>> i.e. writing that file would update some state that the ALM calculation
>> uses.
>>
>> If you want to do something more permanent, then maybe you can
>> directly read the battery details from some platform device, but
>> that will be pretty platform specific.
>>
>> --
>> Bob Copeland %% http://bobcopeland.com/
_______________________________________________
Devel mailing list
[email protected]
http://lists.open80211s.org/cgi-bin/mailman/listinfo/devel

Reply via email to