# FreeBSD and USB GSM modem as Samsung GT-E1282T



## dmtr (Mar 11, 2016)

Good day!

Available equipment: Samsung GT-E1282T.
GPRS _available_ on this device.

`usbconfig` output:

```
ugen1.3: <product 0x3d00 vendor 0x1782> at usbus1, cfg=0 md=HOST spd=FULL (12Mbps) pwr=ON (100mA)
```
What are the chances of launch of this device as GSM modem?

`kldload umodem.ko ucom.kou3g.ko`
without a result.


----------



## SirDice (Mar 11, 2016)

Make sure the modules are loaded _before_ you plug in the device.


----------



## Phishfry (Mar 11, 2016)

VID=1782 PID=3d00
Is a SpreadTrum device.


----------



## Phishfry (Mar 12, 2016)

So googling the name I see this is a cell phone. So you want to tether your cell phone to FreeBSD for data services.

https://www.freebsd.org/doc/handbook/network-usb-tethering.html


----------



## Phishfry (Mar 12, 2016)

Maybe to save yourself some headache guessing the protocol. I would boot up to either Windows or Ubuntu and scope the device finding out what it uses then work that back into a FreeBSD solution. Might just require a usbdevs modification/recompile. I would check usbdevs first to see if supported.


----------



## Phishfry (Mar 12, 2016)

I don't see the idVendor or VID in usbdevs
https://github.com/freebsd/freebsd/blob/master/sys/dev/usb/usbdevs


----------



## dmtr (Mar 12, 2016)

Phishfry said:


> I don't see the idVendor or VID in usbdevs
> https://github.com/freebsd/freebsd/blob/master/sys/dev/usb/usbdevs


Yes, of course.
I couldn't find the VID in /usr/src/sys/dev/usb/usbdevs

I find
http://technotation.com/2012/08/15/freebsd-and-mobile-broadband/
I found here the instructions. I want to try.


----------



## dmtr (Mar 12, 2016)

Phishfry said:


> VID=1782 PID=3d00
> Is a SpreadTrum device.


It is not strange, but it's SAMSUNG.
The camera in this phone is absent physically


----------



## Phishfry (Mar 12, 2016)

dmtr said:


> It is not strange, but it's SAMSUNG.


What I am saying is your Samsung phone uses a SpreadTrum USB device to interface with USB clients.
Lookup the VID... It is a SOC with 3G radio and USB interfaces.


----------



## dmtr (Mar 12, 2016)

dmtr said:


> It is not strange, but it's SAMSUNG.
> The camera in this phone is absent physically


I said nonsense.
VID-1782 is a producer named Spreadtrum Communications Inc.
Fined on http://www.linux-usb.org/usb.ids
Clear.
Only in source code of FreeBSD there is no mention of this manufacturer.

`kldload` if_urndis
`kldload` if_cdce
`kldload` if_ipheth

do not give result.

Still not convinced that it can only access the phone memory...


----------



## dmtr (Mar 12, 2016)

And we can find out and poll the device using usbconfig?
With help of `usbconfig` commands.


----------



## Phishfry (Mar 14, 2016)

Did you compile your own kernel with usbdevs of the device? The device is currently unsupported. Nothing to poll.
Not even the Vendor is found. So add both VID and PID recompile your kernel and see what happens. It is quite easy to try. You still don't know which communications protocol to try so save yourself some heartache and try other operating systems to see how it communicates.
Ubuntu Live is your friend.  If it don't work there then you might want to try Windows. You need to find out. It may be a proprietary Windows scheme and unusable.


----------



## dmtr (Mar 16, 2016)

Good day!
I use this instruction
http://technotation.com/2012/08/15/freebsd-and-mobile-broadband/
Building new kernel and use custom umodem.ko, ucom.ko and u3g.ko after edit
/usr/src/sys/dev/usb/usbdevs and /usr/src/sys/dev/usb/serial/u3g.c
*
The result of his research:*
After insert device Samsung GT-E1282T were created device:
/dev/cuaU0.0
/dev/cuaU0.0.init
/dev/cuaU0.0.lock
/dev/cuaU0.1
/dev/cuaU0.1.init
/dev/cuaU0.1.lock

Then, I test connect for AT-command by `cu -l /dev/cuaU0.0`
Result - message "Connected" and .. nothing.
Console is frozen ...
After eject device - unfrozen.

So it's not a modem 

On the manufacturer's website I found the answers for this model.
They said that the USB connector is for charging the battery and transferring files.
And only.

*Conclusion.*
_This model GSM phone cannot be used as USB GSM modem._


----------



## Phishfry (Mar 16, 2016)

Just for completeness did you try `cu -l /dev/cuaU0.1`?
I see two interfaces in your output. To have the terminal lock up on the wrong interface is common. Can't hurt to try.


----------



## tingo (Mar 17, 2016)

Also, handshaking is important. If your device expects software handshaking but you have hardware handshaking configured, the terminal will appear frozen. More info in the stty(1) man page, look for crtscts and -crtscts.


----------

