On Thu, Aug 05, 2010 at 04:59:59AM +0200, Emmanuel CHANSON wrote:
> I forgot to add
> 
> /sbin before 'ip route' in ip-up script, now it is Ok
> 
> Things is Mbuni connect to GPRS, send the MMS and disconnect just after
> although a second MMS has to be sent, reconnect, send it and disconnect?

have you tried to set max-send-threads to something greater than 1?

Also take a look at queue-run-interval and send-attempt-back-off
settings.

> 
> Is it a normal behavior ? or is it possible to keep the ppp0 open and send
> all MMS stored in spool before closing it ?

You can always play with gprs-on and pid stuff; that would include
setting idle timer in pppd and playing somehow with pids you pass to
mbuni (you would need to create a kind of shielding script that
manages pppd and ignores SIGTERM's from mbuni)




> 
> Many thanks Piotr for your support, you helped me to solve this :)
> 
> I plan to developp a web interface that can use mbuni to send MMS.
> 
> BR,
> 
> Emmanuel
> 
> 2010/8/5 Piotr Isajew <p...@ex.com.pl>
> 
> > On Thu, Aug 05, 2010 at 01:29:24PM +1100, Emmanuel CHANSON wrote:
> > > Yeah, thanks Piotr,
> > >
> > > It seems better using 'nodetach', mbuni does not block anymore but retry
> > to
> > > send MMS
> > > but I have an issue with routing to reach MMS-C, when pppd is established
> > it
> > > should set the route in ip-up script: ip route to 192.168.39.201 dev ppp0
> > I
> > > guess?
> > > Can I use route add -host 192.168.39.201 gw <ppp0IP@ 10.152.149.196 show
> > > below> somewhere ?
> >
> > Sure. In basic configuration I used /sbin/route add -host $PROXY dev
> > ppp0 in ip-up, but for me proxy was directly reachable from IP
> > assigned by pppd. You may need to use 192.168.254.254 as gateway here.
> > >
> > > #!/bin/sh
> > > IFNAME="$1"
> > > LOCAL_IP="$4"
> > > REMOTE_IP="$5"
> > > IPPARAM="$6"
> > > *MMS_PROXY="192.168.39.201"
> > > ip route add to $MMS_PROXY dev $IFNAME*
> > > # routing has been set up, so:
> > > ln -sf /var/run/ppp0.pid /var/run/ppp0-mbuni.pid
> > >
> > >
> > > but I saw in the netstat -rn output (stay few second): coming from pppd
> > > process?
> > > *192.168.254.254 0.0.0.0         255.255.255.255 UH        0 0          0
> > > ppp0
> > >
> > > # cat /etc/ppp/peers/options-mobile
> > > *ttyACM1
> > > 115200
> > > lock
> > > crtscts
> > > modem
> > > passive
> > > novj
> > > nodefaultroute
> > > nodetach
> > > noipdefault
> > > usepeerdns
> > > noauth
> > > hide-password
> > > persist
> > > holdoff 10
> > > maxfail 0
> > > debug*
> > >
> > > *
> > > mmsbox.log:
> > > ------------------
> > > 2010-08-05 13:15:35 [3941] [3] DEBUG: HTTP: Creating HTTPClient for
> > > `127.0.0.1'.
> > > 2010-08-05 13:15:35 [3941] [3] DEBUG: HTTP: Created HTTPClient area
> > > 0xb5900d20.
> > > 2010-08-05 13:15:35 [3941] [14] DEBUG: WSP: Mapping `text/plain', WSP 1.2
> > to
> > > 0x0003.
> > > 2010-08-05 13:15:35 [3941] [14] INFO: mmsbox.c:1366 <make_and_queue_msg>
> > > [mmsbox] [n/a] MMSBox: Queued message from service [sendmms-user],
> > [transid
> > > [Mbuni-msg.4535.x2.41.34]: 6-qf4535.2.x941.9
> > > 2010-08-05 13:15:35 [3941] [14] DEBUG: HTTP: Destroying HTTPClient area
> > > 0xb5900d20.
> > > 2010-08-05 13:15:35 [3941] [14] DEBUG: HTTP: Destroying HTTPClient for
> > > `127.0.0.1'.
> > > 2010-08-05 13:15:35 [3941] [14] INFO: mmsbox.c:1613
> > <dispatch_sendmms_recv>
> > > [mmsbox] [n/a] MMSBox.mmssend: u=tester, Queued [Accepted:
> > > Mbuni-msg.4535.x2.41.34]
> > > 2010-08-05 13:15:37 [3941] [7] DEBUG: Queued to thread 1 for
> > > /var/spool/mbuni/mmsbox_outgoing/6/qf4535.2.x941.9, sendt=1280974535,
> > > tnow=1280974537
> > > arg 0: pppd
> > > arg 1: call
> > > arg 2: mobile-auth
> > >
> > >
> > > Script /usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat
> > > finished (pid 4006), status = 0x5
> > > Connect script failed
> > >
> > >
> > > cat: /var/run/ppp0-mbuni.pid: Aucun fichier ou dossier de ce type
> > > 2010-08-05 13:15:42 [3941] [5] INFO: mmsbox_mm1.c:659 <start_gprs>
> > > [mmsbox-mm1] [n/a] waiting for connection: 0, pid=4005 cpid=0,
> > ifexited=1,
> > > exitstatus=5
> > > cat: /var/run/ppp0-mbuni.pid: Aucun fichier ou dossier de ce type
> > > 2010-08-05 13:15:47 [3941] [5] INFO: mmsbox_mm1.c:659 <start_gprs>
> > > [mmsbox-mm1] [n/a] waiting for connection: 1, pid=4005 cpid=0,
> > ifexited=1,
> > > exitstatus=5
> > > cat: /var/run/ppp0-mbuni.pid: Aucun fichier ou dossier de ce type
> > > 2010-08-05 13:15:52 [3941] [5] INFO: mmsbox_mm1.c:659 <start_gprs>
> > > [mmsbox-mm1] [n/a] waiting for connection: 2, pid=4005 cpid=0,
> > ifexited=1,
> > > exitstatus=5
> > > cat: /var/run/ppp0-mbuni.pid: Aucun fichier ou dossier de ce type
> > > 2010-08-05 13:15:57 [3941] [5] INFO: mmsbox_mm1.c:659 <start_gprs>
> > > [mmsbox-mm1] [n/a] waiting for connection: 3, pid=4005 cpid=0,
> > ifexited=1,
> > > exitstatus=5
> > > chat:  Aug 05 13:15:58 CONNECT
> > > Script /usr/sbin/chat -v -t15 -f /etc/ppp/chatscripts/mobile-modem.chat
> > > finished (pid 4014), status = 0x0
> > > Serial connection established.
> > > using channel 17
> > > Using interface ppp0
> > > Connect: ppp0 <--> /dev/ttyACM1
> > > rcvd [LCP ConfReq id=0x0 <mru 1500> <asyncmap 0xa0000> <auth pap>]
> > > sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xe5cdc253> <pcomp>
> > <accomp>]
> > > sent [LCP ConfAck id=0x0 <mru 1500> <asyncmap 0xa0000> <auth pap>]
> > > rcvd [LCP ConfRej id=0x1 <magic 0xe5cdc253> <pcomp> <accomp>]
> > > sent [LCP ConfReq id=0x2 <asyncmap 0x0>]
> > > rcvd [LCP ConfNak id=0x2 <asyncmap 0xa0000>]
> > > sent [LCP ConfReq id=0x3 <asyncmap 0xa0000>]
> > > rcvd [LCP ConfAck id=0x3 <asyncmap 0xa0000>]
> > > sent [PAP AuthReq id=0x1 user="mms" password=<hidden>]
> > > rcvd [PAP AuthAck id=0x1 ""]
> > > PAP authentication succeeded
> > > sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15>]
> > > sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2
> > > 0.0.0.0>]
> > > rcvd [LCP ProtRej id=0x1 80 fd 01 01 00 0c 1a 04 78 00 18 04 78 00]
> > > Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
> > > rcvd [IPCP ConfReq id=0x2 <addr 192.168.254.254>]
> > > sent [IPCP ConfAck id=0x2 <addr 192.168.254.254>]
> > > rcvd [IPCP ConfNak id=0x1 <addr 10.152.149.196> <ms-dns1 0.0.0.0>
> > <ms-dns2
> > > 0.0.0.0>]
> > > sent [IPCP ConfReq id=0x2 <addr 10.152.149.196> <ms-dns1 0.0.0.0>
> > <ms-dns2
> > > 0.0.0.0>]
> > > rcvd [IPCP ConfRej id=0x2 <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
> > > sent [IPCP ConfReq id=0x3 <addr 10.152.149.196>]
> > > rcvd [IPCP ConfAck id=0x3 <addr 10.152.149.196>]
> > > local  IP address 10.152.149.196
> > > remote IP address 192.168.254.254
> > > Script /etc/ppp/ip-up started (pid 4042)
> > > Script /etc/ppp/ip-up finished (pid 4042), status = 0x0
> > > 2010-08-05 13:16:02 [3941] [5] INFO: mmsbox_mm1.c:379 <handle_mm1>
> > > [mmsbox-mm1] [n/a] start_gprs returned PID: 4005
> > > 2010-08-05 13:16:02 [3941] [5] DEBUG: WSP: Mapping `text/plain', WSP 1.2
> > to
> > > 0x0003.
> > > 2010-08-05 13:16:05 [3941] [5] ERROR: mmsbox_mm1.c:628 <fetch_content>
> > > [mmsbox-mm1] [n/a] failed to fetch/post content: couldn't connect to host
> > > 2010-08-05 13:16:05 [3941] [5] DEBUG: Octet string at 0xafb009c8:
> > > 2010-08-05 13:16:05 [3941] [5] DEBUG:   len:  0
> > > 2010-08-05 13:16:05 [3941] [5] DEBUG:   size: 0
> > > 2010-08-05 13:16:05 [3941] [5] DEBUG:   immutable: 0
> > > 2010-08-05 13:16:05 [3941] [5] DEBUG: Octet string dump ends.
> > > 2010-08-05 13:16:05 [3941] [5] ERROR: mmsbox_mm1.c:499 <handle_mm1>
> > > [mmsbox-mm1] [n/a] Sending failed: (none), (none)!
> > > 2010-08-05 13:16:05 [3941] [5] INFO: mmsbox_mm1.c:524 <handle_mm1>
> > > [mmsbox-mm1] [n/a] GPRS turned off returned: 0
> > > Terminating on signal 15
> > > Connect time 0.1 minutes.
> > > Sent 0 bytes, received 0 bytes.
> > > 2010-08-05 13:16:05 [3941] [19] INFO: mmsbox_mm1.c:345 <send_msg>
> > > [mmsbox-mm1] [n/a] sent message, type=m-send-req, result=(none)
> > > 2010-08-05 13:16:05 [3941] [19] INFO: bearerbox.c:1519 <sendMsg> [MM7]
> > [n/a]
> > > Retry later MMSBox Outgoing Queue MMS Send: From 100/TYPE=PLMN, to
> > > +687824921/TYPE=PLMN, msgsize=123: msgid=[N/A]
> > > Script /etc/ppp/ip-down started (pid 4050)
> > > sent [LCP TermReq id=0x4 "User request"]
> > > Script /etc/ppp/ip-down finished (pid 4050), status = 0x0
> > > rcvd [LCP TermAck id=0x4 "User request"]
> > > Connection terminated.
> > >
> > > /var/log/messages:
> > > ----------------------------
> > > Aug  5 13:15:37 navette pppd[4005]: pppd 2.4.5 started by admin, uid 0
> > > Aug  5 13:15:38 navette chat[4006]: abort on (BUSY)
> > > Aug  5 13:15:38 navette chat[4006]: abort on (NO CARRIER)
> > > Aug  5 13:15:38 navette chat[4006]: abort on (VOICE)
> > > Aug  5 13:15:38 navette chat[4006]: abort on (NO DIALTONE)
> > > Aug  5 13:15:38 navette chat[4006]: abort on (NO DIAL TONE)
> > > Aug  5 13:15:38 navette chat[4006]: abort on (NO ANSWER)
> > > Aug  5 13:15:38 navette chat[4006]: abort on (DELAYED)
> > > Aug  5 13:15:38 navette chat[4006]: report (CONNECT)
> > > Aug  5 13:15:38 navette chat[4006]: timeout set to 6 seconds
> > > Aug  5 13:15:38 navette chat[4006]: send (ATQ0^M)
> > > Aug  5 13:15:38 navette chat[4006]: expect (OK)
> > > Aug  5 13:15:38 navette chat[4006]: ^M
> > > Aug  5 13:15:38 navette chat[4006]: NO CARRIER
> > > Aug  5 13:15:38 navette chat[4006]:  -- failed
> > > Aug  5 13:15:38 navette chat[4006]: Failed (NO CARRIER)
> > > Aug  5 13:15:38 navette pppd[4005]: Connect script failed
> > >
> > >
> > > Aug  5 13:15:50 navette chat[4014]: abort on (BUSY)
> > > Aug  5 13:15:50 navette chat[4014]: abort on (NO CARRIER)
> > > Aug  5 13:15:50 navette chat[4014]: abort on (VOICE)
> > > Aug  5 13:15:50 navette chat[4014]: abort on (NO DIALTONE)
> > > Aug  5 13:15:50 navette chat[4014]: abort on (NO DIAL TONE)
> > > Aug  5 13:15:50 navette chat[4014]: abort on (NO ANSWER)
> > > Aug  5 13:15:50 navette chat[4014]: abort on (DELAYED)
> > > Aug  5 13:15:50 navette chat[4014]: report (CONNECT)
> > > Aug  5 13:15:50 navette chat[4014]: timeout set to 6 seconds
> > > Aug  5 13:15:50 navette chat[4014]: send (ATQ0^M)
> > > Aug  5 13:15:50 navette chat[4014]: expect (OK)
> > > Aug  5 13:15:50 navette chat[4014]: ATQ0^M^M
> > > Aug  5 13:15:50 navette chat[4014]: OK
> > > Aug  5 13:15:50 navette chat[4014]:  -- got it
> > > Aug  5 13:15:50 navette chat[4014]: send (ATZ^M)
> > > Aug  5 13:15:50 navette chat[4014]: timeout set to 3 seconds
> > > Aug  5 13:15:50 navette chat[4014]: expect (OK)
> > > Aug  5 13:15:50 navette chat[4014]: ^M
> > > Aug  5 13:15:50 navette chat[4014]: ATZ^M^M
> > > Aug  5 13:15:50 navette chat[4014]: OK
> > > Aug  5 13:15:50 navette chat[4014]:  -- got it
> > > Aug  5 13:15:50 navette chat[4014]: send (AT^M)
> > > Aug  5 13:15:50 navette chat[4014]: expect (OK)
> > > Aug  5 13:15:50 navette chat[4014]: ^M
> > > Aug  5 13:15:53 navette chat[4014]: alarm
> > > Aug  5 13:15:53 navette chat[4014]: send (AT^M)
> > > Aug  5 13:15:53 navette chat[4014]: expect (OK)
> > > Aug  5 13:15:53 navette chat[4014]: AT^M^M
> > > Aug  5 13:15:53 navette chat[4014]: OK
> > > Aug  5 13:15:53 navette chat[4014]:  -- got it
> > > Aug  5 13:15:53 navette chat[4014]: send (ATI^M)
> > > Aug  5 13:15:53 navette chat[4014]: expect (OK)
> > > Aug  5 13:15:53 navette chat[4014]: ^M
> > > Aug  5 13:15:53 navette chat[4014]: ATI^M^M
> > > Aug  5 13:15:53 navette chat[4014]: my300X GPRS^M
> > > Aug  5 13:15:53 navette chat[4014]: ^M
> > > Aug  5 13:15:53 navette chat[4014]: OK
> > > Aug  5 13:15:53 navette chat[4014]:  -- got it
> > > Aug  5 13:15:53 navette chat[4014]: send (ATZ^M)
> > > Aug  5 13:15:53 navette chat[4014]: expect (OK)
> > > Aug  5 13:15:53 navette chat[4014]: ^M
> > > Aug  5 13:15:54 navette chat[4014]: ATZ^M^M
> > > Aug  5 13:15:54 navette chat[4014]: OK
> > > Aug  5 13:15:54 navette chat[4014]:  -- got it
> > > Aug  5 13:15:54 navette chat[4014]: send (AT^M)
> > > Aug  5 13:15:54 navette chat[4014]: expect (OK)
> > > Aug  5 13:15:54 navette chat[4014]: ^M
> > > Aug  5 13:15:57 navette chat[4014]: alarm
> > > Aug  5 13:15:57 navette chat[4014]: send (AT^M)
> > > Aug  5 13:15:57 navette chat[4014]: expect (OK)
> > > Aug  5 13:15:57 navette chat[4014]: AT^M^M
> > > Aug  5 13:15:57 navette chat[4014]: OK
> > > Aug  5 13:15:57 navette chat[4014]:  -- got it
> > > Aug  5 13:15:57 navette chat[4014]: send (AT+CGDCONT=1,"IP","mms"^M)
> > > Aug  5 13:15:57 navette chat[4014]: expect (OK)
> > > Aug  5 13:15:57 navette chat[4014]: ^M
> > > Aug  5 13:15:57 navette chat[4014]: AT+CGDCONT=1,"IP","mms"^M^M
> > > Aug  5 13:15:57 navette chat[4014]: OK
> > > Aug  5 13:15:57 navette chat[4014]:  -- got it
> > > Aug  5 13:15:57 navette chat[4014]: send (ATDT*99***1#^M)
> > > Aug  5 13:15:57 navette chat[4014]: timeout set to 30 seconds
> > > Aug  5 13:15:57 navette chat[4014]: expect (CONNECT)
> > > Aug  5 13:15:57 navette chat[4014]: ^M
> > > Aug  5 13:15:58 navette chat[4014]: ATDT*99***1#^M^M
> > > Aug  5 13:15:58 navette chat[4014]: CONNECT
> > > Aug  5 13:15:58 navette chat[4014]:  -- got it
> > > Aug  5 13:15:58 navette chat[4014]: send (^M)
> > > Aug  5 13:15:58 navette pppd[4005]: Serial connection established.
> > > Aug  5 13:15:58 navette pppd[4005]: Using interface ppp0
> > > Aug  5 13:15:58 navette pppd[4005]: Connect: ppp0 <--> /dev/ttyACM1
> > > Aug  5 13:15:58 navette pppd[4005]: PAP authentication succeeded
> > > Aug  5 13:15:59 navette pppd[4005]: local  IP address 10.152.149.196
> > > Aug  5 13:15:59 navette pppd[4005]: remote IP address 192.168.254.254
> > > Aug  5 13:16:05 navette pppd[4005]: Terminating on signal 15
> > > Aug  5 13:16:05 navette pppd[4005]: Connect time 0.1 minutes.
> > > Aug  5 13:16:05 navette pppd[4005]: Sent 0 bytes, received 0 bytes.
> > > Aug  5 13:16:05 navette pppd[4005]: Connection terminated.
> > > Aug  5 13:16:06 navette pppd[4005]: Exit.
> > >
> > > [r...@navette ~]# netstat -rn
> > > Table de routage IP du noyau
> > > Destination     Passerelle      Genmask         Indic   MSS FenĂȘtre irtt
> > > Iface
> > > *192.168.254.254 0.0.0.0         255.255.255.255 UH        0 0          0
> > > ppp0*
> > > 192.168.0.0     0.0.0.0         255.255.255.0   U         0 0          0
> > > eth1
> > > 169.254.0.0     0.0.0.0         255.255.0.0     U         0 0          0
> > > eth1
> > > 0.0.0.0         192.168.0.1     0.0.0.0         UG        0 0          0
> > > eth1
> > > [r...@navette ~]#
> >
> > > _______________________________________________
> > > 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
> >
> >
> 
> 
> -- 
> Emmanuel
> 
> CHANSON Emmanuel
> Mobile Nouvelle-Calédonie: +687.77.35.02
> Mobile France: +33 (0) 6.68.03.89.56
> @email : emmanuelchan...@gmail.com

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

Attachment: pgpni3oRo1yKe.pgp
Description: PGP signature

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

Reply via email to