yashsingh1/xdaforums huggingface dataset:
[Touch Viva, MDA Basic ROM Development] raditzgds:
Driver tsc2046_ts seems work

After several tryings and analyses I was arrived to this conclusion the drive (perhaps U has noted this long time ago) tsc2046_ts; work but is not converting appropriately the screen coordinates; by ssh using the command cat cat /procs/interrupts (without touching the screen) I obtain the below output (the configuratio board-htcheral have irq 139 for the screen, seems the command make need the target all for remake all modules and .o files)

root@localhost:~$ cat /proc/interrupts
CPU0
2: 332 MPU omap_udc pio
3: 0 MPU omap_udc iso
4: 277 MPU GSM ICR
19: 15035 MPU DMA
20: 0 MPU DMA
21: 0 MPU DMA
22: 0 MPU DMA
23: 0 MPU DMA
24: 0 MPU DMA
25: 12285 MPU LCD DMA
26: 18683 MPU mpu_timer1
30: 0 MPU mpu_timer2
31: 9 MPU lcdc
36: 18 MPU i2c_omap
55: 21917 MPU mmci-omap
57: 0 MPU rtc0
58: 0 MPU rtc0
61: 183 MPU omap_udc
66: 142 MPU GSM RF
67: 0 MPU omap-keypad
78: 0 MPU peripheral wakeup
85: 0 MPU DMA
86: 0 MPU DMA
87: 0 MPU DMA
88: 0 MPU DMA
89: 0 MPU DMA
90: 0 MPU DMA
91: 0 MPU DMA
92: 0 MPU DMA
93: 0 MPU DMA
94: 0 MPU DMA
295: 0 GPIO gpio-keys: POWER
299: 0 GPIO tsc2046-ts
301: 0 GPIO i2c-htcpld-btns
Err: 0
root@localhost:~$

As you can see at 299: CPU value 0 GPIO tsc2046-ts is working, if I touch the screen, and perform the same command the output:

299: 2 GPIO tsc2046-ts

Deppendig of the touch instensity and/or durtion this values increments one by one, but this is related with the delay between the performs of the cat command.

bY adding a print output at process static void tsc2046_ts_rx(void *arg) in tsc2046_ts.c before the coordinates convertions:

xN = ((pA * x) + (pB * y) + pC) / pS;
yN = ((pD * x) + (pE * y) + pF) / pS;

And killing X mode (via ssh running the command /etc/init.d/android stop)

each time I press the screen I see the print output wich I definned. Seems to by a conversion problem.

Obviously each modiffication of source code, need a kernel compilation.

By the way I'm happy cause Mr MusikMonk is back In bussness.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
I didn't try using "cat /procs/interrupt", because I didn't know it before :o (every noob has to start somewhere, right? :D)

However, I was using printk statements in the driver's code for tracing, and I did notice that it's receiving irq=299 when the screen is touched.

Printing x and y in the function tsc2046_ts_rx give the values 4095 for both. At first I was doing a mistake and printing in the update_pen_state function, that showed the values at 0, 0. I've noticed now that this happens when the timer function calls update_pen_state when the pen is up. But when the pen is down, tsc2046_ts_rx fails to call update_pen_state because the values of x, y and pressure are above limits.

Right now, I'm trying to figure out where the actual reading of the coordinates (and pressure obviously) happens.
[Touch Viva, MDA Basic ROM Development] raditzgds:
Well, thats was my idea

Yes... that was my idea tray to determinate the correct coordinates...using too a printk en tsc2046-ts.c .... well ... I hope we have a goods news at brief time..
[Touch Viva, MDA Basic ROM Development] raditzgds:
Well, thats was my idea

Yes... that was my idea try to determinate the correct coordinates...using too a printk en tsc2046-ts.c .... well ... I hope we have a goods news at brief time..
[Touch Viva, MDA Basic ROM Development] MusikMonk:
I'm glad to have someone else working with me on this.

Sadly, I'm not any closer to figuring out what's wrong... Are you doing better than me?
[Touch Viva, MDA Basic ROM Development] raditzgds:
Help wanted!!!

well I was thinking propouse you analize the actual tsc2046 driver, lasy nigth I arrivtd to the conclosion evry data sending by the screen device is FFFF, so any conversin (CONv_ d1, d2 ) return a 12 bits answer 4095, I thik maybe the driver reads an erroneus mem address, maybe the error was in the init procedure of the driver. Email me, perhaps we can do some progress
[Touch Viva, MDA Basic ROM Development] MusikMonk:
It looks like we're thinking around the same lines, but this where I got stuck.

