On Mon, 25 Jun 2012 18:10:36 +0200, Audric Schiltknecht wrote:
I'm having troubles with delivery reports.
When I send a message with the property "UseDeliveryReports" set to
I can get the delivery report from the GSM modem, but ofono is unable
to decode it:
ofonod: SMS: < \r\n+CDS:
ofonod: drivers/atmodem/sms.c:at_cds_notify() Got new
Status-Report PDU via CDS:
ofonod: src/sms.c:ofono_sms_status_notify() len 32 tpdu len 32
ofonod: Unable to decode PDU
The PDU is valid, since I can decode it using some online tool.
It seems that sms_decode does not correctly handle the SMSCC part
and tries to decode it as the sender address, which obviously fails.
Digging a little further in the code, I found that the sms_decode()
function is responsible
of decoding the SMSC part of the PDU. However, this is done if tpdu_len
< len, which is not the case,
since both of them equal to 32.
If I correctly understand, 'tpdu' is returned by the modem in the +CDS
Here, its value is 32, which is correct as shown in the logs.
'len' is calculated in the decode_hex_own_buffer() function called in
the +CDS notification callback.
Here, its value also is 32, and I do not see how it could not be that.
Any help to point out my mistake(s) will be appreciated ;)