All of lore.kernel.org
 help / color / mirror / Atom feed
* Modem on Droid 4 (mdm6600) in recent mainline
@ 2020-07-29 22:08 Pavel Machek
  2020-07-29 22:54 ` [maemo-leste] " Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2020-07-29 22:08 UTC (permalink / raw)
  To: kernel list, tony, merlijn, martin_rysavy, maemo-leste

[-- Attachment #1: Type: text/plain, Size: 832 bytes --]

Hi!

There's something very wrong with /dev/ttyUSB4 in recent kernels:
unsolicited incoming data from the modem are getting lost; I believe
it means also SMS notifications, but it is very easy to reproduce with
incoming call notifications.

They just don't come.

But if you keep pasting "AT" into minicom, they actually do.

Of course... that means that trying to debug ofono is ... "interesting".

I tried playing with
/sys/bus/platform/drivers/phy-mapphone-mdm6600/usb-phy\@1/power/control
files and timeouts, but could not get it to work.

Any idea what could be wrong there?

Is there easy way to disable power management for testing?

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [maemo-leste] Modem on Droid 4 (mdm6600) in recent mainline
  2020-07-29 22:08 Modem on Droid 4 (mdm6600) in recent mainline Pavel Machek
@ 2020-07-29 22:54 ` Pavel Machek
  2020-08-01 16:26   ` Pavel Machek
  0 siblings, 1 reply; 3+ messages in thread
From: Pavel Machek @ 2020-07-29 22:54 UTC (permalink / raw)
  To: kernel list, tony, merlijn, martin_rysavy, maemo-leste

[-- Attachment #1: Type: text/plain, Size: 1657 bytes --]

Hi!

> There's something very wrong with /dev/ttyUSB4 in recent kernels:
> unsolicited incoming data from the modem are getting lost; I believe
> it means also SMS notifications, but it is very easy to reproduce with
> incoming call notifications.
> 
> They just don't come.
> 
> But if you keep pasting "AT" into minicom, they actually do.
> 
> Of course... that means that trying to debug ofono is ... "interesting".
> 
> I tried playing with
> /sys/bus/platform/drivers/phy-mapphone-mdm6600/usb-phy\@1/power/control
> files and timeouts, but could not get it to work.
> 
> Any idea what could be wrong there?
> 
> Is there easy way to disable power management for testing?

I tried this... and it did not fix the problem :-(.

									Pavel

diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
index 94a34cf75eb3..7ddf5aa35105 100644
--- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
+++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
@@ -21,7 +21,7 @@
 #define PHY_MDM6600_PHY_DELAY_MS	4000	/* PHY enable 2.2s to 3.5s */
 #define PHY_MDM6600_ENABLED_DELAY_MS	8000	/* 8s more total for MDM6600 */
 #define PHY_MDM6600_WAKE_KICK_MS	600	/* time on after GPIO toggle */
-#define MDM6600_MODEM_IDLE_DELAY_MS	1000	/* modem after USB suspend */
+#define MDM6600_MODEM_IDLE_DELAY_MS	100000000	/* modem after USB suspend */
 #define MDM6600_MODEM_WAKE_DELAY_MS	200	/* modem response after idle */
 
 enum phy_mdm6600_ctrl_lines {


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [maemo-leste] Modem on Droid 4 (mdm6600) in recent mainline
  2020-07-29 22:54 ` [maemo-leste] " Pavel Machek
@ 2020-08-01 16:26   ` Pavel Machek
  0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2020-08-01 16:26 UTC (permalink / raw)
  To: kernel list, tony, merlijn, martin_rysavy, maemo-leste

[-- Attachment #1: Type: text/plain, Size: 2885 bytes --]

Hi!

> > There's something very wrong with /dev/ttyUSB4 in recent kernels:
> > unsolicited incoming data from the modem are getting lost; I believe
> > it means also SMS notifications, but it is very easy to reproduce with
> > incoming call notifications.
> > 
> > They just don't come.
> > 
> > But if you keep pasting "AT" into minicom, they actually do.
> > 
> > Of course... that means that trying to debug ofono is ... "interesting".
> > 
> > I tried playing with
> > /sys/bus/platform/drivers/phy-mapphone-mdm6600/usb-phy\@1/power/control
> > files and timeouts, but could not get it to work.
> > 
> > Any idea what could be wrong there?
> > 
> > Is there easy way to disable power management for testing?
> 
> I tried this... and it did not fix the problem :-(.

This does fix the problem:

# writing to ttyUSB3 eventually crashes the modem
# ttyUSB0 -- works w/o delay for an hour.
date
DEV=/dev/ttyUSB0
while test -e $DEV; do
  echo > $DEV
    sleep .3
      done
      date

...and with that:

1) AT commands work over ttyUSB4; yes that interface is far away from
fully compliant with the standard.

2) AFAICT, there are attempts at delivering SMS messages over QMI:

ofonod[16913]: src/network.c:ofono_netreg_strength_notify() strength
60


ofonod[16913]: QMI: < 01 89 00 80 05 01 04 00 00 01 00 7d 00 11 7a 00
...........}..z.
ofonod[16913]: QMI:   00 00 00 00 00 06 72 00 04 14 d0 d4 f2 7c fc 6e
......r......|.n
ofonod[16913]: QMI:   bf c5 69 76 19 00 00 02 80 10 81 61 21 80 68 d6
..iv.......a!.h.
ofonod[16913]: QMI:   b0 be ec ce 83 f4 e1 75 58 ef 4e af eb 2c 90 38
.......uX.N..,.8
ofonod[16913]: QMI:   cf 7e 83 ac e1 36 c8 9e 3f 97 dd 65 f9 db 1e 76
.~...6..?..e...v
ofonod[16913]: QMI:   97 41 ee f0 9c 5d 26 d7 d5 e9 71 1a a4 2e 93 dd
.A...]&...q.....
ofonod[16913]: QMI:   6f 79 58 ff b6 97 41 e8 f2 9c fd 06 c1 e5 6f 10
oyX...A.......o.
ofonod[16913]: QMI:   5c 9e 9e d3 eb 70 10 f9 0d 9a 87 db ef b7 78 ce
\....p........x.
ofonod[16913]: QMI:   ae a3 f3 3a d0 8d 96 8b c5 70
...:.....p
ofonod[16913]: QMI:     WMS_ind msg=1 len=125
[client=1,type=4,tid=0,len=137]
ofonod[16913]: QMI:        {type=17,len=122}
ofonod[16913]: drivers/qmimodem/sms.c:event_notify()
ofonod[16913]: drivers/qmimodem/sms.c:event_notify() ack_required 0
transaction id 0
ofonod[16913]: drivers/qmimodem/sms.c:event_notify() msg format 6 PDU
length 114
ofonod[16913]: src/sms.c:ofono_sms_deliver_notify() len 114 tpdu len
114
ofonod[16913]: src/sms.c:handle_deliver()
ofonod[16913]: src/sms.c:sms_dispatch()
ofonod[16913]: src/sms.c:sms_dispatch() dst -1 src -1
ofonod[16913]: Aborting (signal 11) [src/ofonod]
user@devuan:/my/ofono$

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-01 16:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 22:08 Modem on Droid 4 (mdm6600) in recent mainline Pavel Machek
2020-07-29 22:54 ` [maemo-leste] " Pavel Machek
2020-08-01 16:26   ` Pavel Machek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.