I've sent you an email, perhaps I'll be able to help you.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Good news!

With the help of various persons, the Touchscreen is now working! The calibration is still a little bit off but it should be fixed soon.

I've attached the zImage in case anyone is interested in trying it.

* First download wing-linux-0.4pre3-rootfs.cab from http://sourceforge.net/projects/wing-linux/files/Wing Linux Development/

* Now install it to storage card.

* Download the attached zip file, it contains two files zImage and Default.txt.

* Copy both files to the "linux" folder in your storage card. There should already be a zImage there, overwrite it.

* Now run haret from that folder (or wing-linux under programs in the start menu) and click on run.

* Don't click anything during installation, let it use defaults.

* Grab yourself a cup of coffee and wait till installation finishes, first boot takes a lot of time.

I gave the key mapping in a previous post, but here it is again:

- D-Pad + Centre: works normally.

- Green: Dialer.

- Red: Default behaviour under Android is like this:

* Short press: puts device in standby (check next link for information about that). This can be changed in the settings.

* Long press: Display menu to turn off device (again refer to next link), put device in airplane mode...​

- Volume up: menu key (it's the key that unlocks the screen as well).

- Volume down: back/cancel.

Look here for some informations that you might need:

http://sourceforge.net/apps/trac/wing-linux/wiki/FAQ

This is the status of wing-linux on the herald:

http://sourceforge.net/apps/trac/wing-linux/wiki/Status

We're still missing these stuff:

- Backlight

- LEDs

- Bluetooth

- Vibration

And I'm having trouble setting up my APN, I might be using wrong settings. Unless someone else confirms this issue, I'm gonna consider it an error from my side.

If anyone has some questions or bugs to report, feel free to do it here. But please avoid questions already covered in the FAQ linked above.
[Touch Viva, MDA Basic ROM Development] angel7.cz:
:)

Wow man that looks great. I will try it and post my feelings. Thank you very much.:)
[Touch Viva, MDA Basic ROM Development] angel7.cz:
:)

Installing and booting ... Ok.

Android and apps are running smoothly.

GSM, WiFi, BT, Batery not working.

It looks realy great but not usefull at this point.

TouchScreen is moved little bit.

Good work ! Looking forward for some news.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
First of all, thanks for the feedback.

GSM should, to a certain extent, work. On my phone I was able to make calls (mic works, so the other side can hear you but you wont hear them), receive and send SMS. Incoming calls are disconnected directly but show up in the log.

And as I wasn't able to set up my APN, I was unable to test GPRS.

And yeah, touchscreen calibration is a little bit off. I'll see if I can get this fixed tomorrow. Can you tell me what problems did you have?

And by the way, if your SIM is locked, you'll need to unlock it from WM first. Although Android can accept the pin and unlock the SIM, it'll have trouble connecting to network afterwards.

Development is probably going to be slow, it seems that there's only raditzgds and me working on the Opal. And, although I have been lucky with some stuff so far, I lack the experience and knowledge for this project. I'm still learning as I go. Plus, at the moment, our progress won't go beyond what wing-linux are achieving, and that project is also suffering from lack of developers.
[Touch Viva, MDA Basic ROM Development] phatboijp:
good work musikmonk!!!!

thanks musikmonk!! ive been keeping tabs on this for the past few weeks, wow! you're the only reason why i think i might be keeping my viva hahahaha!!! please keep up the good work, we owe you a lot! i wish i could help!!!! but i don't know any programming , i'll be learning soon tho ...but not going to be in your level anytime soon! how long do you think it will take till wifi starts working hahhahaha!!!
[Touch Viva, MDA Basic ROM Development] angel7.cz:
:)

Ok i need to unlock my sim thak you:) Well i have some knowlage of programing in c++, but realy don't know what should i do to help you with development (where to start). So maybe i can help you little bit. Sorry for my english :)
[Touch Viva, MDA Basic ROM Development] XirXes:
I tried it out today and I had some different results than others. First, my touch screen seemed pretty accurate, tho I didn't use the stylus. Second, I was able to make an outgoing call.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Sorry for disappearing for a while.

Yes, making outgoing calls is something you should be able to. I'm not sure if we should be able to receive calls or not. It's not like it'll be of any use without sound, but I'll check with the wing-linux guys to get this out of the way.

