Author |
Post |
|
#1 Mon Jun 20, 2016 18:44, 104 months ago.
|
Member
Registered: Jun 2016
Location: Cologne, Germany
|
Operating system name and version: Raspbian v8 (jessie) Version of smsd: 3.1.15 Smsd installed from: http://smstools3.kekekasvi.com/packages/smstools3-3.1.15.tar.gz Name and model of a modem / phone: - Interface: -
Hello everyone,
I'm trying to set up some simple SMS-interaction on a Raspberry Pi for a school project. Since the USB-stick my teacher gave me is broken (I tested it on multiple devices and it really is broken), I'd like to know if there is any way to simulate incoming SMS. I thought about just creating a file similar to the ones I can find in /var/spool/sms/outgoing and copying that file to /var/spool/sms/incoming to trigger the eventhandler, but for whatever reason that doesn't work. Is there any way to use smstools in that way, or do I absolutely need a functioning modem for it to work?
Flo
|
|
#2 Mon Jun 20, 2016 19:03, 104 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
There are two modem settings for you: modem_disabled = yes With this setting no actual modem is required. pdu_from_file = filename With this setting smsd simulates incoming SMS, but it must be in PDU format. See the manual for more details. There is sample PDU which can be used for testing.
|
|
#3 Mon Jun 20, 2016 19:54, 104 months ago.
|
Member
Registered: Jun 2016
Location: Cologne, Germany
Topic owner
|
Thanks for the reply! Is there any way to create these PDUs on the device? I found the converter here ( http://smstools3.kekekasvi.com/topic.php?id=288 ) but it would be great, if I could create these files directly on the device
|
|
#4 Mon Jun 20, 2016 20:46, 104 months ago.
|
Administrator
Registered: May 2009
Location: Jyväskylä, Finland
|
As soon as you have a working device which can receive messages, you can use a global setting store_received_pdu = 3. Currently there is no other way to create PDU's "on the device". While developing and testing eventhandler, you could use the sample PDU which triggers "receiving", and then in your eventhandler just change the content of FROM and TEXT variables.
|
|
#5 Mon Jun 20, 2016 21:13, 104 months ago.
|
Member
Registered: Jun 2016
Location: Cologne, Germany
Topic owner
|
Alright, so it looks like I will have to start working on the interactions that are supposed to happen after the eventhandler triggered and tell my teacher that receiving an SMS doesn't work for now.
Anyways, thank you for your help and for the fast replies!
|