Wiki

Clone wiki

ModemManager / AlcatelW800

Posted by: Nate Pleasant nate.pleasant@accelerated.com 2014-07-16

Alcatel OneTouch W800

  • Vid/Pid - 1bbb:0195

This information pertains to connecting an Alcatel OneTouch W800 to a linux-based device. My test enviroment was the following:

  • An embedded linux device running kernel version 2.6.39.4
  • An ASUS EEEPC running Arch Linux with kernel version 3.15.5

The Alcatel uses the RNDIS kernel driver to bring up a ethx port. This is the interface you use to connect to the device's web GUI. You need to establish a DHCP network connection to the ethx interface in order to interact with the modem's HTTP interface.

Once a local connection to the modem is established, we can start sending HTTP requests to it. Below are details on how to send a request and what information is contained in each response.

I obtained these HTTP requests by interacting with the HTTP GUI of the modem with a Wireshark trace running in the background.

Send a post message to the modem to interact with it:

  wget -T 30 -q $gateway_ip -O /tmp/post_response.txt

$gateway_ip is the gateway IP address assigned by the DHCP routers option from the modem. In the below examples, the IP address 192.168.0.1 is used as the gateway IP.

The resulting /tmp/post_response.txt file will contain the response message (if any).

##Important Note

The W800 modem will logout the user after only a few minutes of inactivity, so make sure you are logged in before posting other commands to the modem.

Also, I have not found a way to obtain the following attributes from the W800. They are not listed anywhere in the device's web UI:

  • Signal Strength
  • phone number
  • ICCID
  • IMSI

http://192.168.0.1/goform/getImgInfo

{"chg_state":89376,"bat_level":690240,"signal":2,"sms":0,"sms_new_count":0,"sim_state":5,"pin_state":1,"error":0}

http://192.168.0.1/goform/getWanInfo

This includes information such as connection status, signal strength, IPv4 network information, IPv6 information, and activation status.

{"wan_state":0,"upload":50000000,"download":100000000,"dur_time":40,"wan_ip":"0.0.0.0","network_type":11,"network_name":"T-Mobile","roam":1,
"show_tag":1,"usage":0,"wan_ip6":"0::0","ul_speed":0,"dl_speed":0,"error":0}

http://192.168.0.1/goform/getLoginState

This displays the login status of the modem. If the user is logged out, the status will be 0. If the user is already logged in, then the status will be 5.

{"loginStatus":0,"error":0}

http://192.168.0.1/goform/getSimcardInfo

This displays details on the SIM card connected to the modem. sim_state=5 indicates that the SIM is registered. sim_state=0 indicates that the device has not registered yet.

{"sim_state":5,"pin_state":1,"pin_puk_times":3,"sim_lock_state":0,"sim_lock_remain_time":0,"error":0}

http://192.168.0.1/goform/getProfileList

This displays the connection profiles that are provisioned on the modem. These can be used to setup a specific APN or dialstring. Note that the profile name and dial number are required fields. Also, setting profile_default to 1 indicates that the specific profile is the default profile that will be used to connect to the network unless otherwise specified.

"data":[{"profile_type":0,"profile_id":16,"profile_name":"T-Mobile US","profile_username":"","profile_number":"*99#","profile_password":"","profile_apn":"fast.t-mobile.com","profile_protocol":0,"profile_defualt":1,"profile_ip":""}],"data_len":1,"error":0}

http://192.168.0.1/goform/getWlanInfo

The W800 modem has the capability of serving a WiFi SSID that up to 10 devices can connect to.

{"wifi_state":1,"wmode":2,"ssid":"W800O_A4B8","hidden_ssid":0,"channel":0,"max_numsta":10,"curr_num":0,"security_mode":3,"wep_sec":2,"wep_key":"1234567890","wpa_sec":2,"wpa_passphrase":"20209677","wifi_country_code":"CN","ap_status":1,"error":0}

http://192.168.0.1/goform/getUseHistory

Displays the network usage details.

{"last_duration":275,"last_upload":0,"last_download":0,   "last_usage":0,"total_duration":4354,"total_upload":585451,"total_download":10748331,"total_usage":11333782,"clear_time":"","upload_rate":0,"download_rate":0,"error":0}

http://192.168.0.1/goform/getNetworkInfo

Displays the network settings of the device. nw_mode specifies if the W800 should automatically connect on the highest network, or if it should connect to a certain newtork type. See below for details on forcing the W800 to a specific network mode.

{"error":0,"nw_mode":28,"nw_sel_mode":0}

http://192.168.0.1/goform/getWanConnectMode

{"wan_conn_mode":0,"roam_auto_conn":0,"wan_ip_mode":0,"error":0}

http://192.168.0.1/goform/getSysteminfo

