Re: [Users] Mbuni MM1 behavior regarding ppp connection and MMS stored in queue

2010-08-09 Thread Emmanuel CHANSON
After severals tests it seems that the issue is solved.

Mbuni keep the ppp connection open and send all its stored MMS before to
close the connection.

Test I have sent 3 MMS:

mmsbox.log

2010-08-10 13:16:45 [2698] [3] DEBUG: HTTP: Creating HTTPClient for
`127.0.0.1'.
2010-08-10 13:16:45 [2698] [3] DEBUG: HTTP: Created HTTPClient area
0xb5600a90.
2010-08-10 13:16:45 [2698] [9] DEBUG: WSP: Mapping `text/plain', WSP 1.2 to
0x0003.
2010-08-10 13:16:45 [2698] [9] INFO: mmsbox.c:1366 
[mmsbox] [n/a] MMSBox: Queued message from service [sendmms-user], [transid
[Mbuni-msg.6605.x1.98.93]: qf6605.7.x698.8
2010-08-10 13:16:45 [2698] [9] DEBUG: HTTP: Destroying HTTPClient area
0xb5600a90.
2010-08-10 13:16:45 [2698] [9] DEBUG: HTTP: Destroying HTTPClient for
`127.0.0.1'.
2010-08-10 13:16:45 [2698] [9] INFO: mmsbox.c:1613 
[mmsbox] [n/a] MMSBox.mmssend: u=tester, Queued [Accepted:
Mbuni-msg.6605.x1.98.93]
2010-08-10 13:16:46 [2698] [8] DEBUG: *Queued to thread 1 for
/var/spool/mbuni/mmsbox_outgoing/qf6605.7.x698.8, sendt=1281406605,
tnow=1281406606*
2010-08-10 13:16:47 [2698] [3] DEBUG: HTTP: Creating HTTPClient for
`127.0.0.1'.
2010-08-10 13:16:47 [2698] [3] DEBUG: HTTP: Created HTTPClient area
0xb5603508.
2010-08-10 13:16:47 [2698] [11] DEBUG: WSP: Mapping `text/plain', WSP 1.2 to
0x0003.
2010-08-10 13:16:47 [2698] [11] INFO: mmsbox.c:1366 
[mmsbox] [n/a] MMSBox: Queued message from service [sendmms-user], [transid
[Mbuni-msg.6607.x2.98.91]: i-qf6607.8.x698.92
2010-08-10 13:16:47 [2698] [11] DEBUG: HTTP: Destroying HTTPClient area
0xb5603508.
2010-08-10 13:16:47 [2698] [11] DEBUG: HTTP: Destroying HTTPClient for
`127.0.0.1'.
2010-08-10 13:16:47 [2698] [11] INFO: mmsbox.c:1613 
[mmsbox] [n/a] MMSBox.mmssend: u=tester, Queued [Accepted:
Mbuni-msg.6607.x2.98.91]
2010-08-10 13:16:48 [2698] [3] DEBUG: HTTP: Creating HTTPClient for
`127.0.0.1'.
2010-08-10 13:16:48 [2698] [3] DEBUG: HTTP: Created HTTPClient area
0xb5603508.
2010-08-10 13:16:48 [2698] [14] DEBUG: WSP: Mapping `text/plain', WSP 1.2 to
0x0003.
2010-08-10 13:16:48 [2698] [14] INFO: mmsbox.c:1366 
[mmsbox] [n/a] MMSBox: Queued message from service [sendmms-user], [transid
[Mbuni-msg.6608.x3.98.84]: 7-du-qf6608.9.x698.77
2010-08-10 13:16:48 [2698] [14] DEBUG: HTTP: Destroying HTTPClient area
0xb5603508.
2010-08-10 13:16:48 [2698] [14] DEBUG: HTTP: Destroying HTTPClient for
`127.0.0.1'.
2010-08-10 13:16:48 [2698] [14] INFO: mmsbox.c:1613 
[mmsbox] [n/a] MMSBox.mmssend: u=tester, Queued [Accepted:
Mbuni-msg.6608.x3.98.84]
2010-08-10 13:16:51 [2698] [8] DEBUG: *Queued to thread 2 for
/var/spool/mbuni/mmsbox_outgoing/i/qf6607.8.x698.92, sendt=1281406607,
tnow=1281406611*
2010-08-10 13:16:51 [2698] [8] DEBUG: *Queued to thread 3 for
/var/spool/mbuni/mmsbox_outgoing/7/du/qf6608.9.x698.77, sendt=1281406608,
tnow=1281406611*

2010-08-10 13:16:51 [2698] [5] INFO: mmsbox_mm1.c:681 
[mmsbox-mm1] [n/a] waiting for connection: 0, pid=2914 cpid=0, ifexited=1,
exitstatus=0
2010-08-10 13:16:56 [2698] [5] INFO: mmsbox_mm1.c:681 
[mmsbox-mm1] [n/a] waiting for connection: 1, pid=2914 cpid=0, ifexited=1,
exitstatus=0
2010-08-10 13:17:01 [2698] [5] INFO: mmsbox_mm1.c:681 
[mmsbox-mm1] [n/a] waiting for connection: 2, pid=2914 cpid=0, ifexited=1,
exitstatus=0
2010-08-10 13:17:06 [2698] [5] INFO: mmsbox_mm1.c:681 
[mmsbox-mm1] [n/a] waiting for connection: 3, pid=2914 cpid=0, ifexited=1,
exitstatus=0

ppp connection established: /var/log/message
-
...
Aug 10 13:17:07 navette pppd[2914]: Serial connection established.
Aug 10 13:17:07 navette pppd[2914]: Using interface ppp0
Aug 10 13:17:07 navette pppd[2914]: Connect: ppp0 <--> /dev/ttyACM1
Aug 10 13:17:07 navette pppd[2914]: PAP authentication succeeded
Aug 10 13:17:08 navette pppd[2914]: local  IP address 10.152.206.186
Aug 10 13:17:08 navette pppd[2914]: remote IP address 192.168.254.254

mmsbox.log:
---
2010-08-10 13:17:11 [2698] [5] INFO: mmsbox_mm1.c:379 
[mmsbox-mm1] [n/a] start_gprs returned PID: 2914
2010-08-10 13:17:11 [2698] [5] DEBUG: WSP: Mapping `text/plain', WSP 1.2 to
0x0003.
2010-08-10 13:17:21 [2698] [5] INFO: mmsbox_mm1.c:608 
[mmsbox-mm1] [n/a] write_data called with nmemn=61, size=1
2010-08-10 13:17:21 [2698] [5] DEBUG: Octet string at 0x9962b00:
...
2010-08-10 13:17:21 [2698] [5] DEBUG:  Octet string dump ends.
2010-08-10 13:17:21 [2698] [5] DEBUG: End of dump.
2010-08-10 13:17:21 [2698] [5] DEBUG: Dumping MMS message body (not
multipart) [0 parts] -->
2010-08-10 13:17:21 [2698] [19] INFO: mmsbox_mm1.c:345 
[mmsbox-mm1] [n/a] sent message, type=m-send-req, result=(none)

2010-08-10 13:17:21 [2698] [19] INFO: bearerbox.c:1519  [MM7] [n/a]
*Sent MMSBox Outgoing Queue MMS Send: From 100, to
+X/TYPE=PLMN, *msgsize=121:
msgid=[D85AC0476B9247CB4C58BAA8B4B6386F]
2010-08-10 13:17:21 [2698] [0] DEBUG: Queued to thread 1 for
/var/spool/mbuni/mmsbox_incoming/e/qf6641.10.x698.43, sendt=0,
tnow=1281406641
2010-08-10 13:17:21 [2698] [13] INFO: mmsbox.

Re: [Users] Mbuni MM1 behavior regarding ppp connection and MMS stored in queue

2010-08-09 Thread Paul Bagyenda
Patch is on cvs.
On Aug 09, 2010, at 11:29, Piotr Isajew wrote:

> On Mon, Aug 09, 2010 at 06:52:01PM +1100, Emmanuel CHANSON wrote:
>> I already reported this behavior but I think it is better to open a new
>> thread for this.
>> 
>> I notice that in my config, Mbuni connect and disconnect from ppp GPRS
>> connection for each MMS stored in queue.
>> Is it a normal behavior ?
>> 
>> Piotr told me that in its config:
>> *With settings similar to yours I get the behaviour when mbuni sends
>> everything that is queued and then disconnects. Maybe if you patch
>> mmsbox_mm1.c to add a 2 second sleep at end of inner loop in handle_mm1
>> function that will solve your problem.*
>> 
>> So should Mbuni connect and disconnect for each MMS ? Or can we set an
>> options to keep the ppp connection open until all MMS stored are sent ?
>> 
>> Others options:
>> - patch Mbuni to add a 2 second sleep ? If Piotr you can show me which
>> function to add in order to have the sleep ? Or anybody else :)
> Try patch I sent to devel list last week:
> http://www.mail-archive.com/de...@mbuni.org/msg00427.html
> 
> If you try it please let me know if it solves your problem.
> 
>> - manage pppd and ignore SIGTERM sent by Mbuni ? How to do this ?
>> - ...
>> 
>> Note: I am not a C expert :)
>> 
>> -- 
>> Regards,
>> 
>> Emmanuel
> 
>> ___
>> Users mailing list
>> Users@mbuni.org
>> http://lists.mbuni.org/mailman/listinfo/users
> 
> ___
> Users mailing list
> Users@mbuni.org
> http://lists.mbuni.org/mailman/listinfo/users

