Thread
:
[Announce] SMScon (control your device with SMS)
View Single Post
NerdKnight
2010-10-26 , 03:37
Posts: 113 | Thanked: 334 times | Joined on Oct 2010 @ Argentina
#
433
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
Quote & Reply
|
NerdKnight
View Public Profile
Send a private message to NerdKnight
Find all posts by NerdKnight