Home repair tips forum

PM Notification

You are not logged in.

Welcome, Guest
Username Password: Remember me

Search Forum

Keyword

Medion Lifetab P9516 - Troubleshooting JB
(1 viewing) (1) Guest

TOPIC: Medion Lifetab P9516 - Troubleshooting JB

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 10 months ago #1792

  • DirtyHairy
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
Hi guys!

Crook1 has not responded yet. In the meantime, I have today discovered /sys/bus/usb/devices/1-1/avoid_reset_quirk (writing this from the top of my head, so the path might be off). Writing a 1 to this file will keep the kernel from resetting the device for error handling, eliminating one possible reason for what we are seeing. I have my tablet running with this option for half a day now without issues, but I won't cross my fingers just yet, I already had good runs of up to two days. If this fails, I'll try to build a 3.x for the device.

@Ameisentätowierer: I already had the same idea of running the stock ICS kernel with Crook1's JB build, but I was under the assumption that the names of the wifi module and firmware to load (if any) are configured at build time and could not be changed later (at least the errors I got when using bcm4329 with the lenovo sources). I'm curious, how did you work around this?
The following user(s) said Thank You: YLG80

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 10 months ago #1793

DirtyHairy wrote:

@Ameisentätowierer: I already had the same idea of running the stock ICS kernel with Crook1's JB build, but I was under the assumption that the names of the wifi module and firmware to load (if any) are configured at build time and could not be changed later (at least the errors I got when using bcm4329 with the lenovo sources). I'm curious, how did you work around this?


Hello DirtyHairy,
I simply replaced /system/lib/modules and /system/vendor/firmware with the files from ICS.
I'm somewhat sure, that the bcm4329 files are all the same on JB, but I was in a hurry, so I replaced the whole directory.

I can't understand, why these files are stored in /system. Storing them in the ramdisk would make it easier to replace the kernel part and separate it from the rest of the OS. But from the different kernel repos I got the feeling that the whole thing isn't as mature as it could be.

If you've found a matching 3.x kernel, please let me know!

Micky
Like my work?
Last Edit: 1 year, 10 months ago by YLG80.

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 10 months ago #1794

  • DirtyHairy
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
I have been partially successfull in building a 3.1.9 kernel tegra from AOSP (using a hand-tweaked config modeled after the stock config). However, EGL fails to initialize, and surfaceflinger dies, so all I get is a garbled screen and a few seconds later a adb session. I have gone as far as replacing the tegra framebuffer driver and gpu memory manager with those found in lenove 2.6.39 (which curiously seem to be more recent), but the problem remains. It looks like there is a mismatch between user and kernel space or an issue with GPU memory managment, but there are no errors logged in dmesg. I have some tricks still to try out, but looks like I hit a brick wall here If anyone is interested in experimenting, I'll be happy to share my config and the commit hash I based my work off.

As for avoid_reset_quirk: 3g died a couple of hours after my last post, so we can eliminate a device reset from the kernel during error handling from the list of possible reasons As I can't recall a single firmware revision which didn't have issues with 3g crashing (HC was especially terrible for me), we might also be facing a bug in the huawei firmware here. Perhaps experimenting with different RILs might indeed be a good idea.

Btw, wireless doesn't work in my 3.1.9 build either, but this might well be a firmware mismatch
Last Edit: 1 year, 10 months ago by DirtyHairy.
The following user(s) said Thank You: YLG80, Ameisentaetowierer

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 10 months ago #1796

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
Best wishes for 2013 to all of you.
I guess one of your wishes would be to get rid of the 3G ril crash !

I believe that ejtagles work on the Advent Vega tablet could give you some interesting information on the ril crash issue.
He has made a workaround to an incorrect SIM file access that finally causes the RIL to crash.
That tablet runs also the Tegra CPU and they have written a JB Kernel /CM10.
www.modaco.com/topic/330834-advent-vega-...lable/page__st__2560
www.tabletroms.com/forums/vega-rom-devel...lones-202-print.html
www.modaco.com/topic/330834-advent-vega-...lable/page__st__2520
Look at ejtagles posts.
The modem EM770W seems to use a similar USB config.
Yves
Last Edit: 1 year, 10 months ago by YLG80.

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1809

Where are the beans in JB?

Goto Settings->About and tap onto "android version" fast a couple of times.
A big bean will appear.
Tap this bean with all your fingers simultaneously and you'll see a bunch of them.
Try moving/swiping the beans.

Screenshot_2013-01-05-14-30-17.png
Like my work?
Last Edit: 1 year, 9 months ago by Ameisentaetowierer.
The following user(s) said Thank You: YLG80

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1833

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
About the RIL crash issue
I attach a radio logcat with the crash trapped.