___
Users mailing list
Users@mbuni.org
http://lists.mbuni.org/mailman/listinfo/users


Re: [Users] Mbuni MM1 behavior regarding ppp connection and MMS stored in queue

2010-08-09 Thread Piotr Isajew
On Mon, Aug 09, 2010 at 06:52:01PM +1100, Emmanuel CHANSON wrote:
> I already reported this behavior but I think it is better to open a new
> thread for this.
> 
> I notice that in my config, Mbuni connect and disconnect from ppp GPRS
> connection for each MMS stored in queue.
> Is it a normal behavior ?
> 
> Piotr told me that in its config:
> *With settings similar to yours I get the behaviour when mbuni sends
> everything that is queued and then disconnects. Maybe if you patch
> mmsbox_mm1.c to add a 2 second sleep at end of inner loop in handle_mm1
> function that will solve your problem.*
> 
> So should Mbuni connect and disconnect for each MMS ? Or can we set an
> options to keep the ppp connection open until all MMS stored are sent ?
> 
> Others options:
> - patch Mbuni to add a 2 second sleep ? If Piotr you can show me which
> function to add in order to have the sleep ? Or anybody else :)
Try patch I sent to devel list last week:
http://www.mail-archive.com/de...@mbuni.org/msg00427.html

If you try it please let me know if it solves your problem.

