sony-vaio-z-series team mailing list archive
-
sony-vaio-z-series team
-
Mailing list archive
-
Message #02489
Re: Gobi3000 and firmwares
The only way to make it work with NetworkManager at the moment is to use qcserial driver instead of GobiSerial. Before you can do that, you need to modify the qcserial source to include the hardware IDs of the gobi device so the driver would detect the device and provide the serial interfaces. You can find details on one way to do that here: http://westhoffswelt.de/blog/0045_howto_setup_sony_vaio_x_wwan_gobi_2000_under_ubuntu_linux.html (just the qcserial part).
Once you have that running you need to make sure you have modemmanager 0.5 (I have 0.5-1 on Debian) or later installed because there is a fix in there that would allow NetworkManager to correctly detect the Huawei Gobi 3000 device our laptops have.
After all that Network Manager should detect and show the ttyUSB device for your modem and you can easily connect.
For all of the above you do not need GobiNet.
When using GobiNet you don't need qcserial or GobiSerial but it's very tricky at the moment to setup the connection - you need to use the GobiAPI. So you need to compile the GobiAPI part of which is the GobiConnectionMgmt.so library. This might actually need few changes since the API is very badly written and it has hardcoded hardware IDs in it. Take a look at the CodeAurora Forum for some details, there are few threads that have the necessary changes - https://www.codeaurora.org/forums/viewforum.php?f=15.
After you have the API compiled you can write your own c++ app to use it or be lazy like me and use python.
Here is an example script that would look for available devices and give you the MEID you need in the QCWWANConnect method in order to connect to the device. You must also put in the correct APN, user and passwrod in the SetDefaultProfile method - the ones in the script work for me for AT&T in the US. Also make sure you run the script from the same directory where you have the GobiConnectionMgmt.so file or you'll have to point to it in your script. If the below script executes correctly your wwan card will connect to the network every time you turn it on and the usb0 device will come online and network manager will handle the rest just like any wired connection.
from ctypes import *
import time
gobi = CDLL("./GobiConnectionMgmt.so")
class device(Structure):
_fields_ = [("id", c_char * 256),("key", c_char * 16)]
size = c_byte(1)
list = (device * 1)()
exit = gobi.QCWWANEnumerateDevices(byref(size), byref(list))
print 'Enumerate exit code:' + str(exit)
print 'device: ' + list[0].id + ' MEID: ' + list[0].key
a = create_string_buffer("qcqmi0")
b = create_string_buffer("<your MEID here>")
exit = gobi.QCWWANConnect(byref(a), byref(b))
print 'Connect exit code: ' + str(exit)
pAPNName = create_string_buffer('broadband')
username = create_string_buffer('')
password = create_string_buffer('')
profileType = c_ulong(0)
exit = gobi.SetDefaultProfile(profileType, None, None, None, None, None, None, pAPNName, username, password)
print 'SetDefaultProfile exit code:' + str(exit)
autoConnect = c_ulong(1)
roamSetting = c_ulong(1)
exit = gobi.SetEnhancedAutoconnect(autoConnect, byref(roamSetting))
print 'SetEnhancedAutoconnect exit code:' + str(exit)
exit = gobi.QCWWANDisconnect()
print 'Disconnect exit code:' + str(exit)
>________________________________
> Could you expand upon how you got it to work with NetworkManager? Mine
>just finds it as an ethernet device with "cable unplugged" as status.
>
>
Follow ups
References