SMS Process Problem

2 views
Skip to first unread message

Chao Lung Huang

unread,
Jul 30, 2010, 7:32:53 AM7/30/10
to sahan...@googlegroups.com
Hi :

   I tried to config the sms gateway to use the vendor's http interface to send the message.
   The verision that I use is Sahana Eden r881 (2010-07-21 09:57:55).
   The database table - msg_log seems indicated that the messages are still in the queue.
   Do I need to run any cron program to process it ?
   Thanks.

--
Regis Huang

Fran Boon

unread,
Jul 30, 2010, 10:54:16 AM7/30/10
to sahan...@googlegroups.com

Yes, exactly this.
You need to uncomment this line in cron/crontab:
#*/5 * * * * root *msg/process_sms_via_api

You also need to ensure that one of the cron modes will work:
http://www.web2py.com/examples/default/cron

Most notably, cron doesn't work with a Windows service currently (it
works fine when running on Windows in other modes, however).

Best Wishes,
Fran.

Chao Lung Huang

unread,
Jul 30, 2010, 11:47:56 AM7/30/10
to sahan...@googlegroups.com
Hi Fron:

    Thanks.
    I saw the file cron/crontab.
    But I don't know the meaning of *msg/process_sms_via_api.
    is it(*msg/process_sms_via_api) the real file at sahana eden application folder in web2py ?
    Because I can't find it in sahana eden application folder ?
    Could you give me a hint ? Thanks.

--
Regis Huang

2010/7/30 Fran Boon <franc...@gmail.com>

Fran Boon

unread,
Jul 30, 2010, 12:39:16 PM7/30/10
to sahan...@googlegroups.com
On 30 July 2010 23:47, Chao Lung Huang <regi...@gmail.com> wrote:
>     I saw the file cron/crontab.
>     But I don't know the meaning of *msg/process_sms_via_api.
>     is it(*msg/process_sms_via_api) the real file at sahana eden application
> folder in web2py ?
>     Because I can't find it in sahana eden application folder ?

msg is the controller
process_sms_via_api is the function within the controller.

This is the web2py extensions to cron syntax:
http://www.web2py.com/examples/default/cron#extensions

F

Chao Lung Huang

unread,
Jul 31, 2010, 1:07:48 AM7/31/10
to sahan...@googlegroups.com
Hi Fran:

   I see. Thank you very much. ;)

--
Regis Huang

2010/7/31 Fran Boon <franc...@gmail.com>

SahanaTW PL - Hsiaojan

unread,
Aug 5, 2010, 9:09:25 AM8/5/10
to SahanaTWPY
Could i have an update about this task?

Hsiaojan

On 7月31日, 下午1時07分, Chao Lung Huang <regis...@gmail.com> wrote:
> Hi Fran:
>
> I see. Thank you very much. ;)
>
> --
> Regis Huang
>
> 2010/7/31 Fran Boon <francisb...@gmail.com>

Chao Lung Huang

unread,
Aug 5, 2010, 11:37:14 AM8/5/10
to sahan...@googlegroups.com
Hi Hsiaojan:

   I had test the SMS Gateway ok.
   Chinese Message is ok,too.
   Now you can try to test it in the server at port 8000.
   Remember to add your mobile phone number to Contact Details.
   And select the Mobile Phone as the Contact Method.
   Then other member can send the sms to you.
   Up to five minutes ,the recipient will receive the message.
   Due to there are two serer running(one is for admin), recipient will get two same messages.
   The total number of messages that we can use is 90 now.
   If it is not enough , I can buy more messages from the vendors.
   Be the way,the other method to send the sms is via the 3G modem.
   But there is driver problem in ZTE MF637 3.5G USB Modem card.
   I  am trying to solve the driver problem.
   Hope the driver is not a closed source driver. 

--
Regis Huang

Fran Boon

unread,
Aug 5, 2010, 11:42:25 AM8/5/10
to sahan...@googlegroups.com
2010/8/5 Chao Lung Huang <regi...@gmail.com>:

>    I had test the SMS Gateway ok.
>    Chinese Message is ok,too.

Great - so no need to make any modifications?
It just worked?

>    Due to there are two serer running(one is for admin), recipient will get
> two same messages.

I don't understand this - can you clarify?

>    Be the way,the other method to send the sms is via the 3G modem.
>    But there is driver problem in ZTE MF637 3.5G USB Modem card.

It doesn't work as an AT modem? :/

Compatible devices listed here:
http://eden.sahanafoundation.org/wiki/UserGuidelinesMsg#WhatHardwaredoIneedtosendSMS

F

Iap

unread,
Aug 5, 2010, 11:54:23 AM8/5/10
to sahan...@googlegroups.com
 