File Attachment:

File Name: radio-stdby.zip
File Size: 26 KB


I've rebooted the tablet before starting the radio logcat.
Then I've switched the tablet to standby mode during half a day.
When switching the tablet ON, the ril had crashed, as shown by the end of the log.
At line 3665 you can see that polling the USB ports was successful after switching the tablet ON, but immediately after there is an error:
 
tcsetattr tmp=0,error is Bad file number


Don't know what means that error message.
Too bad that logcat did not add a timestamping.

At line 3746 the USB connection was dead ...
Yves
Last Edit: 1 year, 9 months ago by YLG80.

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1836

Hello Yves,

I think that the "bad file number" or "errno 9" (EBADF in Unix) comes from the rild and occurs when /dev/ttyUSB2 disappears.

When a Unix process opens a file, it gets a filedescriptor from the kernel. All subsequent operations are dealing with the filedescriptor. When ttyUSB2 disappears, the filedescriptor used by rild becomes invalid. When rild tries to use it anyway, the kernel throws an EBADF error.

Micky
Like my work?
Last Edit: 1 year, 9 months ago by Ameisentaetowierer.
The following user(s) said Thank You: YLG80

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1838

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
Thanks Mickey,
... but on line 3723 of the log, the ttyUSB2 port was successfully opened.

What is also strange:
Since yesterday, I cannot crash the RIL as long as the tablet remains powered via the power adapter, whether WiFi is ON or OFF.

What about another fix in ueventd.ventana.rc

The original file include
 
/dev/ttyACM* 0660 radio system
 

To me, it was the radio permission under HC (and ICS ?) (ttyACM*)

What about adding the permissions for ttyUSB* like this ?

 
/dev/ttyUSB0 0660 radio system
/dev/ttyUSB1 0660 radio system
/dev/ttyUSB2 0660 radio system
/dev/ttyUSB3 0660 radio system
/dev/ttyUSB4 0660 radio system
/dev/ttyUSB5 0660 radio system
 




Yves
Last Edit: 1 year, 9 months ago by YLG80. Reason: permissions ttyUSB*

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1841

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
Hi,
Regarding the radio (3G) crashes, I'd like to get more information from K1 / P9516 users.

- Do you observe 3G/radio crashes when running under ICS (or HC) ?
- Do you observe 3G/radio crashes when your tablet remains connected to the power charger ?
- Do you observe 3G/radio crashes when your tablet battery is more than 70% charged ?
(BTW if your battery is getting older, you sould observe radio crashes above 70% )

After many different RIL related files tests w/o being able to resolve that issue, we suspect:
- a firmware bug (baseband 11.810.09.19.00 and perhaps other releases)
- a mother board design flaw. (missing required large capacitors=energy buffers (2 X 330uF) on the Huawei 3G module power lines)

I'm now looking for the second and third alternatives.

You can use the Parameters, Battery, then touch the battery charge graph, to check the battery status when the radio crashes.

Thanks for your information.
Yves

From the Huawei EM820W datasheet :

In burst transmit mode of GSM/GPRS/EDGE, the instantaneous current of the module will
exceed 2.75 A, which will pull down the power voltage transitorily and perhaps result in the
reset of the module or host
. In order to prevent this situation, you can add a large bulk
capacitor beside the module on the host side (at least two 330uF capacitors).