Using stylus you'll notice that calibration is a little off, but that's no longer an issue. The touchscreen can now be calibrated on first boot.

Here's the Opal's status in the project:

http://sourceforge.net/apps/trac/wing-linux/wiki/HTCOpal

The question marks should read "Not working", I'll ask someone to update it later.

I've submitted some patches to wing-linux so they can add some support for our device. The next build (0.4pre4) should be out soon, when it is, it'll have cabs for the Opal making things easier.

Besides touchscreen calibration, not much has changed. This build of wing-linux is mainly done to include new devices.

Once it's out, I'll probably make a fresh new thread to be able to keep things updated and tidied up.

I'm currently working on getting bluetooth to work, can't tell when/if I'll get it right. raditzgds seems to have disappeared, so I don't know if he had better luck than me or if he's still going in the same direction.

And about sound and wifi, it'll probably be a while. I'm not helping with the development for those, so I don't know the exact details. Developers from wing-linux and linwizard are working on it.
[Touch Viva, MDA Basic ROM Development] jagan2:
Thanks

Thank u bro i left the idea of android os just then today i read ur post in which u gave default.txt boot script for opal plus ur image file i did according to ur instructions and succeeded although i had to uninstall and reinstall the cab two times. Now about the rom its excellent its speed is really awesome but bro when enabling and disabling something for example airplane mode its too much slow. Plus its not searching any network i wanted to use interent but no network searching even for calling someone :( just just now installed will tell if i get some problems.

And yes ur awesome developer.

Bro one more request can u port the latest wm 6.5 build 23047 to opal through ervius kitchen if u need help porting i will do actually me net slow so i cant download the kitchen and port further my exams are going on will u plz i request? :)
[Touch Viva, MDA Basic ROM Development] MusikMonk:
You're giving me too much credit here :D

I'm only trying to get the Opal supported by making small changes to what the developers of wing-linux and linwizard already did.

Is you SIM locked by any chance? If it is, you'll need to unlock it from windows before booting android. Even though Android can accept the PIN code and unlock the SIM, it'll have trouble connecting to network after that.

For speed, I really can't help there. I'm only working on kernel level support (i.e. drivers and the like), actual Android development is being done by darkstar62.

Still, speed might be slightly improved in the future, I think that the processor is running at 195mhz, it might be possible to run it at 201mhz in a next version (not THE next version). But don't take my word for granted.

And about my last post, I checked with darkstar62 about incoming calls, it's a know bug. Should be fixed in the next version.

By the way, someone made a small tut for installing apps on Android, it requires using a linux distro on the pc:

http://www.youtube.com/watch?v=Wwk25mBHYsw

It can be done in other ways as well such as scp (copy over ssh).

I haven't tried it myself, and I haven't even searched for a place to download applications from.

And please, everyone keep in mind that this is a work in progress. It's still far from being a complete replacement for WM.

For WM6.5, I haven't tried cooking roms before. So far I've been avoiding 6.5 because I don't want to deal with it bugs. I might give it a look if I find that I have the time. I can't promise anything.
[Touch Viva, MDA Basic ROM Development] bttoxic:
thanks!!!!
[Touch Viva, MDA Basic ROM Development] MusikMonk:
The new development release (0.4pre4) from wing-linux is out. You can download it from their site here:

http://wing-linux.sf.net/

The download link is on the right.

The zip, that you'll find there, has multiple cabs. You'll only need to install two of them: rootfs and opal.

Please refer to these links for more informations:

FAQ: http://sourceforge.net/apps/trac/wing-linux/wiki/FAQ

Device Status: http://sourceforge.net/apps/trac/wing-linux/wiki/HTCOpal

Main features of new release: http://sourceforge.net/apps/phpbb/wing-linux/viewtopic.php?f=3&t=30
[Touch Viva, MDA Basic ROM Development] jagan2:
Thanks

Thanks bro for the quick reply i didnt expected that so was offline yesterday.

Now i gave so much credit to u because until wing linux 0.4pre3 they have not given opal board support so i was unable to boot android on opal after using ur image and opal boot script i successfully installed opal.

Thanks for informing about wing linux 0.4pre4.

Now bro i experimented little and found this:

Actually first i inserted airtel sim(india) i donno what it is i mean i think its gsm only but not worked.

