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

Hello,
Find here an updated patch series as discussed with Denis for dialing the last call
dialled support for hfp. The second part adds in a similar way support to dial from
a memory index.
Regards,
Philippe

Patch proposed to solve problem seen by Eswaran Vinothkumar in thread: Ofono 1.21 crashes with Sierra MC7455.
Tested by Jonas Bonn on his setup.
On my side, I did that to solve an Ofono crash seen with this setup:
- huawei E3372 USB key plugged
- MC7304
I stop Ofono, power off and on both modems and restart Ofono immediately. Sometimes I see an Ofono crash.
Here is the result of the debug I made:
When sierra modem reappears, Ofono will ask Modem which service it supports. Usually modem answers quickly.
>From traces, here is what happened:
- Sep 26 14:11:56: modem asks the list of supported services
- Sep 26 14:12:01: no answer after 5s, modem asks the list of supported services again
- Sep 26 14:12:03: modem replies to request sent at Sep 26 14:11:56. Ofono crashes during message treatment
Problem is that when a timeout occurs for this type of request, part of the data is released. When answer arrives, this data is used.
I still have the corresponding trace but I don't think it will be very useful.
Christophe
Christophe Ronco (1):
qmi: remove request when it timeouts
drivers/qmimodem/qmi.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
--
2.7.4

Hello all,
This is my first ofono patch and I have tried to follow the coding guidelines etc.
I did not find support to actually dial the last dialled call that I could use for
HFP with bluetooth. I did find some references but no method to do so. Thus I added
one myself. I took existing code as a guideline to implement this.
This has been tested with several phone models and with the Bluetooth SIG testing tool.
Comments and corrections welcome.
Regards,
Philippe

I make a quick review, use checkpatch and post it.
Thanks for testing and sorry to not always take the time needed to propose a patch to mainline.
Christophe
On 10/26/2017 12:54 PM, Jonas Bonn wrote:
On 10/26/2017 12:43 PM, Christophe Ronco wrote:
Seems to be this:
i) When the modem is first powered on, service discovery takes some time (more than 5 seconds)
ii) The service discovery timeout fires before the QMI request returns so discover_reply gets called before discover_callback and things get cleaned up
iii) Then the QMI request returns and discover_callback gets called even though the request has timed out in ii)
...and this is where things go wrong because the userdata pointer to discover_callback is probably no longer valid.
How do we handle the QMI request returning a _late_ response, i.e. after it technically has timed out? I'll dig a bit more...
/Jonas
Hi Jonas,
When I look at my personal patches, it seems I've already seen that. Please find attached the patch I currently have in my setup on this subject.
Yes, that's exactly what I was just in the process of implementing. Glad you beat me to it. :)
I tested your patch and it solves the problem. Can you submit it to the list? If not, I will... :)
I think service_create_reply() has the same issue but I don't hit it in my setup..
Eswaran: try the patch from Christophe... I'm 99% certain it solves your issue.
/Jonas
Hi,
Sorry, I couldn't able to run GDB on my test bench. Hence, not able to provide the necessary core dumps. I applied the patch you had provided. This fixes the issue during enabling the modem.
The ofono is running fine when I run enable-modem.
But I am seeing some other issues. After starting the system, I am running the scripts when I identify the modem device and ofono service is in active state.
/enable-modem
/online-modem
/list-modems --> here I am checking the ofono sim interface for SIM card status. The ofono is reporting that SIM is not present even though the SIM card is attached to the system
/offline-modem -> the oFono process gets exited.
I have attached the ofono debug messages. I will send the gdb backtrace logs as soon as possible.
Regards,
vinoth

Hello,
For our next connectivity project we are planning to use Connman along with oFono
The version being used are Connman :1.35 and oFono:1.21
After system start up, I am seeing that the oFono process gets exited, whenever I try to enable the modem by calling the python script enable-modem in the test directory. However, if I restart the ofono systemd service, everything works fine.
I have attached the logs for your reference. Please let me know, if any further log messages are required.
Modem chip. MC7455 from sierra
Linux kernel: 4.9.44-fslc+g8f876e1 (freescale)
Mit freundlichen Grüßen / Best regards
Vinothkumar Eswaran