A CM10 (v6.1 Krook's build) battery charge screenshot :

Screenshot_2013-01-17-09-58-12-web.png
Last Edit: 1 year, 9 months ago by YLG80.

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1845

  • Andri Od
  • OFFLINE
  • Junior Boarder
  • Posts: 31
  • Karma: 1
Hello Yves,

concerning the RIL crashes, I can say the following:

- RIL did crash also under ICS. But in that cases, I could reactivate it in most cases by switching airplane mode on an off.
- Don't remember exactly, but I guess it didn't crash under HC
- For my P9516, it crashes also with fully charged battery. Maybe last night it even crashed while the charging adapter was plugged (see attached screenshot)


Screenshot_2013-01-18-13-29-14.png
Last Edit: 1 year, 9 months ago by Andri Od.
The following user(s) said Thank You: YLG80

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1846

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
Hello Jürgen,

Thanks for your very interesting feedback.
I guess you have a rooted tablet.
When the RIL has crashed, do you see that the /dev/ttyUSB* (or ttyACM*) have gone ?
Do you still have the USB modem reported by lsub ?

Under JB we cannot restart the RIl by all means.
The USB device is completely down and can be revived only by a reboot RESET.

If it did not crash under HC, that would mean that the problem is in the software, not in the hw or fw.
Too bad that we have no HC 3.2 image to test.

Yves

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1847

  • hhuber2001
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
I bring you not one, not two, but 3 screenshots with the ril crashed. I have similar experiences like Andri Od posted.
No 3g crash in HC as far as I remember. Frequent crashes with battery drain in ICS but recoverable without a reboot.
All screenshots captured with CM 10 v6.1

Screenshot_2013-01-18-20-06-06.png


Screenshot_2012-11-25-09-59-04.png


Screenshot_2012-11-21-20-23-46.png
The following user(s) said Thank You: YLG80

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1849

  • DirtyHairy
  • OFFLINE
  • Fresh Boarder
  • Posts: 8
  • Karma: 0
I have been experiencing RIL crashes ever since I got the tablet, and across all Medion firmware releases. HC was particularily bad in this respect, but I don't remember battery drain accompanying the crashes. I don't see any influence of the battery level or of connecting the charger; I've definitely had crashes with 100% battery, and crashes when the charger was connected.

I, too, think that we might be facing a baseband firware bug or a hardware flaw here. It seems that lenovo is aware of the issue --- if you look into option.c in the released sources, you find a lenovo patch disabling autosuspend on the huawei dongle. I have the suspicion that there is a workaround somewhere buried in the medion ICS image which detects the crashes on resume and manages to reset the dongle --- this would explain the mysterious battery drain often witnessed with this image under ICS, which stops on resume. Would be interesting to take a look for this in the dmesg of a tablet running the official ICS, but I am too lazy to switch back just for this test. I skimmed the released sources for anything which looks like such a workaround, but couldn't find anything.
The following user(s) said Thank You: YLG80, Ameisentaetowierer

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1850

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
Thanks to each one of you for your posts and screenshots.
At first instance it's not an evidence that it is an hardware flaw.
But anyway, I'm trying to find a flat supercap in my junk and add it on the modem power lines.

@ Dirtyhairy,
Do you mean the ICS sources released by LENOVO as a last release?
I've that file.
I'm currently trying to find if it's possible to restart the modem using usb_modeswitch.(installed with PPP widget)
Up to now, after using several commands, I've not been able to reset the modem .
I still have to test another string... but I've some problems to crash the ril before testing.
Yves

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1854

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
I close the option "hardware issue", as I've remarked that, even with 15% battery charge, it's very difficult for me to crash the radio.
(ON/OFF or Airplane ON/OFF)

When the radio has crashed (i.e. lsusb shows vendor 0x12d1 and product 0x1003 instead of 0x1404), usb-modeswitch looks useless to reconnect the modem.
I've also tested a dbus reset utility, but it reboots the tablet !

It remains the firmware bug, as confirmed by certain posts (stack and timing issues)

Yves

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1863

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
Just an update on the WIP.(Work In Progress on the 3G issue )

The Huawei 3G modem firmware is now under the magnifier.

Prior to update that baseband using a CWM zip file, I'm trying to make a firmware backup of the current version (11.810.09.19.00)
We never know.
I've removed the modem from the tablet and have installed it in an XP laptop (Medion MD96630) with a second mini PCI-e slot.
Unfortunately the modem was not detected.
So I've removed the WiFi card from the first mini PCIe slot and replaced it with the 3G module.(with it's antenna !!)
Then it was immediately detected.
No problem to install the appropriate drivers.
The modem can be used with the Huawei Mobile Partner software.

I've bought credits to use the dc-unlocker s/w and it's actually reading the flash.
It takes ages to complete that task !
And I've to do it in different formats to insure the compatibility with the flash tools .

When OK, the target is to put the module back into the tablet and flash version 11.810.09.24.00 under Android via CWM.
We'll see if it resolves the 3G issue.
Mickey has also found a more recent f/w upgrade but it has to be flashed under Windows with a specific Huawei tool.

Stay tuned ...
Yves
Last Edit: 1 year, 9 months ago by YLG80.
The following user(s) said Thank You: Ameisentaetowierer

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1865

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
First return from experience:
********************************************* WARNING *************************************************************
DO NOT try to update your baseband to the very last version available on the NET,i.e rel 11.810.10.02.00.
************************************************************************************************************************
This version has been released to make the Huawei modem EM820W compatible with the new MBIM Win8 driver.
The upgrade changes the vid/pid to 12d1/1571.
It does not work in the P9516/K1 tablet.
Yves

More information on MBIM here:
mail.gnome.org/archives/networkmanager-l...2-July/msg00098.html
Last Edit: 1 year, 9 months ago by YLG80.

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1868

I've just uploaded a working baseband-upgrade here: www.avi-plus.com/repair-tips-forum/misce...or-upgrade.html#1867
Unfortunately this doesn't prevent the 3G-crashes.