Then i inserted reliance gsm sim it worked. And about the speed problem i was saying that android is much much faster then wm but when switching something like switch from cellular mode to airplane mode it takes long times never finished i had to soft reset and also android dont shutdowns everytime i have to soft rest.

Now about the gprs it completely dont works i tested the android emulator on pc and found that in apn menu automatically there a connection would appear but in the mob in apn section nothing appears plus no option to add new connection :mad:

And one more thing due to lack of keypad on htc opal we are unable to specify the android installing size i mean it by default installs 250 mb due to this iam unable to access storage card. and one more thing how to explore storage card in android.

When the boot starts screen looks awesome because i have never seen pc like boot on mobile :D

And about wm 6.5 rom i didnt say to cook a room but porting. Porting means copying the xip and sis file of rom of some other device like daimond to opal rom its basically rom upgrading a thread is there in opal rom development that is ervius visual kitchen. U dont have to cook something just follow the steps and a new rom will be created actually my net is too slow to download the kitchen so i was requesting u anyways will try to download the kitchen if u have time then plz say i will guid u through remote support then a new Chief for opal will be born :D and that is u.

Once again thanks for the reply hope will reply this one too :D
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Shutting down doesn't work yet, it's best to follow this:

https://sourceforge.net/apps/trac/wing-linux/wiki/FAQ#Q:OkthenhowdoIreboot

You can add a new APN connection. Go to APN settings and click the menu button (Volume Up) and you'll find the option to to that.

However, there's currently an issue with entering new APN data, if it's not already listed in the file apns-conf.xml, it won't be accepted. You can add it there via SSH.

The default space is enough for now, you won't need anything bigger. Once more space becomes needed, this can be easily fixed.

Using 0.4pre3, Android didn't read the storage card correctly. That was fixed in pre4. As for exploring the card, Android doesn't have an application for that by default, you'll need to install one.

For WM, I'll send you a PM in a minute.
[Touch Viva, MDA Basic ROM Development] jagan2:
Do one thing bro send me pm in which tell me ur yahoo id and come online in yahoo messenger now there we can discuss comfortably.:)
[Touch Viva, MDA Basic ROM Development] msigeek:
Woahhh.. I just booted Android on my HTC Viva. its just funntasstic..! I never, loved the UI on my mobile so much before.

I really wish if we can build a build, with which I can run this permanently on this device. Great job guys.

Cheers'

Vijay Raj

MS-MVP [Setup-Deploy]

www.msigeek.com
[Touch Viva, MDA Basic ROM Development] matzino:
hi!!! with this new version android works on my viva (opal)! but in my case the htc shows a block screen and says to press menu button... how could unlock it? We don't have menu button.

Thanks
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Key mapping is already posted:

Power button can work but is currently not mapped to anything as standby is still not working.

I'm currently working on bluetooth, there's some progress but it's still not really usable yet. If anyone cares to see the modified code for bluetooth, contact me.
[Touch Viva, MDA Basic ROM Development] matzino:
THANK YOU!. great! thanks i've no read that.
[Touch Viva, MDA Basic ROM Development] msigeek:
Any updates?

Hi MusikMonk, Kindly lemme know, if we have any updates regarding this.

Cheers'

Vijay Raj

MS-MVP [Setup-Deploy]

Weblog: www.msigeek.com
[Touch Viva, MDA Basic ROM Development] rhiakath:
Is there any place where i can get a tutorial, or an how-to about installing android on my HTC Touch Viva (Opal) ?

Thanks
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Eveything you would need to know have already been posted or at least linked in this thread, please look in the previous pages.

Sorry for the lack of updates, but, truth be told, there isn't much to say. My university started a couple of weeks ago and I haven't been able to give this much time.

The guys at wing-linux and linwizard are trying to move to a newer kernel (which should get sound and wifi working) but I'm having some issues getting the Opal to work with that kernel.

With the older kernel, I managed to get bluetooth somewhat working but it was highly unstable, which is why I didn't post about it. The newer kernel might fix that.

Vibration, leds and backlight will probably take a while as the relevant hardware seems to be different from that of other devices.
[Touch Viva, MDA Basic ROM Development] tuxonhtc:
Just bought my brand new HTC touch, and installed the Android (thanks musicmonk! u rock!).. Thanks to winglinux.. :) Just awesome! Far better than crapdos mobile :p

Musicmonk, thanks for ur efforts! I'm sure you'll get the wifi golden soon..

