AT&T Starter Kit (2nd GEN)

Solved
chucklink's picture
chucklink
Junior(4)

First I will compliment the Avnet Team on the fantastic developer kit at a great price.  Great Job!  I work with a number of different kits including the Mangoh Red from Sierra.  Each has its advantages and also its challenges.

Next I wanted help the adopters of this kit on how to get things going without beating your head against the wall like our team did.  WATCH ALL THE VIDEOS

FIRST - Follow the Quick Start Card Step 1 - CREATE THE ACCOUNT and get the SIM activated.  DO NOT PUT an inactive SIM in the KIT.  It is important that you follow this step.

Next, the videos work as described if you do step 1 above with an activated SIM.  However, the videos don't really do much to get you going.  For those who don't know how do do anything with JSON, the following will help:

link@Dell-E5270-Linux14:~$ adb shell
/ # JsonClient /tmp/cgi-2-sys get_system_firmware_version
send:
{ "action": "get_system_firmware_version" }
read:
{ "get_system_firmware_version": { "errno": 0, "errmsg": "", "version": "M18Q2_v12.09.170553" } }

/ #

Now to establish a connection, do this:

/ # JsonClient /tmp/cgi-2-sys set_wwan_modify_apn '{"index" : 0, "apn": "m2m.com
.attz"}'
send:
{ "action": "set_wwan_modify_apn", "args": { "index": 0, "apn": "m2m.com.attz" } }
read:
{ "set_wwan_modify_apn": { "errno": 0, "errmsg": "" } }

/ # JsonClient /tmp/cgi-2-sys set_wwan_reattach
send:
{ "action": "set_wwan_reattach" }
read:
{ "set_wwan_reattach": { "errno": 0, "errmsg": "" } }

/ # JsonClient /tmp/cgi-2-sys set_network_connection_mode '{"mode":2, "manual_mo
de":2}'
send:
{ "action": "set_network_connection_mode", "args": { "mode": 2, "manual_mode": 2 } }
read:
{ "set_network_connection_mode": { "errno": 0, "errmsg": "" } }

/ # route add default dev rmnet_data1

That is it.  You will have a connection.

/ # ifconfig
br0 Link encap:Ethernet HWaddr 00:0A:E4:99:0A:DD
inet addr:192.168.8.1 Bcast:192.168.8.255 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 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:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1%3069253328/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:10 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:700 (700.0 B) TX bytes:700 (700.0 B)

rmnet0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
UP RUNNING MTU:2000 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:32 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:624 (624.0 B) TX bytes:3120 (3.0 KiB)

rmnet_data0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet6 addr: fe80::25b1:9912:cb93:2bf%3069253328/64 Scope:Link
UP RUNNING MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:1228 (1.1 KiB)

rmnet_data1 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.55.170.218 Mask:255.255.255.252
inet6 addr: fe80::8210:6fc2:5877:c7d1%3069253328/64 Scope:Link
UP RUNNING MTU:1500 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:17 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:612 (612.0 B) TX bytes:1892 (1.8 KiB)

/ # route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default * 0.0.0.0 U 0 0 0 rmnet_data1
10.55.170.216 * 255.255.255.252 U 0 0 0 rmnet_data1
192.168.8.0 * 255.255.255.0 U 0 0 0 br0

/ # ping yahoo.com
PING yahoo.com (206.190.39.42): 56 data bytes
64 bytes from 206.190.39.42: seq=0 ttl=49 time=205.200 ms
64 bytes from 206.190.39.42: seq=1 ttl=49 time=143.530 ms
64 bytes from 206.190.39.42: seq=2 ttl=49 time=185.459 ms

We've done some other pretty slick things.  We got rid of the challenging "malmanager" and "mald" functions and built our own "QMI" abstraction "C" API.  We've got MQTT and TLS running with complete connectivity to AWS, among other things.  From a functionality perspective, there are two scripts that are executed on startup that are not documented. (custapp-postinit.sh is highlighted in the video)  Look at "/etc/rc5.d/S25host-mode-preinit.sh" and "/etc/rc5.d/S100host-mode-postinit.sh".  These point to a script in /CUSTAPP called custapp-preinit.sh and custapp-postinit.sh.  My board did not have a custapp-preinit.sh so I created it.  From there you can kill malmanager to do your own thing.  The custapp-postinit.sh allows you to execute your own code.

Once you have set up the board, to connect:

/ # JsonClient /tmp/cgi-2-sys set_wwan_ps_attach

Once you have set up the board, to disconnect:

/ # JsonClient /tmp/cgi-2-sys set_wwan_ps_detach

Hope this helps get you started.

Chuck  

jflynn129's picture
jflynn129
Moderator(2)

Thanks for the comments Chuck!

amitbhatia76's picture
amitbhatia76
Junior(0)

Thanks. This help in getting started and camping to the network. 

Still need to see how to check the reading on the net.