> - manage pppd and ignore SIGTERM sent by Mbuni ? How to do this ?
> - ...
> 
> Note: I am not a C expert :)
> 
> -- 
> Regards,
> 
> Emmanuel

> ___
> Users mailing list
> Users@mbuni.org
> http://lists.mbuni.org/mailman/listinfo/users



pgpycS16bIofL.pgp
Description: PGP signature
___
Users mailing list
Users@mbuni.org
http://lists.mbuni.org/mailman/listinfo/users


[Users] Mbuni MM1 behavior regarding ppp connection and MMS stored in queue

2010-08-09 Thread Emmanuel CHANSON
I already reported this behavior but I think it is better to open a new
thread for this.

I notice that in my config, Mbuni connect and disconnect from ppp GPRS
connection for each MMS stored in queue.
Is it a normal behavior ?

Piotr told me that in its config:
*With settings similar to yours I get the behaviour when mbuni sends
everything that is queued and then disconnects. Maybe if you patch
mmsbox_mm1.c to add a 2 second sleep at end of inner loop in handle_mm1
function that will solve your problem.*

So should Mbuni connect and disconnect for each MMS ? Or can we set an
options to keep the ppp connection open until all MMS stored are sent ?

Others options:
- patch Mbuni to add a 2 second sleep ? If Piotr you can show me which
function to add in order to have the sleep ? Or anybody else :)
- manage pppd and ignore SIGTERM sent by Mbuni ? How to do this ?
- ...

Note: I am not a C expert :)

-- 
Regards,

Emmanuel
___
Users mailing list
Users@mbuni.org
http://lists.mbuni.org/mailman/listinfo/users