Dla: system("echo $sms_data" | "/usr/bin/gnokii --sendsms $row->{'phone'}");
Pojawia sie informacja
1295 (-1210.00) KOWALSKI Jan Sending sms to 48600123123
i nic dalej sie nie dzieje.
Jesli zmienie $sms_data na np test, tzn. system("echo test" | "/usr/bin/gnokii --sendsms $row->{'phone'}");
wszystko jest O.K. tzn.
# ./lms-notify-sms perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = (unset), LANG = "pl_PL" are supported and installed on your system. perl: warning: Falling back to the standard locale ("C"). lms-notify-sms, version 1.10.4 Pyrus (C) Copyright 2001-2008 LMS Developers Using file /etc/lms/lms.ini as config. 1295 (-1210.00) KOWALSKI Jan Sending sms to 48600123123 22 GNOKII Version 0.6.26 Couldn't read /root/.gnokiirc config file. Couldn't read /root/.gnokiirc config file. LOG: debug mask is 0x1 LOG: rlpdebug mask is 0x1 Config read from file /etc/gnokiirc. Lockfile /var/lock/LCK..ttyS0 is stale. Overriding it.. phone instance config: model = 6210 port = /dev/ttyS0 connection = serial initlength = default serial_baudrate = 19200 serial_write_usleep = -1 handshake = software require_dcd = 0 smsc_timeout = 10 rfcomm_channel = 1 sm_retry = 0 Connecting Serial device: opening device /dev/ttyS0 Serial device: setting speed to 115200 Serial device: setting RTS to low and DTR to low Getting model... Message sent: 0x1b / 0x0006 00 01 00 03 01 32 | 2 SM_Block: exiting the retry loop Message sent: 0x1b / 0x0006 00 01 00 03 01 32 | 2 SM_Block: exiting the retry loop Message sent: 0x1b / 0x0006 00 01 00 03 01 32 | 2 SM_Block: exiting the retry loop Serial device: closing device Serial device: opening device /dev/ttyS0 Serial device: setting speed to 115200 Serial device: setting RTS to low and DTR to high Getting model... Message sent: 0x1b / 0x0006 00 01 00 03 01 32 | 2 [Received Ack of type 1b, seq: 0] [Sending Ack of type 1b, seq: 6] Message received: 0x1b / 0x0037 01 1c 00 04 00 56 20 30 35 2e 31 37 0a 30 31 2d | V 05.17 01- 30 36 2d 30 31 0a 4e 50 45 2d 33 0a 28 63 29 20 | 06-01 NPE-3 (c) 4e 4d 50 2e 00 ff ff ff ff ff ff ff ff ff ff ff | NMP. ff ff ff ff ff ff ff | Received message type 1b Received model NPE-3 Message sent: 0x40 / 0x0004 00 01 64 01 | d [Received Ack of type 40, seq: 1] [Sending Ack of type 40, seq: 7] Message received: 0x40 / 0x000c 01 01 64 02 01 4c 0d 01 01 01 1b 58 | d L X Received message type 40 Unknown security command Message: Extended commands enabled. Message sent: 0x02 / 0x0006 00 01 00 33 64 01 | 3d [Received Ack of type 02, seq: 2] [Sending Ack of type 02, seq: 0] Message received: 0x02 / 0x0022 01 24 00 34 01 fd 00 00 00 00 00 00 00 00 00 00 | $ 4 00 00 00 00 00 07 91 84 06 01 00 13 f0 00 00 00 | 00 00 | Received message type 02 SMSC Received 1 General Data Coding dcs: 0x0 Length: 0x3 user_data_length: 0x3 ValidityIndicator: 2 user_data: 31D90C Sending Message sent: 0x02 / 0x002d 00 01 00 01 02 00 07 91 84 06 01 00 13 f0 00 00 | 00 00 11 00 00 00 03 0b 81 84 06 51 83 18 f2 00 | Q 00 00 00 a9 00 00 00 00 00 00 31 d9 0c | 1 [Received Ack of type 02, seq: 3] [Sending Ack of type 02, seq: 1] Message received: 0x02 / 0x0007 01 24 00 02 65 07 00 | $ e Received message type 02 SMS sent Send succeeded! Serial device: closing device
W czym może być problem ?
!DSPAM:485ac72d22381804284693!
Witam
W liście z dnia 19 czerwca 2008 (22:52:57) można przeczytać:
W czym może być problem ?
W tym, że | jest interpretowane przez perla? Może tak:
system("echo test|/usr/bin/gnokii --sendsms $row->{'phone'}");
uczestnicy (2)
-
Krzysztof Szwaba
-
Łukasz Jarosław Mozer