RE: [Users] Fetching MMSs over gprs modem with the highest quality possible

2009-10-01 Thread Nuno Freitas

First I would like to thank you for all the help that was given.
So to try to help others with the same challenge, I post here my
configurations, a brief summary of the
troubles I faced and how I got them solved.

OBJECTIVE
To be able to receive sms and mms thru a GSM/GPRS modem (MM1 over the
Operator MMSC), and store the media with the highest quality possible.

WHAT I NEEDED TO INTALL
In order of installation:
1. curl-7.19.6 
I first tried the libcurl4-gnutls-dev package that was in my
repository (I'm doing this over an Ubuntu distro), but with it mmsbox would
shutdown right after startup without any error message. 

2. Getting the source code from  kannel 1.4.3 
Not any problem that I know about the 1.4.0 version that is stated
on Mbuni's user guide - I haven't tested yet, but for what I need the latest
version of kannel works perfectly.
3. mBuni from CVS
You need the latest build (at least at  October 1,2009) since you
need to be able to build the extra library that the mbuni1.4.0 does not
include.
4. ppp software
I am using pppd for my connection to the operator, but I guess any
other should work

COMMANDS YOU NEED TO RUN
bearerbox 
smsbox 
wapbox 
sudo mmsbox 
The only thing you should remember to do is run bearerbox first,
since it runs and hosts several services that the other processes will
connect to. At the moment I am not sure if the wapbox is needed but I still
run it.

ABOUT GETTING HIGH QUALITY ON MMS IMAGES
If you use the configuration I am posting below you will get mms from the
operator at the lowest quality a phone can receive mms.
To receive any picture larger than 2-3Kb, I added a line of code in
"mbuni/extras/mmsbox-mm1/mmsbox_mm1.c" adding the User-agent of a Nokia 5800
that fit my requirements.

h = curl_slist_append(h, "User-Agent: Mozilla/5.0 (SymbianOS/9.4;
U;Series60/5.0 Nokia5800d-1/52.50.2008.24;
Profile/MIDP-2.1Configuration/CLDC-1.1 ) AppleWebKit/413 (KHTML, like Gecko)
Safari/413");

This is after line 613. This probably a good set-up that would be nice
to stay in configuration file.

MY CONFIG FILES
CONNECTING TO THE OPERATOR
You will need to tell your ppp software how to connect to your operator
Whit pppd I am able to simply do the command 'pppd call gprs' whit this
Configuration:

>>> file /etc/ppp/peers/gprs
/dev/ttyS0 # put you device here
115200  # set your modem spped here
connect 'chat -vf /home/user/ppp/chat/start-gprs'
#defaultroute 
#replacedefaultroute
usepeerdns
debug
# login name to use in this conection
name 
user 
<<< end /etc/ppp/peers/gprs

>>> start /home/user/ppp/chat/start-gprs
ABORT   'BUSY'
ABORT   'NO CARRIER'
ABORT   'ERROR'
''  AT
OK  AT+CGDCONT=1,"IP",""
OK  ATDT*99***1#
<<< end /home/user/ppp/chat/start-gprs

>>> file /etc/ppp/chap-secrets
 Secrets for authentication using CHAP
# clientserver  secret  IP addresses


 *   
<<< end /etc/ppp/chap-secrets


Note that only if you run mbuni on a computer disconnected from any other
network you will need to route the connection to the right interface. You
can uncomment the replacedefaultroute on the file "/etc/ppp/peers/gprs" but
you will lose connections to IP that aren't statically routed.


In my case, my operator uses a private network with ip 10.xxx.xxx.xxx and I
use the interface ppp0, so the simplest config was this:
Add to file /etc/ppp/ip-up
# Route rules
/sbin/route add -net 10.0.0.0 netmask 255.0.0.0  dev ppp0 


MBUNI MMSBOX CONFIG
>>> start 
group = core
log-file = /etc/mbuni/log/mmsbox.log
access-log = /etc/mbuni/log/mmsbox-access.log
log-level = 0

group = mbuni
storage-directory = /home/user/storage
max-send-threads = 5
maximum-send-attempts = 50
default-message-expiry = 36
queue-run-interval = 5
send-attempt-back-off = 300
sendmms-port = 13052
content-adaptation = false


# Sample conf for MMSBox using a modem (MM1)
group = mmsc
id = modem
type = custom
custom-settings = "smsc-on=lynx -dump
'http://localhost:13001/start-smsc?password=&smsc=;smsc-off=lynx -dump 'http://localhost:13001/stop-smsc?
password=&smsc=';gprs-on= pppd call
gprs;gprs-pid=cat /var/run/ppp0.pid|head -1;port=8181;mmsc-url=;proxy=:;msisdn=" 
mmsc-library = /usr/local/lib/libmmsbox_mm1.so

# The custom-settings is the most important part of mbuni to the mm1 over
#the operator mmsc, so here goes a brief summary
# smsc-on and sms-off are the http commands that mbuni uses to tell kannel
#to take/hand over the model gms when he need it, so make sure you have lynx
#or any other alternative software
#
#gprs-on is the command to activate the pppd connection to the operator, and
#the gprs-pid the command to get the pid from the interface that is making
#the connection, so mbuni can disconnect from the 
#operator
#
#port is the port where mbuni is listening for data from kannel, so make
#sure this port is the same that you input in you sms-service in kannel
#
#also make sure you got libmmsbox_mm1.so built and you give the right path

Re: [Users] Fetching MMSs over gprs modem with the highest quality possible

2009-09-28 Thread Paul Bagyenda
Yes that is what I had in mind. Good to hear it all worked. Would you  
kindly write up your config for the benefit of others? I intend to  
roll this "add-on" into Mbuni proper in the near future, and make the  
setup easier. I could use your user insight.

On Sep 29, 2009, at 01:14, Nuno Freitas wrote:

UPDATE - just to let you guys know that I have succeeded in fetching  
MMS

images according to the agent I've defined:

Added on extras/mmsbox-mm1/mmsbox_mm1.c at line 611

h = curl_slist_append(h, "User-Agent: NokiaN73-1/2.0628.0.0.1 S60/3.0
Profile/MIDP-2.0 Configuration/CLDC-1.1");

After recompiling, I've retrieved the image with the resolution  
defined by

the N73 profile.

I'd suggest that these parameters could be set by configuration or at
compile time.

Thank you Paul for your help.

Best Regards,
Nuno Freitas.

___
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] Fetching MMSs over gprs modem with the highest quality possible

2009-09-28 Thread Nuno Freitas
UPDATE - just to let you guys know that I have succeeded in fetching MMS
images according to the agent I've defined:

Added on extras/mmsbox-mm1/mmsbox_mm1.c at line 611

h = curl_slist_append(h, "User-Agent: NokiaN73-1/2.0628.0.0.1 S60/3.0
Profile/MIDP-2.0 Configuration/CLDC-1.1");

After recompiling, I've retrieved the image with the resolution defined by
the N73 profile.

I'd suggest that these parameters could be set by configuration or at
compile time.

Thank you Paul for your help.

Best Regards,
Nuno Freitas.

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


RE: [Users] Fetching MMSs over gprs modem with the highest quality possible

2009-09-28 Thread Nuno Freitas
Hi,

I've tried forcing the way mbuni identifies itself to the MMSC (as a Nokia
N73) but with no success: 


1. changed every http_header_add(xx, "User-Agent", MM_NAME "/" VERSION);
with http_header_add(XX, "User-Agent", "NokiaN73-1/2.0628.0.0.1 S60/3.0
Profile/MIDP-2.0 Configuration/CLDC-1.1"); but the images came tiny.
2. with the previous change, added a line with http_header_add(XXX,
"x-wap-profile, "\"http://nds1.nds.nokia.com/uaprof/NN73-6r100.xml\"";); and
the images came tiny again.

Is there any other place I should have tried to change (code, configuration
file)?

NOTE: Here's how I am doing: Create an MMS with my phone and send it to the
GPRS modem. When I send the same image to another phone, it gets there with
its full resolution

Thanks for your help!

Regards,
Nuno Freitas


My configurations follow below:
(mmsbox.conf)
group = core
log-file = /etc/mbuni/log/mmsbox.log
access-log = /etc/mbuni/log/mmsbox-access.log
log-level = 0

group = mbuni
storage-directory = /home/XXX/YYY
max-send-threads = 5
maximum-send-attempts = 50
default-message-expiry = 36
queue-run-interval = 5
send-attempt-back-off = 300
sendmms-port = 13052


# Sample conf for MMSBox using a modem (MM1)
group = mmsc
id = modem
type = custom
custom-settings = "smsc-on=lynx -dump
'http://localhost:13001/start-smsc?password=XXX&smsc=mtx-h15';smsc-off=lynx
-dump
'http://localhost:13001/stop-smsc?password=XXX&smsc=mtx-h15';gprs-on=/home/X
XX/ppp/start-pppd;gprs-pid=cat /var/run/ppp0.pid|head
-1;port=8181;mmsc-url=http://mmsc;proxy=10.111.2.16:8080;msisdn=35196FF";
mmsc-library = /usr/local/lib/libmmsbox_mm1.so


group = mms-service
name = fullmessage
post-url = http://aaa.bbb.ccc.ddd:82/abc/mmsservice?
catch-all = true
http-post-parameters=images[]=%i&text=%t
suppress-reply=true
accept-x-mbuni-headers = true
keyword =test

group = send-mms-user
username = abc
password = abc
faked-sender = 100

group = core
log-file = /etc/mbuni/log/mbuni-mmsc.log
access-log = /etc/mbuni/log/mmsc-access.log
log-level = 0

-Original Message-
From: users-boun...@mbuni.org [mailto:users-boun...@mbuni.org] On Behalf Of
Paul Bagyenda
Sent: segunda-feira, 28 de Setembro de 2009 12:35
To: users@mbuni.org
Subject: Re: [Users] Fetching MMSs over gprs modem with the highest quality
possible

Thanks for the update.

Try setting the User-Agent and, the WAP UAProf URL. See if that helps,  
then we'll see how to fix it.
On Sep 28, 2009, at 17:12, Nuno Freitas wrote:

> Hi all,
>
> just to let you know that I've figured out what was wrong with my
> configurations and that I can now fetch MMSs from the operator with  
> the
> modem.
>
> I had a problem with TCP/IP routing when the ppp0 interface got up,  
> so mbuni
> tried to fecth the MMS via eth0 interface. Solved it with a
> "replacedefalutroute" option in the pppd options
>
> I still have this issue though: The images I fetch from the MMSC are  
> always
> tinny. I know that mbuni is setting its User-Agent as mbuni-cvs-  
> and
> possibly the MMSC from the operator is adapting images to a default  
> low
> specifications handset.
>
> 1. Can anyone help me on how to fetch the MMSs with the highest  
> quality
> possible?
>
> 2. What if I change the User-Agent directly over mbuni code and use
> something like "User-Agent: NokiaN73-1/2.0628.0.0.1 S60/3.0 Profile/ 
> MIDP-2.0
> Configuration/CLDC-1.1" ?
>
> Best regards,
> Nuno Freitas
>
> ___
> 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] Fetching MMSs over gprs modem with the highest quality possible

2009-09-28 Thread Paul Bagyenda

Thanks for the update.

Try setting the User-Agent and, the WAP UAProf URL. See if that helps,  
then we'll see how to fix it.

On Sep 28, 2009, at 17:12, Nuno Freitas wrote:


Hi all,

just to let you know that I've figured out what was wrong with my
configurations and that I can now fetch MMSs from the operator with  
the

modem.

I had a problem with TCP/IP routing when the ppp0 interface got up,  
so mbuni

tried to fecth the MMS via eth0 interface. Solved it with a
"replacedefalutroute" option in the pppd options

I still have this issue though: The images I fetch from the MMSC are  
always
tinny. I know that mbuni is setting its User-Agent as mbuni-cvs-  
and
possibly the MMSC from the operator is adapting images to a default  
low

specifications handset.

1. Can anyone help me on how to fetch the MMSs with the highest  
quality

possible?

2. What if I change the User-Agent directly over mbuni code and use
something like "User-Agent: NokiaN73-1/2.0628.0.0.1 S60/3.0 Profile/ 
MIDP-2.0

Configuration/CLDC-1.1" ?

Best regards,
Nuno Freitas

___
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