![]() |
Re: Worse brightness setttings than OS2007
Yes, I am currently assuming 0 as sw level, just to set the current...
Thanks for explaining what the kernel is doing! The values I was seeing make a bit more sense now. I thought I was going insane, writing one value to the file and seeing another! >_> I will look into reverse-engineering that, as it would be much better if the applet worked without the special kernel... Oh, new version: http://cs.trinity.edu/~acm/debs/adva...ght-0.3.tar.gz And source: http://cs.trinity.edu/~acm/debs/adva...0.3-src.tar.gz The only real changes are a bit of code cleanup (doubt it has a performance impact) and it now checks to see which device it is on, to prevent blanking the screen on an n800 (since it lacks a transflective screen) and confusing the user. Edit: an strace is here: http://pastebin.ca/850430 I'm not sure how to interpret that... I have done some strace interpretation for an Operating Systems class once, but nothing this complex. :( |
Re: Worse brightness setttings than OS2007
Quote:
Code:
Nokia-770-36:/# strace /usr/sbin/dsmetest -l 1Code:
write(3, "\f\0\0\0\206\2\0\0\1\0\0\0", 12) = 12Code:
write(3, "\f\0\0\0\206\2\0\0\2\0\0\0", 12) = 12Code:
write(3, "\x0c\x00\x00\x00\x86\x02\x00\x00\x02\x00\x00\x00", 12) = 12write(3, "\f\0\0\0\211\2\0\0d\0\0\0", 12) = 12 ASCII code for 'd' is 100 so it makes some sense. The beginning is perhaps some version handshake or structure size or something. |
Re: Worse brightness setttings than OS2007
Ok, so all I have to do is write out to "/tmp/dsmesock" something like this?
Code:
\x0c\x00\x00\x00\x86\x02\x00\x00\x[hexvalue]\x00\x00\x00By the way, what did your strace command line look like? On my n800 it is complicated a little bit because strace doesn't exist in the chroot with dsmetest, so I had to do Code:
strace -f chroot /mnt/initfs/ dsmetest -l 100 |
Re: Worse brightness setttings than OS2007
Quote:
Quote:
|
Re: Worse brightness setttings than OS2007
Err, yes... I guess I saw that and it didn't register. I guess I will have to compile something similar to get info...
Edit: Ok, so here is the code I am trying to use... Code:
#include <stddef.h>strace: Code:
Nezumi:~# strace -f ./testdsme |
Re: Worse brightness setttings than OS2007
Maybe using hex values could confuse you or compiler less (i.e. maybe the output on screen look same but binary data in string is in fact different)?
Also if it still doesn't work you could steal the code from https://garage.maemo.org/plugins/scm...ot=powerlaunch see dsme.c and .h, void dsme_connect(Powered *server) has slightly different socket setup. EDIT: also you may try to drop unneeded /mnt/initfs/ from path to dsme socket but that perhaps won't fix anything |
Re: Worse brightness setttings than OS2007
Wow, yeah... They've done ALL the work for this. They actually even have a display brightness function. >_>
I'm going to start ripping the code I need from their stuff and converting it to work correctly in my applet. I <3 GPL! :) |
Re: Worse brightness setttings than OS2007
Ok, well... I decided to just cheat and use system() to run chroot and dsmetest. It's a little laggier than it would probably be if I implimented it myself in C, but it *works* for now.
I will continue trying to get the socket connections and stuff to work in the next day or two. Meanwhile, the newest version of the applet does *not* require a modified kernel, and can be found here: http://cs.trinity.edu/~acm/debs/adva...ht-0.4b.tar.gz And source: http://cs.trinity.edu/~acm/debs/adva....4b-src.tar.gz To install, just untar, cd into the directory and run ./install.sh as root (though it should try to auto gainroot itself... thanks for the code for that, fanoush :P). Note: I'm not sure why, but it seems that when you first add it and enable it, the |
Re: Worse brightness setttings than OS2007
Quote:
|
Re: Worse brightness setttings than OS2007
rm_you,
Huge, huge thanks for your work! Just checked your page and found a v0.5 deb package for your applet. I installed it using the red pill mode, enabled it in the status bar... And here I go. Works like a charm. No I can use my N800 as a real bedside alarm clock with the dim light at its very minimum. Awesome. Thanks a lot! Oh, next step: if it could somehow remind the settnigs wether the unit is plugged or not, that would be, well, just perfect... Cheers! |
Re: Worse brightness setttings than OS2007
Quote:
|
Re: Worse brightness setttings than OS2007
Quote:
@fanoush Thanks for the link to powerlaunch, I love it :D @rm_you Thank you for this but could you please (if possible) add a link to display settings like the original applet. Either way, thanks for a great program. |
Re: Worse brightness setttings than OS2007
Yes, the link for the 0.5 deb can also be found along with a tar.gz of the source at https://garage.maemo.org/frs/?group_id=564
I've had to take a break from Maemo in general due to... personal issues recently. Hopefully I will be back at it sometime soon. Meanwhile, if anyone else wants to make improvements, I'd be happy to include patches / etc. Sorry the SVN isn't set up, but I haven't had time recently to do even *that*. Anyway, I hope you continue to find the program useful! :) |
Re: Worse brightness setttings than OS2007
Quote:
I tried installing it from the .deb and couldn't, then went into red pill mode and it installed fine. It works great, the only problem I see is that after rebooting the icon on the "taskbar" always shows full brightness, at least until you open the applet and adjust the brightness, then it will report the current state correctly. |
| All times are GMT. The time now is 16:33. |
vBulletin® Version 3.8.8