|
2011-08-21
, 19:23
|
Posts: 4 |
Thanked: 0 times |
Joined on Aug 2011
|
#852
|
|
2011-09-09
, 11:05
|
Community Council |
Posts: 685 |
Thanked: 1,235 times |
Joined on Sep 2010
@ Mbabane
|
#853
|
|
2011-09-09
, 11:31
|
Posts: 26 |
Thanked: 12 times |
Joined on May 2010
@ Arctic Circle / Finland
|
#854
|
The Following User Says Thank You to Jaekaelae For This Useful Post: | ||
|
2011-09-09
, 11:40
|
Community Council |
Posts: 685 |
Thanked: 1,235 times |
Joined on Sep 2010
@ Mbabane
|
#855
|
The Following 2 Users Say Thank You to sicelo For This Useful Post: | ||
|
2011-09-11
, 23:53
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#856
|
here an intermediate version of booston, that replaces original file and has some small goodies - a direct uncleaned copy of what's on my hostmode devel device. You might want to edit /etc/mce/mce.ini to define a new pattern "PatternVboost" signalling device is in boostmode (attached my mce.ini for an example).
Of course you may want to keep permissions and owner of original booston, and maybe you need to change the hardcoded path to ic2set in this script (the line "i2cset=/usr/local/sbin/i2cset") to your result of `which i2cset`
This is no official update but just a teaser, as I'm feeling sad with all of you while this is collecting dust on my t900.
Bear with me, a better version is about to include charging and slowly matures here...
/j
Code:#!/bin/sh # jrbme "just replaces bme" in fact does more than just that # It implements FOSS charging via bq24150 and manages hostmode # For this it implements a daemon mode which is entered by default # when jrbme is called by user root (i.e. on system init usually) # and which cares about keeping battery charged and about signalling # battery charge status and other events via system dbus # When called by any user who's not root, jrbme doesn't enter daemon # mode. Instead it serves as a cmd interface between user and a daemonized # instance of itself, talking to the daemon via signal and named pipes, # and reporting back to user all result codes, messages to stdout/stderr. # # sed -i "s/LEDPatterns=/LEDPatterns=PatternVboost;/" /etc/mce/mce.ini # vboost with reset on exit and (#'d) partial hostmode for PF-kernel #(c) 20101030 J.Reisenweber set -eu true=true false="" ${debug=/bin/false} && set -vx; # call like ~# debug="echo -n $0; date" script.sh #const PatternVboost=PatternVboost dbus-send="/usr/bin/run-standalone.sh /usr/bin/dbus-send" i2cset=/usr/local/sbin/i2cset #var : ${start_bme=true} : ${notify=true} trap cleanup INT QUIT TERM EXIT cleanup(){ trap - INT QUIT TERM EXIT # reset bq24150 $i2cset -y -m 0x80 2 0x6b 0x04 0x80 # stop LED indicator $dbus-send --system --type=method_call \ --dest=com.nokia.mce /com/nokia/mce/request \ com.nokia.mce.request.req_led_pattern_deactivate \ string:$PatternVboost $debug && ( Reg1=`$i2cget -y 2 0x6b 0x00` echo $Reg1 ) if [ $start_bme ] then sleep 2 log "Starting bme" /sbin/start --quiet bme fi exit } log(){ echo "${0}: $@" } logn(){ echo -n "${0}: $@" } # the script body. We read in whole text, and then execute a main at end of script, # this ensures the whole script has correct syntax and there'll be no reads at # runtime main(){ log "Stopping bme" /sbin/stop --quiet bme sleep 3 #echo host >mode # start vbus boost 5V $i2cset -y -m 0x07 2 0x6b 0x01 0x05; # set notification LED $dbus-send --system --type=method_call \ --dest=com.nokia.mce /com/nokia/mce/request \ com.nokia.mce.request.req_led_pattern_activate \ string:$PatternVboost #sleep 1 #echo F >/proc/driver/musb-hdrc while sleep 5; do Reg1=`$i2cget -y 2 0x6b 0x00` if [ 8 -ne $(( Reg1 & 0x0F )) ]; then errortext1="ERROR in VBUS supply: BQ24150-Reg1=$Reg1" case $(( Reg1 & 0x07)) in 0) errortext2="No error, just stopped";; 1) errortext2="VBUS OVERVOLTAGE - You just fried your N900";; 2) errortext2="OVERLOAD - N900 can deliver max 200mA. VBUS got shut off";; 3) errortext2="Battery too low. VBUS shut off";; 4) errortext2="Battery OVP - WTF are you doing?";; 5) errortext2="Thermal Shutdown (too hot)";; 6) errortext2="Watchdog expired. Script sucks";; *) errortext2="WTF? This should not happen";; esac log "$errortext1" log "$errortext2" if [ $notify ]; then $dbus-send --type=method_call --dest=org.freedesktop.Notifications \ /org/freedesktop/Notifications \ org.freedesktop.Notifications.SystemNoteDialog \ string:"`echo -en "Shutting down 5V supply for USB! Reason:\n$errortext2"`" uint32:0 string:"WARN"; #no idea about WARN fi cleanup fi # tickle watchdog timer $i2cset -y -m 0x80 2 0x6b 0x00 0x80; done cleanup } main "$@"; exit
/usr/sbin/booston: line 25: dbus-send=/usr/bin/run-standalone.sh /usr/bin/dbus-send: not found
Forced hostmode error: a full/low-speed device attached but high-speed mode selected
device descriptor read/64, error -71
twl4030_usb twl4030_usb: HW_CONDITIONS 0x50/80: link 1
|
2011-09-12
, 03:47
|
|
Posts: 2,222 |
Thanked: 12,651 times |
Joined on Mar 2010
@ SOL 3
|
#857
|
root cd /usr/sbin mv booston "booston-backup-`date`" wget http://maemo.cloud-7.de/maemo5/usr/sbin/booston chmod a+x booston echo "new booston should be ready to use now"
|
2011-09-12
, 16:12
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#858
|
PatternVboost=35;4;0;Rb;9d8040004817e0044807431e7e007e0042000000;9d804000e080421e431e0000
|
2011-09-13
, 04:26
|
Posts: 1,424 |
Thanked: 2,623 times |
Joined on Jan 2011
@ Touring
|
#859
|
|
2011-09-13
, 07:39
|
|
Posts: 2,222 |
Thanked: 12,651 times |
Joined on Mar 2010
@ SOL 3
|
#860
|
Huge thanks joerg_rw, but could You tell me - it was related to my device, or every "generic" user should get this problem? I.E, it was not reported, cause no one dared to test it before, or it's just fault of my configuration?
great application.i really love this app.but i face a problem.i install power kernel and update it.than i install H-E-N.but when i connect a usb mouse,pen drive and others than my n900 show me " unable to connect,no file system available''.and some times show ''mount /dev/sda1 not found''.plz sir help me in details.as soon possible.
thanks