View Single Post
Posts: 1,417 | Thanked: 2,619 times | Joined on Jan 2011 @ Touring
#13
I gave up, seems that wait 21600 gets ignored by busybox, I don't know how to get past that. First post has two scripts and .desktop files so you can turn dumb charge on and off for the cheap Qi chargers, other dumb chargers, or even some broken/repaired USB ports, that actually works.

This was the final script before I broke up the scripts into on and off toggles, it executed without error but without the wait lasting six hours(21600 sec) it was useless.
Code:
#!/bin/sh
stop bme
modprobe bq2415x_charger
# edit dumb mode charge mode time below in seconds
wait 21600
rmmod bq2415x_charger
start bme
exit
save the script name as qi_charge
make it executable
Code:
sudo chmod +x qi_charge
make your .desktop file so you get a charge button among your apps
Code:
sudo vi /usr/share/applications/hildon/qi_charge.desktop
now cut/paste this in after typing i for insert
Code:
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=qi_charge
Comment=charge for a set time at full speed from an unshorted data pins dumb USB charger like the universal Qi ones and then reload BME to get battery meter back
Exec=sudo /bin/sh /home/user/MyDocs/qi_charge
Icon=make a PNG and put the path here
now hit [Esc] and [shift] ZZ
This is how to get Maemo to find the file in order for it to show up among your other apps, by placing it in /usr/share/applications/hildon/ you can stick the app button on your desktop for convenience if you like.

Last edited by biketool; 2014-08-14 at 13:37.
 

The Following User Says Thank You to biketool For This Useful Post: