View Single Post
Posts: 55 | Thanked: 5 times | Joined on Sep 2010
#449
Originally Posted by NerdKnight View Post
Hi digitalvoid,
I was reading the source code of smscon_daemon to learn about receiving and sending sms, and I found a possibly bug:
In the function SMSreceive, the index that you use to trim the PDUMessage (19) depends on the length of the sender's number that is before the sms message in the array, I made a test with that function sending an sms to my phone from a web page, and the sender number was shorter so the message was not decoded correctly.
I suggest to calculate the begin index as follow:
Code:
n=int(PDUmessage[1])
n=n//2+n%2+13
MessageArray  = PDUmessage[n:len(arr)]
that worked for me
i guess this is where my problem is coming from.i have set my phone number correctly and yet i dont receive any sms when i test it. please can you look into this and update in the next release? thanks