Difference between revisions of "Draft:SIM5320 notes"

From ZeroPhone
Jump to: navigation, search
(Created page with "==Ofono and SIM5320 (by David Ashley), part 1== [https://lists.ofono.org/pipermail/ofono/2016-March/016120.html original message] Hello, I'm at my wits' end trying to get of...")
 
(No difference)

Latest revision as of 02:08, 27 December 2017

Ofono and SIM5320 (by David Ashley), part 1

original message

Hello, I'm at my wits' end trying to get ofono working with the
sim5320 module. I'm using the plugins/sim900.c module as a starting
point. I think the issue has something to do with the difference
between the MUX functionality between the 900 and the 5320. The sim900
supports the elaborate parameters sent on the
AT+CMUX=0,x,x,x,x, etc.
but the SIM5320 only supports
AT+CMUX=0

There's that... but also the way the sim900 plugin creates a
SETUP_DLC, initiates muxing, then deletes the setup DLC and creates 4
new DLC's... it didn't work for the sim5320 until I remapped the DLC's
somewhat like this:

#define NUM_DLC 4
#define VOICE_DLC   2
#define NETREG_DLC  1
//#define SMS_DLC     2
#define GPRS_DLC    3
#define SETUP_DLC   0
static char *dlc_prefixes[NUM_DLC] = {
 [VOICE_DLC]="Voice: ",
 [NETREG_DLC]="Net: ",
// [SMS_DLC]= "SMS: ",
 [GPRS_DLC]= "GPRS: " ,
 [SETUP_DLC]= "Setup: ",
};

Note I have to eliminate the SMS_DLC usage later in sim5320_post_sim:
//	ofono_sms_create(modem, OFONO_VENDOR_SIMCOM, "atmodem",
//						data->dlcs[SMS_DLC]);


OK everything is *ALMOST* working. ofonod interacts fine with
connmand, connmand tells ofonod to activate the sim5320, which
actually establishes a ppp connection and sets up a ppp device:
ppp0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-0
          inet addr:30.97.132.47  P-t-P:30.97.132.47  Mask:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:0 (0.0 B)  TX bytes:124 (124.0 B)


Here's the rub: No matter what I do, I never get any RX packets from
that ppp device, and even when it appears to TX packets (I'm trying to
ping out) the machine on the internet isn't actually receiving them.

I'm running on a beaglebone with a custom board with a sim5320 module on it.

I have no idea what to try...  Any advice would be appreciated...
Thanks very much!!!!
-Dave

Ofono and SIM5320 (by David Ashley), part 2

original message

Well this project seems to be dead. Anyway for what it's worth, the
problem turned out to be some difference between the AT+CMUX behavior
betwene the sim900 and the sim5320 module. When I tore out all the MUX
related code the 3G / internet / ppp aspects all just start working.

-Dave

Ofono and SIM5320 (by David Ashley), part 3

original message

Just for closure since this thread appears high up in google search
for "sim5320 cmux problem"...

I got the cmux functionality of the SIM5320 module working reliably,
outside ofonod, but the answer would apply there (and elsewhere). The
key is to set the cmux line discipline mtu to 120 bytes (or possibly
as high as 127 bytes). When the cmux is activated and pppd is spawned
on one of the virtual serial ports, certain network packets want to
send a big chunk of data into the TX pipleline, and the SIM5320 cmux
support can't handle it. The sim5320 never sends more than 120 bytes
at a time to the virtual serial ports, so that was a clue right
there...

mtu 120 works, up to 126 works. I didn't try 127, but mtu set to 128
and higher fails.

-Dave