Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many error report #467

Open
hubigin opened this issue Apr 17, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@hubigin
Copy link

commented Apr 17, 2019

727/5000
Hello, and thank you for developing this solution. 馃挴
I use gammu for 4 months now. I use a raspberry pi and a 3G key. And I have many problems that appear in my log. Sometimes gammu can not get started in a day. For parr茅 any problem I use many script. A cron for reboot every day and launch my gammu demo script. And a cron to restart gammu every hour.
What does my scrpit do:

  • I display the date
  • I stop the gammu demon
  • I use hub-ctrl to stop and restart the power on the key-3G
  • I enter the PIN code
  • To finish I restart the gammu demon

I use a rule to map my USB-3G key on ttyUSB-3G

CURRENT PROBLEM out of connection problem to the database in my file gammu.log and cron.log are the following ones:

  • jeudi 11 avril 2019, 07:00:01 (UTC+0200)
    Stopping gammu-smsd (via systemctl): gammu-smsd.service.
    Erreur de s茅curit茅 : le code PIN est-il correct ?
    脡tat de la s茅curit茅 : Rien 脿 faire entrer.
    Starting gammu-smsd (via systemctl): gammu-smsd.service.

  • vendredi 12 avril 2019, 00:00:01 (UTC+0200)
    Stopping gammu-smsd (via systemctl): gammu-smsd.service.
    Aucune r茅ponse dans le temps d'attente sp茅cifi茅: Le t茅l茅phone n'est peut-锚tre pas connect茅.
    Starting gammu-smsd (via systemctl): gammu-smsd.service.

  • Erreur 脿 l'ouverture du p茅riph茅rique: il n'existe pas.


crontab :
@reboot /home/pi/projetGammu/configGammu.sh >> /var/log/cron.log
0 */1 * * * /home/pi/projetGammu/configGammu.sh >> /var/log/cron.log


configGammu.sh :
#!/bin/sh
date

    /etc/init.d/gammu-smsd stop
    while  gammu identify | grep -m1 'Erreur' || gammu identify | grep -m1 'inconnu';do
            /home/pi/projetGammu/hub-ctrl -h 0 -P 5 -p 0
            sleep 1
            /home/pi/projetGammu/hub-ctrl -h 0 -P 5 -p 1
            sleep 1
            echo "restart USB"
            gammu entersecuritycode PIN 1234
    done
    gammu entersecuritycode PIN 1234
    sleep 4
    /etc/init.d/gammu-smsd start

exit 0


For mapping port of my USB-3G
10-usb.rules :
SUBSYSTEM=="tty", ATTRS{idVendor}=="12d1", ATTRS{idProduct}=="14d2", SYMLINK+="ttyUSB-3G"


gammurc :
port = /dev/ttyUSB-3G
model =
connection = at19200
synchronizetime = yes
logfile = /var/log/gammu.log
logformat = textall
use_locking = yes
gammuloc =


gammu-smsd :

Configuration file for Gammu SMS Daemon

Gammu library configuration, see gammurc(5)

[gammu]
port = /dev/ttyUSB-3G
connection = at
gammucoding = utf8
PIN = ####

SMSD configuration, see gammu-smsdrc(5)

[smsd]
PhoneID = +33########
Description = MySQL
Service = sql
PIN = ####
RunOnReceive = /home/pi/projetGammu/onReceive.sh
Driver = native_mysql
host = ###.###.###.###
User = gammusmsd_sql
Password = ################################
DataBase = smsd
logfile = /var/log/gammu.log
debuglevel = 0

[smsdsuse]
Driver = MySQL
DATABASE = smsd
SERVER = ###.###.###.###


Thank you very much for taking a look at my request 馃憤


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.