Keywords: Mode: All keywords (AND) |
Sun Apr 16, 2023 12:18
|
sandman: After a ltittle googling on the forum I think I found this temporary fix. I made the changes and can now compile on Ubuntu.
Thanks for using this software.
This is a "ftbfs with GCC-10" issue, which is going to be fixed in the near future. The next version of smstools3 has been ready for a while, but it was not released. Because this issue affects to many new distributions on testing, I will release the next version with this ftbfs fixed, and also with lots of new features. This likely will happen during the some next weeks.
While waiting for the next version, you should just disable the warnings. In the src/Makefile, change the line:
CFLAGS += -W -Wall
to
CFLAGS += -fcommon
Hope this helps. At least on Debian 5.7.10-1 (2020-07-26) with GCC 10.1.0-6 the smsd got compiled with the changed flags.
|
Sun Apr 16, 2023 11:58
|
sandman: 5.19.0-38-generic UBUNTI:
Latest Version/b]:
Smsd installed from: sources
Name and model of a modem / phone:
Interface: serial / USB / some adapter...
Unable to compile on latest linux kernel. This was on UBUNTU, I get the EXACT same compile error on a RaspberryPI.
/usr/bin/ld: charshift.o:(.bss+0x34fec0): multiple definition of `communicate_a_keys'; /tmp/ccXtDX9X.o:(.bss+0x34dea0): first defined here
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:63: smsd] Error 1
make[1]: Leaving directory '/home/pete/Downloads/smstools3/src'
make: *** [Makefile:10: compile] Error 2
Can someone try and compile from source and see if it works.....
Thankyou..Peter
|
Wed Jan 24, 2018 05:50
|
sandman: Sadly the level of support is very thin but it does make you investigate more yourself.
I've changed the memory_check_method=2 , the modem reports 4 slots and hence it only checks 4 now.
Much better
|
Mon Jan 22, 2018 04:46
|
sandman: Description: Remote relay control
Usage: Not-for-profit HF Radio Club in Australia.
Volume of 160-character SMs per day: 5
Runs on a raspberryPI in very remote locations. The 4 relay outputs are used to power cycle electronic equipment , one in particular is a 3g Netcom modem that fails to reconnect to 3g at times.
The Raspberry has Ping-timeout, relay control, 1-wire temperature sensing, snmpwalk running and any alarms it detects it either sends as an e-mail or SMS. I mask sending out SMS messages with the presence of a file, if the file is present we SMS, if its not present we e-mail replys.
I have also coded up some python to act as an event handler for incoming GPIO pin status change to act as a "pseudo" alarm system you can activate via SMS. If someone opens the cabinet while the system is armed, we send out SMS notification.
This configuration is VERY reliable :-)
Peter
|
Mon Jan 22, 2018 04:35
|
sandman: Operating system name and version: Debian
Version of smsd: Latest
Smsd installed from: source
Name and model of a modem / phone: Telstra 4G
Interface: USB
My modem is reporting available number of memory locations fine and polling them sequentially
-> AT+CPMS?
2018-01-22 14:00:51,7, GSM1: Command is sent, waiting for the answer. (5)
2018-01-22 14:00:51,7, GSM1: <- +CPMS: "SM",1,30,"SM",1,30,"SM",1,30 OK
2018-01-22 14:00:51,6, GSM1: Used memory is 1 of 30
It then sequentially looks for messages. Is there a configuration entry that I can limit the checking to the first 5 memory slots on the SIM card ?
Thankyou..Peter
|
Sun Aug 20, 2017 07:53
|
sandman: Hi there
I got rid of the sim800 arduino gsm boards and bought a 3g modem from aliexpress. This works fine.
What modem are you using ?
|
Mon Apr 13, 2015 10:10
|
sandman: Here is a rough guide to getting your serial modem to work with a Raspberry PI.
Installation: RaspberryPI+
Operating system: Wheezy
Serial to USB device: Keyspan
Modem: Wavecom 203A
I want to be able to remotely reboot my ADSL modem and router while I am away from the house. At times the modem will attempt sync and if it takes too long it will stop trying. The router is DDWRT and I expect it to be solid however after an extended outage it fails to log in.
Solution: Control 2 relays from the GPIO ports that can power the modem and router. Th relays are N/C (not energised) and I turn them on for 5 seconds to drop the power and allow them to restart.
Operating system: Raspbian Wheezy and install smstools (apt-get install smstools)
USB driver: http://www.chrisdanielson.com/2012/04/10/linux-firmware-keyspan-usb-to-serial/ Follow the instructions, it works perfectly !
The device should be /dev/ttyUSB0
You can test the connectivity to the modem with "minicom"...the baudrate may be 9600, 19200 or higher, trial and error.
quick test " +++ ath0" and you should get OK back.
GPIO software: http://wiringpi.com/download-and-install/ Follow the instructions, it works.....
GPIO Pin Mapping: http://wiringpi.com/pins/ I am usuing GPIO1 (Pin12) and GPIO4(Pin16)
Eventhandler: I pass my script the filename of the incoming message
--------------------------------------------------------------------------------
#!/bin/sh
# This is an example how to use an eventhandler with smsd.
echo smsd reports an event:
echo type: $1
echo file: $2
echo id: $3
if [ $1 = RECEIVED ]; then
/var/spool/sms/incoming/test.sh $2
fi;
---------------------------------------------------------------------------------
You will need to make 1 change to smsd.conf as it wont start if using a script that relys on variables:
executable_check = no
----------------------------------------------------------------------------------
Here is my eventhandler script, very simple but it should give you an idea how ti works
------------------------------------------------------------------------------------
#|/bin/sh
# Define allowed numbers
pete_number=61409839xxx
carol_number=61403193xxx
#How long is the message received
message_length=`cat $1 | grep Length: | cut -d ":" -f2 | sed 's/^ *//g'`
# Who sent us the text, this is used to validate the allowed callers
from_number=`cat $1 | grep From: | cut -d ":" -f2 | sed 's/^ *//g'`
# Lets get the message
string=`cat $1 | tail -c $message_length`
# If the from_number doesnt match the 2 defined numbers, delete the GSM call file and exit
if [ "$pete_number" != $from_number ] && [ "$carol_number" != $from_number ];then
/bin/rm $1
exit 0
fi
# If the word "Modem" is received, turn on GPIO1 for 5 seconds and then turn off
if [ "$string" = "Modem" ]; then
/usr/local/bin/gpio mode 1 out
/usr/local/bin/gpio write 1 1
sleep 5
/usr/local/bin/gpio write 1 0
# Use the default SMSTOOLS "sendsms" script to send a reply
/var/spool/sms/incoming/sendsms $from_number "the modem has rebooted"
fi
# If the word "Router" is received, turn on GPIO4 for 5 seconds and then turn off
if [ "$string" = "Router" ]; then
/usr/local/bin/gpio mode 4 out
/usr/local/bin/gpio write 4 1
sleep 5
/usr/local/bin/gpio write 4 0
# Use the default SMSTOOLS "sendsms" script to send a reply
/var/spool/sms/incoming/sendsms $from_number "the router has rebooted"
fi
# Remove the GSM call file
/bin/rm $1
-----------------------------------------------------------------------
This is just some testing and the script shouldn't sit in the incoming directory but I'm still experimenting.
Good luck..Pete
|