Hi! > * Pavel Machek <pavel@xxxxxx> [181227 10:17]: > > Ok, I really need SMS messages, too. > > > > Fortunately, they are on /dev/motmdm9, in PDU format. Quite > > logical. And you probably need to acknowledge them, using PDU, > > too... (because otherwise you'll just get the same SMS over and over > > and over). Which is also logical, but hard to do from shell/python. > > Yeah so I found that Ruby pdu_tools module allows decoding PDUs > properly while I did not have much luck with other tools. > > So I wrote a hasty script to read SMS, copy it to a Maildir and > then ack it: > > https://github.com/tmlind/droid4-sms-tools I could not get that one to work. /var/lib/gems/2.3.0/gems/phone-1.2.3/lib/support.rb:47:in `class_eval': /var/lib/gems/2.3.0/gems/phone-1.2.3/lib/support.rb:47: `@@{' is not allowed as a class variable name (SyntaxError) /var/lib/gems/2.3.0/gems/phone-1.2.3/lib/support.rb:47: syntax error, unexpected end-of-input unless defined? @@{:default=>true} ^ from /var/lib/gems/2.3.0/gems/phone-1.2.3/lib/support.rb:47:in `block in cattr_accessor' And I wanted to ask -- did you figure out how to acknowledge the SMSs? +CGNNA does not seem to do the job: 07912470338016... AT+CGNMA=1 +CGNMA:ERROR=9 > > Fortunately ttyUSB4 still works, so I can still use my old code... and > > I started logging motmdm1 and 9 to a file as a backup... that should > > be better than my existing solution. (But I don't get power benefits > > etc.) > > So what are you using to ack the received SMS over ttyUSB4? > > My logs show that Android uses two different commands for ack. > Either AT+GCNMA=1 or AT+CNMA=0,0 gets used depending on something > that I have no idea of.. Maybe the network connected? I believe I tried both... but for some reason I think you need to paste back "acknowledge PDU"...? Best regards, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Attachment:
signature.asc
Description: Digital signature