Author Topic: Htc Universal  (Read 698784 times)

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Htc Universal
« Reply #60 on: April 18, 2008, 06:43:03 am »

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Htc Universal
« Reply #61 on: April 18, 2008, 06:45:24 am »
OK, I seem to have a clearer understanding from reading the web. It seems if you don't use xdm or an alternative manager, you cannot start an X session as non-root. If so, then running icewm as non-root is not a possibility.

I am understanding it correctly?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Htc Universal
« Reply #62 on: April 18, 2008, 07:25:20 am »
OK, this is clear, I'll get on with install an gdm or xdm and will see.

On another note, what I've noticed so far, datathief, how is the keyboard backlighting - do you have it working? As mine isn't backlit when in debian...
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

datathief

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Htc Universal
« Reply #63 on: April 18, 2008, 09:30:57 am »
Quote from: ShiroiKuma
OK, this is clear, I'll get on with install an gdm or xdm and will see.

On another note, what I've noticed so far, datathief, how is the keyboard backlighting - do you have it working? As mine isn't backlit when in debian...
Check /sys/class/leds.  The following turns the keyboard backlight on:
Code: [Select]
echo 1 >"/sys/class/leds/htcuniversal:kbdbac/brightness"
I've bound a script to the backlight button to cycle through different keyboard and screen backlight settings.  I'll upload it to my wiki later.

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Htc Universal
« Reply #64 on: April 18, 2008, 10:03:48 am »
Quote from: datathief
I've bound a script to the backlight button to cycle through different keyboard and screen backlight settings.  I'll upload it to my wiki later.
Thanks.

I see you're uploading a rootfs now. Since you mentioned you don't use X, what is in it? Does it include X? Returning to my question earlier on, it's of interest to me why you don't use X, out of performance reasons? And do you just work with screen and console or what?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

datathief

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Htc Universal
« Reply #65 on: April 18, 2008, 10:26:35 am »
Quote from: ShiroiKuma
I see you're uploading a rootfs now. Since you mentioned you don't use X, what is in it? Does it include X? Returning to my question earlier on, it's of interest to me why you don't use X, out of performance reasons? And do you just work with screen and console or what?
There's no X in the rootfs  -  I wanted to keep it as small as possible.  I'll put a page on my wiki for installing X.

I use screen, mutt (e-mail), finch (instant messaging) and links (web browsing).  I've built a basic phone UI with whiptail (I'll upload that to the wiki too), and my ringtone is music from "Project X" played using mikmod.

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Htc Universal
« Reply #66 on: April 18, 2008, 10:53:07 am »
Quote from: datathief
I use screen, mutt (e-mail), finch (instant messaging) and links (web browsing).  I've built a basic phone UI with whiptail (I'll upload that to the wiki too), and my ringtone is music from "Project X" played using mikmod.
I've started testing your phone daemon just now. Just started inspecting /etc/htcunid/event.d/example

How do you set a ringtone? You've mentioned before there's no caller ID, but is it possible to elicit some visual feedback when a call is incoming.

I've confirmed it works, I've made a call and received one when I knew I was being called, however no feedback, no vibrate...

Do I have to rename the example file something and then edit it, haven't had a deep look at the structure of your deb so far. But just to get me started, so that I can pop the SIM in and do testing being sure in the meantime not to miss incoming calls and SMS.

Your help is much appreciated. Thanks a lot.

EDIT: OK, just saw your uploads on your site. Will go check these out.
EDIT 2: Oops, too fast, uploads still not there.
EDIT 3: And there
« Last Edit: April 18, 2008, 11:16:54 am by ShiroiKuma »
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

datathief

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Htc Universal
« Reply #67 on: April 18, 2008, 11:01:00 am »
Quote from: ShiroiKuma
Quote from: datathief
I use screen, mutt (e-mail), finch (instant messaging) and links (web browsing).  I've built a basic phone UI with whiptail (I'll upload that to the wiki too), and my ringtone is music from "Project X" played using mikmod.
I've started testing your phone daemon just now. Just started inspecting /etc/htcunid/event.d/example

How do you set a ringtone? You've mentioned before there's no caller ID, but is it possible to elicit some visual feedback when a call is incoming.

I've confirmed it works, I've made a call and received one when I knew I was being called, however no feedback, no vibrate...

Do I have to rename the example file something and then edit it, haven't had a deep look at the structure of your deb so far. But just to get me started, so that I can pop the SIM in and do testing being sure in the meantime not to miss incoming calls and SMS.

