Results 1 to 11 of 11

Thread: Automatyczne startowanie gnokii

  1. #1
    Join Date
    Jan 2010
    Location
    Warsaw
    Posts
    6

    Automatyczne startowanie gnokii

    Witam,

    Mam Asusa Wl500gPv2, używam go w połączeniu z modemem Huawei E160. Zainstalowałem na nim gnokii i chciałem go startować automatycznie żeby odbierał SMSy jednak nie wiem dlaczego nie startuje.
    Jeśli startuję go ręcznie
    Code:
    gnokii --smsreader
    to wszystko jest ok - program uruchamia się i odiera SMSy.
    Dodałem go do pliku post-mount ale nie chce ruszać przy restarcie.
    Próbowałem już wiele sposobów z nohupem, & po komendzie i wszelkich innych kombinacji. Próbowałem też czy wogóle plik jest wykonywany (wpisałem /usr/bin/gnokii --help > /tmp/mylog) i po restarcie w tym pliku miałem wypisanego helpa gnokii więc zarówno plik post-mount jest wykonywany jak i gnokii w odpowiednim miejscu.
    Co jeszcze może być nie tak?

  2. #2
    Join Date
    Aug 2008
    Location
    Poland, Biała Podlaska
    Posts
    276
    Do pliku post-mount wpisywałe¶ na pewno pełn± ¶cieżkę?
    Może daj trochę sleepa przed odczytywaniem smsów.

  3. #3
    Join Date
    Jan 2010
    Location
    Warsaw
    Posts
    6
    Quote Originally Posted by Lesiuk View Post
    Do pliku post-mount wpisywałe¶ na pewno pełn± ¶cieżkę?
    Może daj trochę sleepa przed odczytywaniem smsów.
    Próbowałem tak:
    Code:
    #!/bin/sh
    
    # Enter your commands here
    /opt/bin/gnokii --smsreader > /tmp/mylog
    /opt/bin/gnokii --smsreader > /tmp/mylog2
    /opt/bin/gnokii --smsreader > /tmp/mylog3 &
    /usr/bin/nohup /opt/bin/gnokii --smsreader > /tmp/mylog4 &
    /bin/sleep 20;/usr/bin/nohup /opt/bin/gnokii --smsreader > /tmp/mylog5 &
    /bin/sleep 21 && /usr/bin/nohup /opt/bin/gnokii --smsreader > /tmp/mylog6 &
    /bin/sleep 22 && /usr/bin/nohup /opt/bin/gnokii --smsreader > /tmp/mylog7
    /usr/bin/nohup /opt/bin/gnokii --smsreader > /tmp/mylog8 && /bin/sleep 17
    /opt/bin/gnokii --smsreader && /bin/sleep 18
    /bin/sleep 19 && /opt/bin/gnokii --smsreader
    Po zalogowaniu na router widziałem jeszcze sleepy w 'ps' ale gnokii się nie uruchomiło. Coś robię nie tak?

  4. #4
    Witam mógłby¶ napisać jak skonfigurowałe¶ gnokii bo też by mnie interesowała taka forma odbierania sms z modemu

    Pozdrawiam

  5. #5
    Join Date
    Jan 2010
    Location
    Warsaw
    Posts
    6
    Quote Originally Posted by filet187 View Post
    Witam mógłby¶ napisać jak skonfigurowałe¶ gnokii bo też by mnie interesowała taka forma odbierania sms z modemu

    Pozdrawiam
    Konfigurujesz w pliku /tmp/local/root/.gnokiirc
    Code:
    [global]
    model = AT
    port = /dev/usb/tts/1
    connection = serial
    port wybierasz 'drugi' tzn. nie ten który masz ustawiony przy połączeniu GPRS.
    Wypisane masz je w logu w Diagnostics sekcja USB devfs Devices
    Wiadomości odbierasz z pamięci SM
    Code:
    gnokii --getsms SM 1 end
    Jedno co zauważyłem to że w windowsowym programie mam kupę smsów a tu widzi tylko kilka sztuk.
    Możesz też sprawdzić ile smsów jest w jakiej pamięci wpisując
    Code:
    gnokii --showsmsfolderstatus

  6. #6
    Hello!

    I'm trying to connect nokia5500 to wl500w in PC Suite mode, and dmesg outputs this:
    Code:
    hub.c: new USB device 01:03.0-1, assigned address 3
    usb.c: USB device 3 (vend/prod 0x421/0x43f) is not claimed by any active driver.
    So considering this config i do not have "/dev/usb/tts/1"

    Code:
    [global]
    model = AT
    port = /dev/usb/tts/1
    connection = serial
    Is there any way to make this work? I need it to send and receive sms.

  7. #7
    I added this into /usr/local/sbin/post-boot

    Code:
    insmod usbserial vendor=0x421 product=0x43f
    And now I am able to send sms with

    Code:
    echo "text" | gnokii --sendsms +number
    But reading sms outputs:

    Code:
    [admin@wl500w188 root]$ gnokii --smsreader   
    GNOKII Version 0.6.28
    Error: Unknown error - well better than nothing!!
    Is there anything I can do to make it work or is it just because my phone model isn't supported?

  8. #8
    Join Date
    Jan 2010
    Location
    Warsaw
    Posts
    6
    Quote Originally Posted by w0rm View Post
    I added this into /usr/local/sbin/post-boot

    Code:
    insmod usbserial vendor=0x421 product=0x43f
    And now I am able to send sms with

    Code:
    echo "text" | gnokii --sendsms +number
    But reading sms outputs:

    Code:
    [admin@wl500w188 root]$ gnokii --smsreader   
    GNOKII Version 0.6.28
    Error: Unknown error - well better than nothing!!
    Is there anything I can do to make it work or is it just because my phone model isn't supported?
    Maybe you should set different model for your phone?
    Here is a list http://wiki.gnokii.org/index.php/Config of phones and settings for them.

  9. #9
    I have a symbian s60 3rd edition phone (Nokia 5500 sport) so according to http://wiki.gnokii.org/index.php/Config the only option for me is model = AT.

  10. #10
    Join Date
    Jan 2010
    Location
    Warsaw
    Posts
    6
    Quote Originally Posted by w0rm View Post
    I have a symbian s60 3rd edition phone (Nokia 5500 sport) so according to http://wiki.gnokii.org/index.php/Config the only option for me is model = AT.
    Does
    Code:
     
    gnokii --showsmsfolderstatus
    work for you? If yes then you could see if gnokii is able to read SMSes from your phone at all.

    You could also try to receive sms-es with smsd. I tried it but it takes quite a lot of memory (mysql has to be running).

    Or you can go the 'hard' way and read smses with i.e.
    Code:
    serialcomm /dev/your/phone AT+CMGF=1
    serialcomm /dev/your/phone AT+CMGL='ALL'
    serialcomm /dev/your/phone AT+CMGR=0
    First command sets modem to text mode, second retrieves all messages (doesn't work for me), last reads a single message.

  11. #11
    Join Date
    Jan 2010
    Location
    Warsaw
    Posts
    6
    Udało mi się sobie poradzić z problemem... co za głupota. Gnokii 'zdychał' bo nie znajdował configu.
    Przy wykonywaniu tego skryptu szukał go w /.gnokiirc lub /etc/gnokiirc a u mnie był w katalogu usera (/tmp/local/root/.gnokiirc).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •