Jump to content


Photo

SOLVED: accelerometer works fine but screen doesn't rotate


  • Please log in to reply
264 replies to this topic

#41 akn

akn

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 88 posts

Posted 06 September 2012 - 06:29 AM

Hello.
1. Autorotate problem is almost solved. I need to learn how to compile the driver and throwing them back into the tablet. Without it - auto rotate is not working again after reboot.
2. I can made sensor calibration. Soon, i make the application.

Great LexaR you are awesome :)
anxiously waiting for my tablet to be fully functional again :)

P.S Just saw your PM and my tablet is almost fully functional. this is awesome stuff

Edited by akn, 06 September 2012 - 07:28 AM.


#42 AntonK

AntonK

    Newbie

  • Jr. Member
  • Pip
  • 7 posts

Posted 07 September 2012 - 09:51 PM

Hello.
1. Autorotate problem is almost solved. I need to learn how to compile the driver and throwing them back into the tablet. Without it - auto rotate is not working again after reboot.
2. I can made sensor calibration. Soon, i make the application.


Hello.

Actualy I have a NOVO7 Aurora II with the same problem so I'm really interested in your dealing with this problem.
Please let me know if there is anything that may help you. I may test your driver or provide you with some additional information.

#43 akn

akn

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 88 posts

Posted 09 September 2012 - 09:55 AM

Hello.

Actualy I have a NOVO7 Aurora II with the same problem so I'm really interested in your dealing with this problem.
Please let me know if there is anything that may help you. I may test your driver or provide you with some additional information.

Well I'd love to help you out but LexaR hasn't posted the app publicly yet so I need his permission to do that or maybe he himself will come up with the app soon publicly. Be patient and wait for LexaR's post. We'll hear from him soon :-)
About problem, let me tell you that Lexar has almost resolved it. All you need to have is lexar's app and set one value and the auto-rotate works until you restart the tablet. Next time you turn it on, you have to set it again (and that's what lexar is working on at the moment so that the value doesn't reset upon restart) but still its more than fine because setting that value takes less than a minute :-)

#44 AntonK

AntonK

    Newbie

  • Jr. Member
  • Pip
  • 7 posts

Posted 09 September 2012 - 02:39 PM

Well I'd love to help you out but LexaR hasn't posted the app publicly yet so I need his permission to do that or maybe he himself will come up with the app soon publicly. Be patient and wait for LexaR's post. We'll hear from him soon :-)
About problem, let me tell you that Lexar has almost resolved it. All you need to have is lexar's app and set one value and the auto-rotate works until you restart the tablet. Next time you turn it on, you have to set it again (and that's what lexar is working on at the moment so that the value doesn't reset upon restart) but still its more than fine because setting that value takes less than a minute :-)


I suppose this value may be set upon boot time automaticaly by somae script. I guess I can deal with it.

#45 LexaR

LexaR

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 80 posts
  • LocationRussia, Belgorod

Posted 12 September 2012 - 04:04 AM

Hello.
This is my application to correct the auto rotation problem and sensor calibration.

1. delete my old application (if it was previously installed)
2. install and run new. Attached File  BMA Calibration.zip   174.9KB   3474 downloads
3. who have auto-rotate problems with the sensor press the "fix auto-rotate" and put the checkbox "fix on boot"
4. my sensor is soft reseting periodically and the auto rotate stops working. In this case, you have to put a check box "fix on screen on"

If there are errors - write to me, i will fix them.

This is my "Accelerometer Log" screenshots:
1. Before "fix" and "calibration":
Attached File  Screenshot_2012-09-12-12-35-07.png   27.84KB   767 downloads
2. After "fix", before "calibration":
Attached File  Screenshot_2012-09-12-12-35-59.png   25.71KB   629 downloads
3. After "fix" and "calibration":
Attached File  Screenshot_2012-09-12-12-36-59.png   27.55KB   566 downloads

ps: this is my first Android application

Edited by LexaR, 12 September 2012 - 04:05 AM.

  • akn, GeMir, Geodex and 2 others like this

#46 brushieF

brushieF

    Member

  • Jr. Member
  • PipPip
  • 10 posts

Posted 12 September 2012 - 07:31 AM

I done what you wrote here and my autorotation isnt working :( Im using CM10 by Christian on Aurora 2
Edit:
I just noticed that Accelmoeter log doesnt register anything. (After using app). My accelerometer doesn't work at all.

Edited by brushieF, 12 September 2012 - 08:01 AM.


#47 akn

akn

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 88 posts

Posted 12 September 2012 - 11:11 AM

I done what you wrote here and my familyfamily autorotation isnt working :( Im using CM10 by Christian on Aurora 2:
I just noticed that Accelmoeter log doesnt register anything. (After using app). My accelerometer doesn't work at all.


Probably you were in the middle of something when you saw the accelerometer log. Because it happened to me once. Try this:

1. Uninstall the app if you have installed it
2. Restart the tablet
3. Install the app again
4. Restart the tablet again (I had to do it because it was giving force close errors everywhere in the tablet)
5. Start the application again and allow it super user powers
6. Select fix auto rotate
7. Check both options. Then see if that works

@lexar: great work mate! Works on my elf 2 with cm10! Had to restart once because it was giving force close errors. but eventually works like a charm :), thank you so much for your efforts that wouldn't probably have been possible without you

PS: link to the solution added to the first post

Edited by akn, 12 September 2012 - 11:30 AM.


#48 brushieF

brushieF

    Member

  • Jr. Member
  • PipPip
  • 10 posts

Posted 12 September 2012 - 11:54 AM

Don't work. Thanks for that wonderful app which destroyed my accelerometer completely.

#49 LexaR

LexaR

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 80 posts
  • LocationRussia, Belgorod

Posted 12 September 2012 - 12:00 PM

Don't work. Thanks for that wonderful app which destroyed my accelerometer completely.

Make "soft reset" and "calibration reset" from menu and your sensor return to inital state.
Send me register values via email from applications menu.

#50 brushieF

brushieF

    Member

  • Jr. Member
  • PipPip
  • 10 posts

Posted 12 September 2012 - 12:06 PM

Done. Accelerometer don't work in any app. I switched to another rom too. I don't know your email so I put values here:
BMA250 device is: /dev/i2c-1
00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00: fa 10 81 eb 01 80 01 36 00 00 00 00 00 ff 81 03
10: 0f 00 00 00 00 ff 00 00 00 00 00 00 ff ff 00 ff
20: 05 00 09 30 81 0f c0 00 14 14 04 0a 18 48 08 11
30: 00 ff 00 e4 00 00 10 00 00 00 00 00 00 ff 00 41

#51 LexaR

LexaR

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 80 posts
  • LocationRussia, Belgorod

Posted 12 September 2012 - 01:06 PM

In the "normal" sensors: in the 0x00 register value should be 0x03. In the tablet with "normal" sensors - all works fine. It may be not calibrated, but the auto rotate works and everything else too. In the "problem" tablets in the 0x00 register value is 0xf9. So far, i met only one tablet with 0xf9 value in 0x00 register, but everything works fine on that tablet. When i gathered statistics of registers values, i see only one tablet with 0xfa value in 0x00 register (like you). In this case, system can not see the sensor at all. But the sensor is working (as i can see at registers values).

I look the driver from sources. Here is a part of code from the file:
// /common/customer/drivers/misc/bma250.c
// ...
// line 48
#define BMA250_CHIP_ID            3
#define BMA250E_CHIP_ID            249

//...
// line 3524
        if (tempvalue == BMA250_CHIP_ID || tempvalue == BMA250E_CHIP_ID) {
it should be replaced by this:
// /common/customer/drivers/misc/bma250.c
// ...
// line 48
#define BMA250_CHIP_ID            3
#define BMA250E_CHIP_ID            249
#define BMA250E2_CHIP_ID            250

//...
// line 3524
        if (tempvalue == BMA250_CHIP_ID || tempvalue == BMA250E_CHIP_ID || tempvalue == BMA250E2_CHIP_ID) {
Then, the sensor will be visible to the system.

I do not know how to compile the driver, may be in the cm10 thread on can help?

#52 akn

akn

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 88 posts

Posted 12 September 2012 - 02:27 PM

In the "normal" sensors: in the 0x00 register value should be 0x03. In the tablet with "normal" sensors - all works fine. It may be not calibrated, but the auto rotate works and everything else too. In the "problem" tablets in the 0x00 register value is 0xf9. So far, i met only one tablet with 0xf9 value in 0x00 register, but everything works fine on that tablet. When i gathered statistics of registers values, i see only one tablet with 0xfa value in 0x00 register (like you). In this case, system can not see the sensor at all. But the sensor is working (as i can see at registers values).


Well just realized that this version is buggy. After a few restarts my accelerometer stopped working too. I then had to reset all the values and revert back to the previous version of your application and even then my auto rotate wasn't working. Then after a few restarts it started working again (although I have uninstalled this latest version of the app and am back to the previous one) and that too without setting the register value after restart. I don't know how long this will continue to work but as of now it IS working

EDIT: for all who have not been able to get this app working try using this one (previous version of LexaR's app)

https://dl.dropbox.c...Calibration.apk

Two apps will be installed when you install this apk. Open the one which shows accelerometer values. On the top right tap to see menu. Now tap set custom values. In the left field write 0f and in the right field write 05. Press ok and you're done. Note that you will have to repeat these steps after each restart (set custom value)
After using the LATEST version of this app I had to struggle to get sensor back to working but it started to work after a few restarts so don't hesitate to restart your tablet a few times for the first time

Edited by akn, 12 September 2012 - 02:48 PM.


#53 akn

akn

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 88 posts

Posted 12 September 2012 - 02:53 PM

@lexar can you please post the whole code for this driver? I don't have enough time to download the whole source. Maybe I will look into the code to see for a solution if it is possible for me :p

#54 akn

akn

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 88 posts

Posted 12 September 2012 - 02:56 PM

Done. Accelerometer don't work in any app. I switched to another rom too. I don't know your email so I put values here:


The app knows his email address :p you just need to send it. The address column will be filled by itself :D

#55 Geodex

Geodex

    Global Moderator

  • Moderator
  • PipPipPip
  • 615 posts

Posted 12 September 2012 - 03:43 PM

Nice a lot of the ainol issues getting solved this week. Wonderful

Just foudn a fix for the "sd card checking for error" too.

:drinks:

Posted Image
Posted Image
Posted Image

Ainol Aurora II/ Pipo Max M1/ Samsung Galaxy Tab 10.1


#56 xenosireas.arts

xenosireas.arts

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 158 posts

Posted 12 September 2012 - 08:35 PM

Hello.
This is my application to correct the auto rotation problem and sensor calibration.

1. delete my old application (if it was previously installed)
2. install and run new. Attached File  BMA Calibration.zip   174.9KB   3474 downloads
3. who have auto-rotate problems with the sensor press the "fix auto-rotate" and put the checkbox "fix on boot"
4. my sensor is soft reseting periodically and the auto rotate stops working. In this case, you have to put a check box "fix on screen on"

If there are errors - write to me, i will fix them.

This is my "Accelerometer Log" screenshots:
1. Before "fix" and "calibration":
Attached File  Screenshot_2012-09-12-12-35-07.png   27.84KB   767 downloads
2. After "fix", before "calibration":
Attached File  Screenshot_2012-09-12-12-35-59.png   25.71KB   629 downloads
3. After "fix" and "calibration":
Attached File  Screenshot_2012-09-12-12-36-59.png   27.55KB   566 downloads

ps: this is my first Android application



this Solution really works my friend!!!! awesome app!!!! thank you very much!!!!
Posted Image

#57 xenosireas.arts

xenosireas.arts

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 158 posts

Posted 12 September 2012 - 09:10 PM

Hello.
This is my application to correct the auto rotation problem and sensor calibration.

1. delete my old application (if it was previously installed)
2. install and run new. Attached File  BMA Calibration.zip   174.9KB   3474 downloads
3. who have auto-rotate problems with the sensor press the "fix auto-rotate" and put the checkbox "fix on boot"
4. my sensor is soft reseting periodically and the auto rotate stops working. In this case, you have to put a check box "fix on screen on"

If there are errors - write to me, i will fix them.

This is my "Accelerometer Log" screenshots:
1. Before "fix" and "calibration":
Attached File  Screenshot_2012-09-12-12-35-07.png   27.84KB   767 downloads
2. After "fix", before "calibration":
Attached File  Screenshot_2012-09-12-12-35-59.png   25.71KB   629 downloads
3. After "fix" and "calibration":
Attached File  Screenshot_2012-09-12-12-36-59.png   27.55KB   566 downloads

ps: this is my first Android application



one dumb question Sir... do i need to keep this app to keep my auto rotation working? or is it ok to uninstall it after fixing my auto rotate?

by the way thank you for your awesome apps sir Lexar!!! more power!!
Posted Image

#58 LexaR

LexaR

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 80 posts
  • LocationRussia, Belgorod

Posted 13 September 2012 - 01:18 AM

Thanks to all, for feadback, i'll try to fix all bugs.

Well just realized that this version is buggy. After a few restarts my accelerometer stopped working too.

Stop working accelerometer or stop working auto rotate?
Is Accelerometer Log don't work too?
About my new application:
1. if you set "Fix on boot" my application set 0x05 value to 0x0f register at boot and stop working
2. if you set also "Fix on Screen On" my application start service, which register broadcast reciver for ACTION_SCREEN_ON and every times when you switch screen on application set 0x05 value to 0x0f register. And nothing else.

If you doing calibration i change 0x33, 0x36 and 0x37 register (sensor someself change 0x38, 0x39 and 0x3A).
If you don't doing calibration, application change only one register - 0x05!

@lexar can you please post the whole code for this driver? I don't have enough time to download the whole source. Maybe I will look into the code to see for a solution if it is possible for me :p

Yes, you can download file bma250.c (https://dl.dropbox.c...624973/bma250.c), but this is only library for the driver pack, i do not know what other files are needed for this driver pack.

Just foudn a fix for the "sd card checking for error" too.

it was not in my plans, but do not exclude that in the future

or is it ok to uninstall it after fixing my auto rotate?

in order to auto rotate work - the program should be installed. read my above answer for akn

#59 radeon

radeon

    Member

  • Jr. Member
  • PipPip
  • 29 posts

Posted 13 September 2012 - 08:54 PM

this is my problem, how i can fix it. I think i have problem with Z axis.
Posted Image
Posted Image
Posted Image

BMA250 device is: /dev/i2c-1
    00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
00: f9 10 c1 c5 d1 f2 f1 7f 00 00 00 00 00 ff 81 00
10: 0c 00 00 00 00 ff 00 00 00 00 00 00 ff ff 00 ff
20: 05 00 09 30 81 0f c0 00 14 14 04 0a 18 48 08 11
30: 00 ff 00 f4 00 00 10 00 00 00 00 00 00 ff 00 35
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
<img src='http://www.slatedroid.com/public/style_emoticons/<#EMO_DIR#>/mega_shok.gif' class='bbc_emoticon' alt='80' />: f9 10 d1 c8 f1 f1 f1 7f 00 00 00 00 00 ff 81 00
90: 0c 00 00 00 00 ff 00 00 00 00 00 00 ff ff 00 ff
a0: 05 00 09 30 81 0f c0 00 14 14 04 0a 18 48 08 11
b0: 00 ff 00 f4 00 00 10 00 00 00 00 00 00 ff 00 69
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

Edited by radeon, 13 September 2012 - 09:21 PM.


#60 LexaR

LexaR

    Advanced Member

  • Jr. Member
  • PipPipPip
  • 80 posts
  • LocationRussia, Belgorod

Posted 14 September 2012 - 12:16 AM

this is my problem, how i can fix it. I think i have problem with Z axis.

Hello. If you are use my old progrm, try to do the next:
1. set 0x36 register with 0x80 value
2. 0x33 with 0x01
3. 0x33 with 0x02
4. 0x14 with 0xb6
this is reset you sensor.
make screenshots from accelerometer log.

now, try to calibrate again.
1. put your tablet to the table
2. 0x37 with 0x00
3. 0x36 with 0x20
4. 0x36 with 0x40
5. put your tablet upright
6. 0x36 with 0x60
7. 0x33 with 0x01
8. 0x33 with 0x02
make screenshots from accelerometer log.

if it don't help. reset you sensor again and try another method:

1. put your tablet to the table
2. 0x37 with 0x20
3. 0x36 with 0x20
4. 0x36 with 0x40
5. 0x36 with 0x60
6. 0x33 with 0x01
7. 0x33 with 0x02
make screenshots from accelerometer log.

if it don't help, than reset sensor and try self test for axes:
axis x: 0x32 with 0x01
make screenshots from accelerometer log.
axis y: 0x32 with 0x02
make screenshots from accelerometer log.
axis z: 0x32 with 0x03
make screenshots from accelerometer log.
reset self test: 0x32 with 0x00
make screenshots from accelerometer log and try recalibrate.

if it don't help, try another method: slow offset compensation.
reset sensor, than:
1. 0x37 with 0x01
2. 0x36 with 0x07
start accelerometer log and move you tablet in radom dimension.
every axis must return to zero in some times
3. 0x36 with 0x80 for reset.

if it don't help, try repeate all again, but after every sensor reset put 0x0f register with 0x05 value.
if it don't help, try repeate all again, but after every sensor reset put 0x0f register with 0x08 or 0x12 value.

if it don't help - i also can't help to you.
  • radeon and rafaarfa like this