Your help is much appreciated. Thanks a lot.
Check that the example script is executable.  Then you should get vibration when there's a call or SMS.

(I have working caller ID now, btw  -  I'll be uploading that tonight).

I've just uploaded the scripts I'm using here.  Install them to /etc/htcunid/event.d, edit them (you probably prefer an mp3 ringtone), and make them executable.

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Htc Universal
« Reply #68 on: April 18, 2008, 11:45:43 am »
Quote from: datathief
Check that the example script is executable.  Then you should get vibration when there's a call or SMS.

(I have working caller ID now, btw  -  I'll be uploading that tonight).

I've just uploaded the scripts I'm using here.  Install them to /etc/htcunid/event.d, edit them (you probably prefer an mp3 ringtone), and make them executable.
Yeah, that was the reason, I'll be testing it now.

BTW, do you login as root, or as a regular user. It seems if I login as a normal user, I can't start the htcunid service even through sudo.

Also, is there a special audio hack associated with sound. If I play a ringtone in mplayer and use the 0 and 9 keys to manipulate volume, it goes mute. Is volume even in other apps only to be managed by htcunid volume?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

datathief

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Htc Universal
« Reply #69 on: April 18, 2008, 11:59:53 am »
Quote from: ShiroiKuma
BTW, do you login as root, or as a regular user. It seems if I login as a normal user, I can't start the htcunid service even through sudo.
Recent versions of htcunid.deb install to /etc/rcS.d, so it starts up at boot time.

Quote
Also, is there a special audio hack associated with sound. If I play a ringtone in mplayer and use the 0 and 9 keys to manipulate volume, it goes mute. Is volume even in other apps only to be managed by htcunid volume?
You should be able to use alsamixer (or any ALSA volume control) for this.  If you have problems, you could try using ALSA's OSS emulation (mplayer -ao oss).

ZDevil

  • Hero Member
  • *****
  • Posts: 1998
    • View Profile
    • http://
Htc Universal
« Reply #70 on: April 18, 2008, 02:03:32 pm »
Perhaps it's not such a bad idea to set up and get everything working as root before figuring out things for normal users?

Life is too precious for hacking *too much*
Visit my Z screencap gallery[/color]
My EeePC 701 Black = Debian (Lenny) on IceRocks + Transcend SDHC Class6 8GB + 2GB RAM
My Zaurus SL-C3200 = Debian EABI (kernel 2.6.24.3-yonggun) on a swapped internal Sandisk Extreme III CF 16gb
My Debian EABI feed: http://matrixmen.free.fr/zaurus/debian/
My OpenBSD/Zaurus feeds:  Link1, Link2
[/i][/font][/color][/size]

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Htc Universal
« Reply #71 on: April 18, 2008, 04:05:41 pm »
Quote from: datathief
(I have working caller ID now, btw  -  I'll be uploading that tonight).
Great, looking forward to that. I guess I'll wait before you put it up before checking how the ringtones can be personalized for different users based on caller ID.

Or have you already thought of that?
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

datathief

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Htc Universal
« Reply #72 on: April 18, 2008, 05:09:46 pm »
Quote from: ShiroiKuma
Quote from: datathief
(I have working caller ID now, btw  -  I'll be uploading that tonight).
Great, looking forward to that.
This is now available

Quote
I guess I'll wait before you put it up before checking how the ringtones can be personalized for different users based on caller ID.

Or have you already thought of that?
The caller ID is passed to the event.d scripts as $2.  You could do something like:
Code: [Select]
case "$2" in
0123456789)
  # play custom ringtone
 ;;
0987654321)
  # play custom ringtone
 ;;
*)
  # play default ringtone
 ;;
esac

ShiroiKuma

  • Hero Member
  • *****
  • Posts: 900
    • View Profile
Htc Universal
« Reply #73 on: April 18, 2008, 07:36:35 pm »
OK, will try the above.

My comments so far:

SMS getting passed to whiptail doesn't work if extended character set (Unicode) is used. This is a big problem in languages that use them, i.e. Russian, Czech etc. If an SMS with Unicode characters is received, it is displayed as empty.

After making a call, touchtones are not possible. Thus when you dial into let's say a mailbox, or a bank automatized system, you cannot enter numbers or pounds etc.

I'm currently away from my Z, but perhaps the command to revigorate the keyboard after suspend should be executed as part of the restore after suspend sequence. Since I don't have the Z to inspect, don't remember where the shellscripts to be carried out after restore went...

Didn't check so far, but did you include the wifi powerdown to save energy into the init scripts to be run after boot?

EDIT: Installed htcunid-0.3 and the Unicode SMS missing is partially solved, I think. It comes as garbled text, but that's evidently because whiptail doesn't use a Unicode font. This is an improvement though. Anyhow, an archiving option needs to be built into the SMS receiption. I.e. not only display the SMS received and number it came from, but also echo it >> to a default SMS archive. If you're not working on it, I'll come up with a temporary hack.

The same goes for calls. There needs to be a call register. I'm just about to check the caller ID in htcunid-0.3, but again, a simple echo the number and time >> to a call-log file should do.

EDIT2: When I added a quick hack to whiptail shellscript to >> the SMS text to a log-sms.txt file, it seems it doesn't save the text in Unicode. Can't tell for sure, since I haven't installed a UTF-8 compliant terminal, but seems to be the case. Will report back later.

EDIT3: The htcunid-0.3 package gives me problems when accepting a call. The call ends in a couple of seconds and the phone freezes.

EDIT4: I'm thinking it's not associated with the package itself, rather a config of zdevil's rootfs I used originally. Maybe it might be better to install from datathiefs rootfs. I vaguely recall when installing X under debian on the Z the need to take packages from Aangstroem, like xserver-kdrive etc. Datathief, do you have a brief set of steps to take to install working X, since I can't consult with the Z.
« Last Edit: April 19, 2008, 04:03:45 am by ShiroiKuma »
[span style=\'font-size:8pt;line-height:100%\']Das ganze tschechische Volk ist eine Simulantenbande.[/font][/span]
Militäroberarzt Bautze

datathief

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Htc Universal
« Reply #74 on: April 19, 2008, 06:16:05 am »
Quote from: ShiroiKuma
SMS getting passed to whiptail doesn't work if extended character set (Unicode) is used. This is a big problem in languages that use them, i.e. Russian, Czech etc. If an SMS with Unicode characters is received, it is displayed as empty.
The function to decode an SMS doesn't handle anything more than 7-bit ASCII yet.

Quote
After making a call, touchtones are not possible. Thus when you dial into let's say a mailbox, or a bank automatized system, you cannot enter numbers or pounds etc.
True.  I can add a function to htcunid to do this, but I don't have any ideas for a UI.

Quote
I'm currently away from my Z, but perhaps the command to revigorate the keyboard after suspend should be executed as part of the restore after suspend sequence. Since I don't have the Z to inspect, don't remember where the shellscripts to be carried out after restore went...
Do you have apmd installed?  This works for me (see /etc/apm/event.d/htcuni-keyboard).

Quote
Didn't check so far, but did you include the wifi powerdown to save energy into the init scripts to be run after boot?
Yes  -  this is done by /etc/init.d/htcuni-wifipower.

Quote
EDIT: Installed htcunid-0.3 and the Unicode SMS missing is partially solved, I think. It comes as garbled text, but that's evidently because whiptail doesn't use a Unicode font. This is an improvement though.
See above.

Quote
Anyhow, an archiving option needs to be built into the SMS receiption. I.e. not only display the SMS received and number it came from, but also echo it >> to a default SMS archive. If you're not working on it, I'll come up with a temporary hack. The same goes for calls. There needs to be a call register. I'm just about to check the caller ID in htcunid-0.3, but again, a simple echo the number and time >> to a call-log file should do.
The default example script does this.  A better solution would involve /var/spool and use mailbox format.  Feel free to upload scripts to the wiki.

Quote
EDIT2: When I added a quick hack to whiptail shellscript to >> the SMS text to a log-sms.txt file, it seems it doesn't save the text in Unicode. Can't tell for sure, since I haven't installed a UTF-8 compliant terminal, but seems to be the case. Will report back later.
Again, see above.

Quote
EDIT3: The htcunid-0.3 package gives me problems when accepting a call. The call ends in a couple of seconds and the phone freezes.
I'll look into this.  Could be a problem with the whiptail script.

Quote
EDIT4: I'm thinking it's not associated with the package itself, rather a config of zdevil's rootfs I used originally. Maybe it might be better to install from datathiefs rootfs. I vaguely recall when installing X under debian on the Z the need to take packages from Aangstroem, like xserver-kdrive etc. Datathief, do you have a brief set of steps to take to install working X, since I can't consult with the Z.
I used the packages from http://yonggun.tistory.com/54