>    Be the way,the other method to send the sms is via the 3G modem.
>    But there is driver problem in ZTE MF637 3.5G USB Modem card.

It doesn't work as an AT modem? :/

Compatible devices listed here:
http://eden.sahanafoundation.org/wiki/UserGuidelinesMsg#WhatHardwaredoIneedtosendSMS


I used to use old-fashion phone with bluetooth to send SMS.
The ordinary 2G is good enough to do the job.
It costs around NT$1200~NT$1600.
For example the Sony Ericson T68 supposes the AT command set and buletooth.
( The T68 now is EOL, but there still are other models substitutes the same position in the market)

The bluetooth is required because that the power code has to be connected all the time to make the 
phone always on duty. And for a single USB bluetooth dongle in the service-side, 
there can be multiple phones connected via bluetooth.

pyBluez is the Python module to make the bluetooth connection.

Singuan
 

Chao Lung Huang

unread,
Aug 5, 2010, 12:11:49 PM8/5/10
to sahan...@googlegroups.com
2010/8/5 Fran Boon <franc...@gmail.com>

2010/8/5 Chao Lung Huang <regi...@gmail.com>:
>    I had test the SMS Gateway ok.
>    Chinese Message is ok,too.

Great - so no need to make any modifications?
It just worked?

   Yes !! It work. I just complete the configuration.
   Then it worked.
   I just spend time to trace code and understand how to config it and how to use it.
   Thanks your help. ;)
   If there is no hint from you , I think that I must spend more time on it.
   I think that I can write a SMS HowTo for people to setting up quickly. ;)

 
>    Due to there are two serer running(one is for admin), recipient will get
> two same messages.

I don't understand this - can you clarify?


   There are two webpy server running in the system.
   One is for web2py admin at 8001.
   The other is for eden web at 8000.
   I think that it is why I get two same messages in testing.
   We will shutdown one server for finding the problem.
 

>    Be the way,the other method to send the sms is via the 3G modem.
>    But there is driver problem in ZTE MF637 3.5G USB Modem card.

It doesn't work as an AT modem? :/

Compatible devices listed here:
http://eden.sahanafoundation.org/wiki/UserGuidelinesMsg#WhatHardwaredoIneedtosendSMS

   ZTE MF637 and  ZTE MF626 work in Ubuntu Desktop 10.04.
   The Ubuntu Desktop detect the two 3.5G modem cards in /dev/ttyUSB2 automatically.
   But it didn't work at Mandrake Linux.
   I doubt that the Ubuntu Desktop 10.04 use the closed-source binary driver from ZTE.
   I am trying to check whether there are drivers' source code in the newest Linux Kernel source tree.

--
Regis Huang  
    

Fran Boon

unread,
Aug 5, 2010, 12:28:33 PM8/5/10
to sahan...@googlegroups.com
On 5 August 2010 23:54, Iap <iap...@gmail.com> wrote:
> I used to use old-fashion phone with bluetooth to send SMS.
> The bluetooth is required because that the power code has to be connected
> all the time to make the
> phone always on duty. And for a single USB bluetooth dongle in the
> service-side,
> there can be multiple phones connected via bluetooth.

I too use BlueTooth :)

> pyBluez is the Python module to make the bluetooth connection.

On Windows, I just have the Windows Bluetooth stack present the phone
as a modem to the OS - a virtual COM port.
I don't think we need to interface with the Python at all...although
perhaps Linux needs other parts of Bluez to present a TTYSx?

F

SahanaTW PL - Hsiaojan

unread,
Aug 5, 2010, 9:37:44 PM8/5/10
to SahanaTWPY
I don't really understand much about the issues Chao Luang has
mentioned. However, I need to test the functionality as a real user.
Please push what you have done to http://py.sahana.tw/eden.

Thanks!

Hsiaojan

TsungWei Hu

unread,
Aug 5, 2010, 10:52:52 PM8/5/10
to sahan...@googlegroups.com
Hi Hsiaojan,

I have successfully received SMS.
Also send you one that I believe you already receive.
Please test Messaging at http://py.sahana.tw/eden

/marr/

2010/8/6 SahanaTW PL - Hsiaojan <hsiaoj...@gmail.com>

Hsiaojan

unread,
Aug 6, 2010, 5:11:34 AM8/6/10
to sahan...@googlegroups.com
Yes, I got two messages and which is supossed to be fixed, isn't it?

 
Hsiaojan
--
Hsiaojan Liu

TsungWei Hu

unread,
Aug 9, 2010, 6:08:43 AM8/9/10
to sahan...@googlegroups.com
The problem, receiving two duplicated messages, is fixed.
Now sending SMS should be OK.
Reply all
Reply to author
Forward
0 new messages