{"soft_ver":"KX1415E8XX","hard_ver":"K.2.B","webui_ver":"KXD40YE860","dev_name":"W800","dev_imei":"860115020209677","dev_mac":"24:0a:11:0c:a4:b8","dev_msisdn":"","error":0}

http://192.168.0.1/goform/getRouterInfo

{"a5_ip_addr":"192.168.1.1","sub_net_mask":"255.255.255.0","host_name":"w800.home", "enable_dhcp":1,"dhcp_start_addr":"192.168.1.100","dhcp_end_addr":"192.168.1.200","dhcp_release_time":"12h","error":0}

login

Note: make sure to URL encode the post, or the password will get cut off. Below, I am using the default username and password for the modem.

#!html

http://192.168.0.1/goform/setLogin?username=admin&password=admin

logout

#!html
http://192.168.0.1/goform/setLogout

connect

The following uses the default profile ID of the modem. The modem can store 15 additional connection profiles, which are useful if you want to set mutliple APN profiles.

#!html
http://192.168.0.1/goform/setWanConnect?profile_id=16
You can then post http://192.168.0.1/goform/getWanInfo to check the status of the connection. wan_state of 2 indicates that the device is connected to the network. 0 indicates that the modem is disconnected.

disconnect

#!html
http://192.168.0.1/goform/setWanDisconnect

turn on Wifi SSID

#!html
http://192.168.0.1/goform/setWifiSwitch?wifi_state=1

turn off Wifi SSID

http://192.168.0.1/goform/setWifiSwitch?wifi_state=0

check network registration

The regist_state value in the output details whether the modem is registered on the network (1 for registered, 0 for not registered).

http://192.168.0.1/goform/getNetworkRegisterResult

Restore Factory Default Settings

If this command is issued, the W800 will reboot to apply factory default settings, causing the web interface to go down for a few seconds.

#!html
http://192.168.0.1/goform/setReset

Auto-connect

If auto-connect is enabled, the W800 will automatically connect to the cellular network with whatever settings were previously configured into the device. This was the default behavior of my W800 device when I first tested it. The following example enables standard auto-connect and disables roaming auto-connect

#!html
http://192.168.0.1/goform/setWanConnectMode?wan_conn_mode=1&roam_auto_conn=0

The following example post disables standard auto-connect and enables roaming auto-connect

#!html
http://192.168.0.1/goform/setWanConnectMode?wan_conn_mode=0&roam_auto_conn=1

Roaming

enable

#!html
http://192.168.0.1/goform/setRoamingSettings?roam_set=1

disable

#!html
http://192.168.0.1/goform/setRoamingSettings?roam_set=0

CNTI switching

Auto mode

#!html
http://192.168.0.1/goform/setNetworkInfo?nw_mode=28&nw_sel_mode=0

4G mode

#!html
http://192.168.0.1/goform/setNetworkInfo?nw_mode=16&nw_sel_mode=0

3G mode

#!html
http://192.168.0.1/goform/setNetworkInfo?nw_mode=8&nw_sel_mode=0

2G mode

#!html
http://192.168.0.1/goform/setNetworkInfo?nw_mode=4&nw_sel_mode=0

Configuring an Network Profile

The W800 has a form that can be filled out to create a new network profile, which in turn can be used to set a new default APN on the device.

Create new APN

The example below sets a profile named "new_default_apn" with an APN of "epc.tmobile.com", a test username and password, and the standard dial string "*99#".

#!html
http://192.168.0.1/goform/setProfileSave?key=new&profile_protocol=0&profile_apn=epc.tmobile.com&profile_password=test_pwd&profile_username=test_user&profile_name=new_default_apn&profile_number=*99%23

Set new APN as default profile

#!html
http://192.168.0.1/goform/setProfileDefault?profile_id=1

You can then post http://192.168.0.1/goform/getCurrentProfile to verify that the correct profile ID is being used.

Delete a profile

This deletes profile ID 1

#!html
http://192.168.0.1/goform/setProfileDelete?profile_id=1

SMS

check SMS

#!html
http://192.168.0.1/goform/getSMSPageInfo?key=inbox
{"total_page_count":1,"curr_sms_count":1,"error":0}

load all SMS messages

#!html
http://192.168.0.1/goform/getSMSlist?key=inbox
{"data":[{"sms_id":0,"sms_tag":1,"sms_number":"+17272785016","sms_time":1089569132,"sms_time_zone":-16,"sms_content":"Robots!"},{"error":0,"sms_count":1,"oper":"inbox"}]}

load single SMS message

#!html
http://192.168.0.1/goform/getSingleSMS?sms_id=1
{"sms_id":1,"sms_tag":1,"sms_number":"+17272785016","sms_time":1089569132,"sms_time_zone":-16,"sms_content":"Robots!","error":0}

delete singal SMS message

#!html
http://192.168.0.1/goform/deleteSMS?sms_id=1

Updated