But I learned something new:
During the upgrade-process of the modem the USB-PID changes from 1404 to 1003 and back to 1404.
The USB-PID 1003 is exactly what I also saw when the 3G didn't work anymore.
So this doesn't mean, that the modem has crashed, but has entered some sort of upgrade-mode.
Unfortunately we're not able to recover from this now, but the fact, that the upgrade-software can do this makes me confident that we can find a way to do this too.

Micky
Like my work?

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1871

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
Hello Mickey,
As I cannot use the modem any longer with the tablet, I'm playing with it under windows.
I can say that it has the same behavior.
Sometimes it drops down to download mode (pid 1003)for some unknown reason.

But, I've found very interesting information on the Huawei modem mode switching.
I'm playing with a Win program named RevSkills that can send almost any command to a Huawei modem.
We need to use (QualComm) QCDM protocol commands via the ttyUSB ports.

To switch a modem to download mode :
Use the UI Com Port
Send a command : 0x7E3A

To switch a modem back to normal mode (more interesting !)
Use the only UI com port remaining in download mode
Send a command : 0x7E02
This will reset the modem, and Windows immediately reloads the normal mode drivers.

I've sniffed the com port to check the strings sent to the modem when I switch mode with RevSkills:


Switch revskills to UI com port with QCMD protocol

A$QCDMG [len=8]
<20130203171510.763 RX>
<LF>K<LF>
<20130203171511.944 SYS>

RESET MODEM : (monitor serial port) -> sent to modem, modem reverts back to normal mode with pid 1404
~<LF>"_~

SWITCH TO DOWNLOAD MODE -> sent to modem, modem switches to download mode with pid 1003
~:¡n~

FROM DOWNLOAD MODE RESET MODEM -> sent to modem
~<LF>"_~ ASCII 7E followed by
<20130203171916.823 RX> response from modem
~<STX>jÓ~



I can switch back and forth to download mode without rebooting the machine !

I guess one ( ) of our linux specialists ( ) will find a way to launch a little sh
to switch the modem back to normal mode when the pid found is 1003.


Here is a piece of code from github on how to force AT$QCDMG command;
 
my $device = $ARGV[0] || $ENV{DEVICE} || '/dev/ttyUSB2'; # last device! control port!
my $at_qcdmg = $ARGV[1]; # force AT$QCDMG from command-line
my $port = Device::SerialPort->new( $device ) || die "$device: $!"; $port->baudrate(115200) || die "fail $device baudrate";
@@ -73,10 +74,12 @@ $port->read_const_time(3000); # 1 s read timeout

while ( my $drain = $port->input ) {
warn "# drain $drain\n";
$at_qcdmg = 1;
}
if ( $at_qcdmg ) {
$port->write('AT$QCDMG' . "\r");
warn "DIAG mode: ", $port->read(9 + 3); # echo, OK+cr/lf
}
my $diag = {
 


Hope it will help.
Yves
Last Edit: 1 year, 9 months ago by YLG80.

Re: Medion Lifetab P9516 - Troubleshooting JB 1 year, 9 months ago #1872

  • YLG80
  • OFFLINE
  • Moderator
  • Posts: 617
  • Karma: 22
More on the QCDMG protocol to switch our modem back to work when in download mode with pid 1003.

AT&QCDMG will switch the modem to download mode with PID 1003.
Could be tested from a terminal by sending the correct hex sequence.

Once in download mode the modem with respond to specific commands delimited by 0x7E
Here is a capture of the hex string sent after AT$QCDMG to switch to download mode pid 1003:
 
0x7e 0x3a 0xa1 0x6e 0x7e 0x0d 0x0a
 

Here is a capture of the hex string sent to switch back to normal mode (restart modem or phone) pid 1404:

 
0x7e 0x3c 0x4c 0x46 0x3e 0x22 0x5f 0x7E 0x0d 0x0a
 


QCDMG_protocol.png



QCDMG Code reversed engineered here :
http://cgit.freedesktop.org/ModemManager...Manager/tree/libqcdm

from aHuawei datasheet

$QCDMG action command syntax:
Command Possible response(s)
$QCDMG OK
$QCDMG=?
Defined values:
1. After switching to DM mode, could not accept commonly AT commands.
2. The status will switch to DM mode when module debugging.
3. The status will resume to AT mode after restart module.
4. The baud rate can not modify by AT command under the DM mode.
Connect two calls and cut off the connection between users and them simultaneously.
Implementation:
AT$QCDMG
OK
Last Edit: 1 year, 9 months ago by YLG80.
Moderators: YLG80, Ameisentaetowierer
Time to create page: 4.53 seconds