But the problem is that It won't shut down :( even the soft reset key aint workin!
[Touch Viva, MDA Basic ROM Development] MusikMonk:
That can't be the fault of wing-linux, soft reset doesn't have anything to do with the system. It's pretty much like taking the battery out and putting it back in.

Try the stuff here:

http://sourceforge.net/apps/trac/wing-linux/wiki/FAQ#Q:OkthenhowdoIreboot

If that didn't work, remove the battery and you'll be back to windows when the device is on. But I would advice you to check if the reset button works or doesn't at all.
[Touch Viva, MDA Basic ROM Development] tuxonhtc:
Oh so it's supposed to work like this.. Nevermind, i'll proceed with battery removal :(

Still android rocks, even with these limitations.. I guess I made the wrong choice.. :( Anyways thanks a lot for porting this properly to Opal! Keep us updated musicmonk.

Cheers! :)
[Touch Viva, MDA Basic ROM Development] XirXes:
It looks like excitement has dwindled here a bit but for anyone that would like to know Wing linux 0.4 came out a few days ago. Get it here.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
I'm really glad to see someone else is interested in this :D

I've been meaning to post that, but haven't gotten around to doing it.

This version doesn't differ by much from 0.4pre4. Probably the only thing you'll notice is the inclusion of "AndExplorer" which is, as the name implies, a file explorer. That should make installing apps easier (just copy the .apk files to /system/app and you're done). So again, don't think that you'll be able to throw WinMo away just yet.

The next planned release is 0.4.1, the main goal of that release is upgrading to the latest Angstorm distro.

Some work is being done by darkstar62 and the linwizard guys to get the upstream kernel working for omap devices. But I haven't had much luck with Opal yet.
[Touch Viva, MDA Basic ROM Development] Lord Magnus:
The alredy released 0.4!
[Touch Viva, MDA Basic ROM Development] jagan2:
Musikmonk can we expect android 2 on viva or first android 1 will be developed?:)
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Don't wait for that to happen. At the moment the next goal is switching to the newer kernel to get everything working (sound, wifi, camera...).

So, until that happens, it's very doubtful that wing-linux would switch to a different Android version. Especially since wing-linux's general goal is to get

Linux

working on omap devices with Android just being the user interface of choice.
[Touch Viva, MDA Basic ROM Development] Lord Magnus:
Can't wait for them to do that. As soon as everything is working, I'll switch to android as main system... :)
[Touch Viva, MDA Basic ROM Development] jagan2:
We are here to support!!

Musikmonk but still the development is going too slow. Still there are many peoples who are supporting this project we love android. I also cant wait to see all the working things on android and succesfully running on opal.:)
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Correction, there are many people who are waiting for this project to finish. And a few actually working on it.

Well then, why don't you try to help with development. ;)
[Touch Viva, MDA Basic ROM Development] jagan2:
hmm... musikmonk sure i would like to help u as well as the development but i dont think i could coz i have no idea on linux.. If there is anyway i can help tell me i will surely try my best. :)
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Wing Linux 0.4.1 Released:

http://xdaforums.com/showthread.php?t=586333
[Touch Viva, MDA Basic ROM Development] jagan2:
Just saw, some very good improvements i will try this soon after the download completes. Thanks for informing good luck for the development.:)
[Touch Viva, MDA Basic ROM Development] Lord Magnus:
I'm passing through the first boot with this release. I don't know if it's something with my cell phone or what...
[Touch Viva, MDA Basic ROM Development] MusikMonk:
That's weird, as far as I know the kernel haven't changed. So there's no reason for this to stop working on the Opal.

I haven't had the chance to try this yet. I'm installing the cab right now and I'll post what I find.

Edit:

Works fine for me, booting time is a lot shorter than before and the whole system has a snappier feeling to it.

Delete rootfs.img (NOT rootfs.img.status) from /Storage Card/linux then make sure that you have at least 250MBs free on the sd card and try booting again. If it doesn't work, tell me exactly what you see.
[Touch Viva, MDA Basic ROM Development] Lord Magnus:
Oh, maybe that is the problem. I didn't have that free space.

I get this error:

switch_root: chdir(/mnt/loop0): No such file or directory

I waited all night yesterday and nothing happened. I'll cleaup the SD card and try again.
[Touch Viva, MDA Basic ROM Development] MusikMonk:
Yeah, that sounds like a space issue.

By the way, if you didn't already try a second time. You might want to try 0.4.2:

http://wing-linux.sf.net/