Samsung GI-B3740 support in Modem-manager?
Oskar Enoksson
enok at lysator.liu.se
Wed Oct 22 16:01:01 PDT 2014
Thanks for your answer Marius, and thanks for the kalmia-driver in
Linux-kernel.
I was planning to use this B3740 stick for my OpenSuse laptop, and if
that worked I could perhaps try to make it work on my Netgear WNR3500L
Mips based router running "shibby tomato" Linux 2.6, and possibly a
Raspberry pi project.
I'm still stuck at getting things working on my laptop though. The
kalmia driver that came with OpenSuse 13.1 seems to work with B3740.
Udev also triggers a usb_modeswitch to the same USB vendor:product as
B3730. So far so good:
#:~/> lsusb
Bus 002 Device 005: ID 04e8:6889 Samsung Electronics Co., Ltd GT-B3730
Composite LTE device (Commercial)
Bus 007 Device 002: ID 0b97:7761 O2 Micro, Inc. Oz776 1.1 Hub
Bus 007 Device 003: ID 0483:2016 STMicroelectronics Fingerprint Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 004: ID 0b97:7772 O2 Micro, Inc. OZ776 CCID Smartcard Reader
#:~/> lsmod | grep 'option\|kalmia'
option 42468 0
usb_wwan 20380 1 option
usbserial 44667 2 option,usb_wwan
kalmia 13464 0
usbnet 43621 1 kalmia
For some reason the network interface created by kalmia.ko is not named
wwan0, but something like wwp0s29f7u4:
#:~/> ifconfig -a
wwp0s29f7 Link encap:Ethernet HWaddr 78:47:1D:39:73:AC
BROADCAST MULTICAST MTU:1380 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
ModemManager 1.0.0 (which is used in OpenSuse 13.1) then tries to load
the "generic" plugin, which fails.
I downloaded the sourcecode for ModemManager 1.4.0 and created a new
"kalmia"-plugin by looking into the documentation for ModemManager, on a
chat-script for B3740 I found on the webb, and on the sourcecodes of the
other existing ModemManager plugins. I didn't derive my plugin from
Icera, instead I derived it directly from MMPlugin and MMBroadbandModem.
After lots of trial-and-error the plugin now comes pretty far. Problem
is I'm really not good at AT-commands, nor at how 4G connection is
supposed to work. Is a pppd supposed to start on the wwan interface?
Should I do something in the ModemManager-plugin to make that happen?
Must I implement any "unsolicited events" handlers, or is that not
necessary?
Another problem is that this modem locks up if it is left idle for even
just a few seconds (all communication to ttyUSB? times out after that).
The only remedy I found is usb_modeswitch -R reset or stick
removal+reinsert.
Attached is the output from ModemManager 1.4.0 with "kalmia"-plugin.
Perhaps someone can see what's missing?
Thank you and best regards
/Oskar
On 10/22/2014 08:55 PM, Marius Kotsbak wrote:
> 2014-10-03 9:04 GMT+02:00 Aleksander Morgado <aleksander at aleksander.es
> <mailto:aleksander at aleksander.es>>:
>
> On Thu, Oct 2, 2014 at 11:12 PM, Oskar Enoksson <enok at lysator.liu.se
> <mailto:enok at lysator.liu.se>> wrote:
> > Hi. I bought a Samsung GT-B3740 LTE USB-modem on ebay (they sell them
> > for just ~10 Euro there now).
> >
> > However, making it work under Linux turned out to be non-trivial. My
> > kernel 3.11 under OpenSUSE 13.1 have the necessary kalmia.ko and
> > option.ko drivers, but ModemManager doesn't support it (the generic
> > plugin doesn't work).
> >
> > I found https://github.com/mkotsbak/ModemManager-Samsung-LTE which
> > supposedly contains a plugin for Samsung GT B3710/3730/3740 <tel:3730%2F3740>, but it
> > seems to be an old version of ModemManager - it's not obvious how to
> > merge this code into e.g. ModemManager 1.0.0 which is what OpenSUSE 13.1
> > uses.
> >
> > My questions now:
> >
> > Does anyone already have a ModemManager plugin for my modem GT-B3740 or
> > any other kalmia modem?
> >
>
> I'm not sure if Marius finished that plugin or if he stopped because
> he had some problems or something. I don't recall seeing that plugin
> in the ML, truth be told. Marius?
>
>
> Yeah, the firmware was so bad that I gave up. Even the simplest AT
> commands failed for that modem if they were not exactly like my manual
> script derived from analyzing the behavior of the supplied Windows
> connection software, and the exact order (maybe even timing). It was
> quite obvious that the firmware was made just to work with their own
> software, and even then it was unstable and sometimes required a restart
> (reinsert it). I think even ModemManager's probing code would cause it
> to fail, so getting it to work would require a lot of customization of
> the common modem code.
>
> I also don't have the modem anymore, so I won't be able to test anything
> more on this plugin.
>
>
>
> Anyway, that code in Marius' branch is for MM 0.6.x, MM 1.x is a whole
> different codebase... and I'm not sure whether the Samsung plugin
> (icera based) is suitable for that device.
>
>
> Given that someone got it working with the same kalmia kernel driver, I
> would assume not: http://armageddon421.de/?p=165
>
> > If not, can you give me some hints on how to write a plugin? I don't
> > know anything about modemmanager, but I found the documentation on
> > https://developer.gnome.org/ModemManager/unstable/ and I suppose I could
> > create a plugin from that information and from Marius B. Kotsbaks old
> > code. But should one create a new plugin from scratch? Or should it be
> > derived from some existing plugin? Or should I just add the kalmia-modem
> > functionality into the existing samsung plugin?
>
> FYI, the latest docs are in:
> http://www.freedesktop.org/software/ModemManager/api/latest/
> Not sure how they ended up in gnome.org <http://gnome.org>, truth be
> told.
> i
> Writing a new plugin is not very difficult, basic steps would be:
>
> 1) Create a new MMPluginSomething which creates a new
> MMBroadbandModemSomething for that specific modem. Initially the new
> modem will just be a subclass of MMBroadbandModem without any other
> change.
> 2) Try with the new MMBroadbandModemSomething and see where it fails.
> 3) When it fails, subclass the step where it failed with your fix
> until it works. Then, back to step 2.
>
> Ideally you shouldn't need to create new steps in the generic modem,
> just subclass existing ones with a new implementation, like in here:
> http://www.freedesktop.org/software/ModemManager/api/latest/ref-overview-plugin-specific-modems.html
>
> Anyway, I'd suggest to try with latest ModemManager 1.4 or git master,
> and post here the debug log when that modem is used, to see what
> really is happening and how we can handle it.
> http://www.freedesktop.org/wiki/Software/ModemManager/Debugging/
>
> Cheers!
>
>
> Yes, given that the modem is discovered by ModemManager, which I think
> it should, please post the debug logs so that we could see if the
> failures are of the same types as the other Samsung modem.
>
> --
> Marius
>
>
>
> _______________________________________________
> ModemManager-devel mailing list
> ModemManager-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/modemmanager-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kalmia.log
Type: text/x-log
Size: 63857 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/modemmanager-devel/attachments/20141023/65bba606/attachment-0001.bin>
More information about the ModemManager-devel
mailing list