View Single Post
Posts: 72 | Thanked: 157 times | Joined on Oct 2011 @ Hungary
#202
I have modified the rc.local file to get keyboard lights on get the internal swap working and to stop the wlan number incremental. See here.
Code:
#!/bin/sh -e
hwclock -u -s
loadkeys /lib/udev/keymaps/nokia-n900-keys.map
ifconfig wlan16 hw ether 00:1f:df:89:02:89
echo "120" > /sys/class/leds/lp5523:channel0/brightness
echo "120" > /sys/class/leds/lp5523:channel1/brightness
echo "120" > /sys/class/leds/lp5523:channel2/brightness
echo "120" > /sys/class/leds/lp5523:channel3/brightness
echo "120" > /sys/class/leds/lp5523:channel7/brightness
echo "120" > /sys/class/leds/lp5523:channel8/brightness
exit 0
I've found a charging script which seems to be working: link (I am not responsible if something goes wrong. Do not use this unless you now what are you doing.)
I've installed i2c-tools, libi2c-dev and python-smbus.
Code:
i2cset -y -m 0x77 2 0x6b 0x04 0xc9;
status=$(i2cget -y 2 0x6b 0x00)
echo status=$status

# next register 0x03 is device ID, always 4b and r/o; so we skip to 0x04
i2cset -y -m 0xff 2 0x6b 0x02 0x8c;
# 0x8c = 3v5 + .640 + .040 + .020 = 4V200, BE CAREFUL and DON'T CHANGE
# unless you know what you're doing. 4V2 is ABS MAX!
i2cset -y -m 0xff 2 0x6b 0x01 0xc8;
i2cset -y -m 0xc0 2 0x6b 0x00 0x00;

# tickle watchdog, while status indicates 'charging from wallcharger'
#while [ $(i2cget -y 2 0x6b 0x00) = 0x90 ] ; do
while [ $(i2cget -y 2 0x6b 0x00) = 0x10 ] ; do
	echo charging...
	sleep 28;
	# reset watchdog timer:
	i2cset -y -m 0x80 2 0x6b 0x00 0x80
done
echo "charging finished, status(reg0)=$(i2cget -y 2 0x6b 0x00)"
Charging seems to be working as my script show the increase of the voltage and the percentage as well.
 

The Following 11 Users Say Thank You to PanzerSajt For This Useful Post: