Author: Tony Lindgren Date: To: Pavel Machek CC: Merlijn Wajer, Sebastian Reichel, maemo-leste, Arthur D. Subject: Re: [maemo-leste] Tony's ofono version,
usb networking was Re: Hack for ofono gobi qmi interface for droid4
* Pavel Machek <pavel@???> [200425 18:34]: > Hmm, I like motmdm* interface. I'd suggest we keep it.
>
> > Based on comments from Johan, we want to keep the /dev/gsmmux* support
> > as is for serdev users too. Presumably most serdev-ngsm users would
> > not need any custom handling, and only we are really stuck with the
> > custom packet IDs AFAIK.
>
> ? I'm not sure I understand this or its implications.
Well if we can use /dev/gsmmux* interface directly, we save about
300 lines of kernel code that does not really help us because it
still does not make the modem AT compatible.
Earlier I was thinking we may not want to use /dev/gsmmux* at all
with serdev drivers. But it's already there and working, using it
leaves out a bunch of code compared to maintaining the additional
chardev support.
> > If we still want to keep the kernel chardev support, that's still
> > doable to bring up /dev/motmdm* chardevs like now instead of
> > /dev/gsmmux* like we have now. But I'm guessing we don't even need it
> > if we get ofono working with raw packet reads and writes and stop
> > pretending to be using AT commands :)
> >
> > Once we have raw packet read and write working, flipping to use the
> > raw /dev/gsmmux* should be trivial. At that point we just need to add
> > each packet ID to the beginning of each write as "U1234AT+CFUN?\r".
> > And then use it or ignore it in the results like we already do for the
> > kernel serdev gnss and audio drivers. I guess that only needs to be
> > done in the motorolamodem specific raw read and write functions.
> >
> > For sending continuation messages, they start with just "U" with no
> > packet ID. And for the packet ID, we can just use something similar
> > to what kernel is using with jiffies % 10000.
>
> But yes, this should be doable, too.
OK. So let's try to first figure out a way for ofono raw read/write
functions using the current /dev/motmdm* interface. Then after that
works, let's try to flip over to using /dev/gsmmux* interface. I need
to update the kernel patches for that too for a generic serdev-ngsm.
> > > > > Unfortunately USB networking still disconnects rather often; lets say
> > > > > 5 times an hour. Still usable, but a bit annoying.
> > > >
> > > > Hmm maybe you have a broken micro-USB connector?
> > >
> > > I don't think it is mechanical. It sounds more like some kind of power
> > > problems really. Do you have rock solid connection with recent
> > > kernels?
> >
> > Hmm OK. I'm typing this from a lapdock so at least the USB host mode
> > is behaving. Sounds like I need to test the USB peripheral support
> > again.
>
> Hmm, working USB host would also do the trick for me. I do have USB
> ethernet...
Yes so the VBUS regulator is now working in mainline and does not
depend on the battery voltage any longer.
> > Care to check if your USB disconnects are related to the green battery
> > charge led turning on or off when the battery is full?
>
> I don't think so. It was more like "USB is more likely to disconnect
> when doing power-hungry stuff on D4". I'll keep my eye on it...
Oh OK. That could mean that droid4 in the PC USB port draws more than
500 mA and gets cut off. Can you try with a powered USB hub?