Reply
Thread Tools
Posts: 9 | Thanked: 29 times | Joined on Oct 2016
#1
I really REALLY tried to not post a duplicate question but I've not been having much luck finding this error within the forum. If there's a thread that already exists my apologies.

So... fMMS.... whatta beast....
I've spent a great deal of time trying different settings and getting my operator to confirm some details about what works and what doesn't as far as their network goes. Also spent a great deal of time reading about other troubles with fMMS and it doesn't appear I've been experiencing one of the common issues.

Using fMMS 1.3.5 and I'm getting this error about roaming...

2016-10-14 14:52:28,501 fmms.connectors: not in home network, not downloading..
2016-10-14 14:52:32,961 fmms.connectors: user declined to download while roaming

So it appears I've declined downloads while roaming. Unfortunately I'm never in the home network area as I've moved out to the twigs for a job.

Does anyone know where to allow downloads while roaming? Is this a fMMS thing or a Fremantle thing?

Oh, maybe I should mention I can send MMS but not receive. I know that's not too helpful but now you know where I'm coming from.

Again sorry if I'm a nuisance, I am a noob. I've been using this phone for about 4 days. I'm not a developer. I do work with linux professionally so I am comfortable with the OS but still.... this quirk has me stumped.

Cheers,
Mike

p.s. phone settings show data roaming always allow so... meh... whats going on.

Last edited by cg132; 2016-10-14 at 21:33. Reason: p.s.
 

The Following 2 Users Say Thank You to cg132 For This Useful Post:
Posts: 75 | Thanked: 269 times | Joined on Aug 2012
#2
It's failing on line 47 in '/opt/fmms/connectors.py'

What it looks like is that it should be prompting you with the following dialog - "To retrieve the MMS your active connection you need to connect to the internet, proceed?"

What you could try if you don't care about roaming, is just comment out lines 41-51 in '/opt/fmms/connectors.py'

Code:
statusarr = phoneif.get_registration_status()[0]
if statusarr != 0:
	log.info("not in home network, not downloading..")
	if self.cont.ui:
		if not self.cont.continue_download_roaming():
			log.info("user declined to download while roaming")
			raise Exception('User is roaming, not downloading')
			return	
	else:
		self.connector = None
		raise Exception('User is roaming, not downloading')
 

The Following 4 Users Say Thank You to Ilew For This Useful Post:
Posts: 9 | Thanked: 29 times | Joined on Oct 2016
#3
Now that's something I hadn't considered. Let me try it....

Progress has been made! I'm able to download a simple mms that contains only text that says "test". Thank you very much. That seems to have resolve the declined to download error.

Woohoo!

Thanks again.
 

The Following 4 Users Say Thank You to cg132 For This Useful Post:
Posts: 75 | Thanked: 269 times | Joined on Aug 2012
#4
I did some more investigation and the reason why it silently failed was because there was no translation for :
Code:
'To retrieve the MMS your active connection you need to connect to the internet, proceed?'
The closet thing I could find was :
Code:
'To retrieve the MMS your active connection will need to change. Switch connection?'
I thought it might be useful to remove the attempted translation and add a setting for fMMS to either "Prompt" or "Ignore" the above dialog.

Since it doesn't seem as though I can pm peterleinchen, here is the patch:
Code:
Index: connectors.py
===================================================================
--- connectors.py	(revision 1)
+++ connectors.py	(working copy)
@@ -19,6 +19,7 @@
 CONNMODE_ICDSWITCH = 2                                                         
 CONNMODE_FORCESWITCH = 3                                                       
 CONNMODE_NULL = 10
+ROAMMODE_IGNORE = 2
 
 class MasterConnector:
 	""" handles setting up and (might) take down connection(s) """
@@ -39,14 +40,16 @@
 		phoneobj = bus.get_object('com.nokia.phone.net', '/com/nokia/phone/net')
 		phoneif = dbus.Interface(phoneobj, 'Phone.Net')
 		statusarr = phoneif.get_registration_status()[0]
-		if statusarr != 0:
-			log.info("not in home network, not downloading..")
+		if (self.config.get_roammode() == ROAMMODE_IGNORE) and statusarr != 0:
 			if self.cont.ui:
 				if not self.cont.continue_download_roaming():
 					log.info("user declined to download while roaming")
 					raise Exception('User is roaming, not downloading')
-					return	
+					return
+				else:
+					log.info("user accepted to download while roaming")
 			else:
+				log.info("not in home network, not downloading..")
 				self.connector = None
 				raise Exception('User is roaming, not downloading')
 				#return
Index: controller_gtk.py
===================================================================
--- controller_gtk.py	(revision 1)
+++ controller_gtk.py	(working copy)
@@ -186,7 +186,7 @@
 		dialog = gtk.Dialog()
 		dialog.set_title(gettext.ldgettext('osso-connectivity-ui', 'conn_fi_phone_network_data_roam'))
 		#dialog.set_transient_for(self.window)
-		label = gtk.Label(_("To retrieve the MMS your active connection you need to connect to the internet, proceed?"))
+		label = gtk.Label("To retrieve the MMS your active connection will use data roaming, proceed?")
 		label.set_line_wrap(True)
 		dialog.vbox.add(label)
 		dialog.add_button(gtk.STOCK_YES, 1)
Index: fmms_config.py
===================================================================
--- fmms_config.py	(revision 1)
+++ fmms_config.py	(working copy)
@@ -19,6 +19,8 @@
 CONNMODE_ICDSWITCH = 2
 CONNMODE_FORCESWITCH = 3
 CONNMODE_NULL = 10
+ROAMMODE_PROMPT = 1
+ROAMMODE_IGNORE = 2
 
 class fMMS_config:
 
@@ -61,6 +63,8 @@
 			self.set_version("Unknown")
 		if self.get_connmode() == None:
 			self.set_connmode(CONNMODE_FORCESWITCH)
+		if self.get_roammode() == None:
+			self.set_roammode(ROAMMODE_PROMPT)
 		if self.get_db_path() == None:
 			self.set_db_path("/home/user/.fmms/mms.db")
 		if not self.get_useragent():
@@ -82,6 +86,7 @@
 			self.set_firstlaunch(1)
 			self.set_img_resize_width(240)
 			self.set_connmode(CONNMODE_FORCESWITCH)
+			self.set_roammode(ROAMMODE_PROMPT)
 
 	def get_old_mmsc(self):
 		return self.client.get_string(self._fmmsdir + 'mmsc')
@@ -98,6 +103,12 @@
 	def get_connmode(self):
 		return self.client.get_int(self._fmmsdir + "connmode")
 		
+	def set_roammode(self, val):
+		self.client.set_int(self._fmmsdir + "roammode", int(val))
+		
+	def get_roammode(self):
+		return self.client.get_int(self._fmmsdir + "roammode")
+		
 	def get_last_ui_dir(self):
 		return self.client.get_string(self._fmmsdir + "lastuidir")
 		
Index: fmms_config_dialog.py
===================================================================
--- fmms_config_dialog.py	(revision 1)
+++ fmms_config_dialog.py	(working copy)
@@ -76,7 +76,22 @@
 		self.icdbutton = hildon.GtkToggleButton(gtk.HILDON_SIZE_FINGER_HEIGHT)
 		self.icdbutton.set_label(_("Polite"))
 		self.icdsignal = self.icdbutton.connect('toggled', self.conn_mode_toggled)
+
+		expRBox = gtk.HBox()
+		exp_label2 = gtk.Label("Roaming Mode")
+		exp_label2.set_width_chars(labelwidth)
+		exp_label2.set_line_wrap(True)
+		exp_label2.set_alignment(0, 0.5)
 		
+		rbox = gtk.HButtonBox()
+		rbox.set_property("name", "GtkHBox2")
+		self.promptbutton = hildon.GtkToggleButton(gtk.HILDON_SIZE_FINGER_HEIGHT)
+		self.promptbutton.set_label(_("Prompt"))
+		self.promptsignal = self.promptbutton.connect('toggled', self.roam_mode_toggled)
+		self.ignorebutton = hildon.GtkToggleButton(gtk.HILDON_SIZE_FINGER_HEIGHT)
+		self.ignorebutton.set_label(_("Ignore"))
+		self.ignoresignal = self.ignorebutton.connect('toggled', self.roam_mode_toggled)
+		
 		# Set the correct button to be active
 		self.connmode_setactive()
 		
@@ -90,9 +105,22 @@
 		expHBox.pack_start(exp_label, False, True, 0)
 		expHBox.pack_start(alignment, False, True, 0)
 
+		# Set the correct button to be active
+		self.roammode_setactive()
+
+		rbox.pack_start(self.promptbutton, True, False, 0)
+		rbox.pack_start(self.ignorebutton, True, False, 0)
+
+		alignment = gtk.Alignment(0.5, 0.5, 0, 0)
+		alignment.add(rbox)
+
+		expRBox.pack_start(exp_label2, False, True, 0)
+		expRBox.pack_start(alignment, False, True, 0)
+
 		allVBox.pack_start(apnHBox, False, False, 2)
 		#allVBox.pack_start(numberHBox, False, False, 2)
 		allVBox.pack_start(imgwidthHBox, False, False, 2)
+		allVBox.pack_end(expRBox, False, False, 2)
 		allVBox.pack_end(expHBox, False, False, 2)
 
 		allVBox.show_all()
@@ -163,6 +191,34 @@
 		elif self.config.get_connmode() == fMMSconf.CONNMODE_FORCESWITCH:
 			self.rudebutton.set_active(True)
 
+	def roam_mode_toggled(self, widget):
+		""" Ugly hack used since its ToggleButtons """
+		self.promptbutton.handler_block(self.promptsignal)
+		self.ignorebutton.handler_block(self.ignoresignal)
+		if self.promptbutton == widget:
+			self.promptbutton.set_active(True)
+			self.ignorebutton.set_active(False)
+		elif self.rudebutton == widget:
+			self.promptcbutton.set_active(False)
+			self.ignorebutton.set_active(True)
+		self.promptbutton.handler_unblock(self.promptsignal)
+		self.ignorebutton.handler_unblock(self.ignoresignal)
+		return True
+
+	def roammode_option(self):
+		""" Returns which 'Roaming Mode' button is active. """
+		if self.promptbutton.get_active():
+			return fMMSconf.ROAMMODE_PROMPT
+		elif self.ignorebutton.get_active():
+			return fMMSconf.ROAMMODE_IGNORE
+
+	def roammode_setactive(self):
+		""" Activate one of the 'Roaming Mode' buttons. """
+		if self.config.get_roammode() == fMMSconf.ROAMMODE_PROMPT:
+			self.promptbutton.set_active(True)
+		elif self.config.get_connmode() == fMMSconf.ROAMMODE_IGNORE:
+			self.ignorebutton.set_active(True)
+
 	def config_menu_button_clicked(self, action):
 		""" Checks if we should save the Configuration options. """
 		if action == 1:
@@ -175,7 +231,9 @@
 			self.config.set_img_resize_width(size)
 			log.info("Set image width to %s" % size)
 			self.config.set_connmode(self.connmode_option())
-			log.info("Set connection mode %s" % self.connmode_option())				
+			log.info("Set connection mode %s" % self.connmode_option())	
+			self.config.set_roammode(self.roammode_option())
+			log.info("Set roaming mode %s" % self.roammode_option())				
 			banner = hildon.hildon_banner_show_information(self.window, "", \
 				 gettext.ldgettext('osso-connectivity-ui', "conn_ib_settings_saved"))
 			return 0
Cheers,
Ilew.
Attached Files
File Type: zip fmms-1.3.6.zip (133.8 KB, 188 views)
 

The Following 2 Users Say Thank You to Ilew For This Useful Post:
Posts: 9 | Thanked: 29 times | Joined on Oct 2016
#5
Wow! My roaming problem spawned a patch? Well that's cool! I thought simply commenting that chunk out was good enough....either way I'm about to get off topic now. I'm no longer affected by the roaming problem, but I can not download messages that include pictures. That is why I mentioned that I can send simple messages containing text only. Looks like some kind of database problem if you ask me... but I don't really know what I'm looking at. It spends about a minute downloading a 600k file over 2g then fails when trying to insert. However I've found other posts about this error. Just letting y'all know I'm diving head long into another problem here since my simple texts have succeeded. Now i'm going for bringing down an image. This should be fun.


Code:
Date: Sun, 16 Oct 2016 16:53:14 GMT
Server: Mavenir Web Application Server
Content-Type: application/vnd.wap.mms-message
Content-Length: 621378

2016-10-16 11:54:20,420 fmms.controller: saved binary mms <open file '/home/user/.fmms/mms/mavodi-1-89-84-1-78-1-179-3-78-322a2ff/message', mode 'wb' at 0x422b0b18>
2016-10-16 11:54:20,423 fmms.wappushhandler: fetched http://polmmsget.msg.eng.t-mobile.co...9-3-78-322a2ff and wrote to file
2016-10-16 11:54:20,630 fmms.wappushhandler: sending ack...
2016-10-16 11:54:20,636 fmms.wappushhandler: using custom mms
2016-10-16 11:54:20,755 fmms.wappushhandler: connecting via proxy 216.155.165.50:8080
2016-10-16 11:54:20,760 fmms.wappushhandler: mmschost: http://mms.msg.eng.t-mobile.com/mms/wapenc
2016-10-16 11:54:24,075 fmms.wappushhandler: MMSC STATUS: 200 OK
2016-10-16 11:54:24,083 fmms.wappushhandler: MMSC RESPONDED: {}
2016-10-16 11:54:24,088 fmms.wappushhandler: m-acknowledge-ind: (200, 'OK', {}, True)
2016-10-16 11:54:24,095 fmms.wappushhandler: ack sent
2016-10-16 11:54:24,101 fmms.connectors: UglyHackHandler running disconnect
2016-10-16 11:54:24,384 fmms.connectors: disconnecting connection. rx: 651859 tx: 18747
2016-10-16 11:54:24,394 fmms.connectors: UglyHackHandler running disconnect
2016-10-16 11:54:24,557 fmms.connectors: disconnecting connection. rx: 651859 tx: 18747
2016-10-16 11:54:24,569 fmms.controller: path: /home/user/.fmms/mms/mavodi-1-89-84-1-78-1-179-3-78-322a2ff
2016-10-16 11:54:24,588 fmms.controller: decode_binary_mms running: /home/user/.fmms/mms/mavodi-1-89-84-1-78-1-179-3-78-322a2ff
2016-10-16 11:54:48,887 fmms.controller: returning message!
2016-10-16 11:54:48,909 fmms.controller: storing mms...mavodi-1-89-84-1-78-1-179-3-78-322a2ff
2016-10-16 11:54:48,914 fmms.dbhandler: Something went wrong when inserting
Traceback (most recent call last):
  File "/opt/fmms/dbhandler.py", line 311, in insert_mms_message
    size = os.path.getsize(fpath)
  File "/usr/lib/python2.5/posixpath.py", line 139, in getsize
    return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: '/home/user/.fmms/mms/mavodi-1-139-30-1-78-1-179-3-78-322a2ff/message'
2016-10-16 11:54:48,927 fmms.__main__: Failed to open viewer with transaction id: mavodi-1-89-84-1-78-1-179-3-78-322a2ff
Traceback (most recent call last):
  File "/opt/fmms/fmms_gui.py", line 467, in show_mms
    fMMSViewer.fMMS_Viewer(transactionid, spawner=self)
  File "/opt/fmms/fmms_viewer.py", line 59, in __init__
    self._parse_mms(fname, vbox)
  File "/opt/fmms/fmms_viewer.py", line 248, in _parse_mms
    self.cont.get_mms_from_push(filename)
  File "/opt/fmms/controller.py", line 291, in get_mms_from_push
    mmsid = self.store_mms_message(pushid, message)
  File "/opt/fmms/controller.py", line 248, in store_mms_message
    mmsid = self.store.insert_mms_message(pushid, message)
  File "/opt/fmms/dbhandler.py", line 311, in insert_mms_message
    size = os.path.getsize(fpath)
  File "/usr/lib/python2.5/posixpath.py", line 139, in getsize
    return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: '/home/user/.fmms/mms/mavodi-1-139-30-1-78-1-179-3-78-322a2ff/message'
 

The Following 2 Users Say Thank You to cg132 For This Useful Post:
Posts: 9 | Thanked: 29 times | Joined on Oct 2016
#6
Haha! I just noticed that the images have been downloaded to /home/user/.fmms/mms/mavodi-1-89-86-4-7b-1-14b-5-7b-5aadf62. So I can copy the image I've received from my sister 1600mi away and actually view it. So the image comes across... just the fmms database isn't updated. Odd. But hey, works enough for me.


Cheers,
Mike
 

The Following 2 Users Say Thank You to cg132 For This Useful Post:
Posts: 75 | Thanked: 269 times | Joined on Aug 2012
#7
If you're willing to be a guinea pig, I may have a simple fix for the images not showing.

Could you change line 291 in '/opt/fmms/controller.py' from:
Code:
		mmsid = self.store_mms_message(pushid, message)
to
Code:
		mmsid = self.store_mms_message(pushid, message, transactionId=trans_id)
Pretty much it's reading a different transaction-id to the one it's using to store the binary.
So it's looking in a non-existent dir and failing.

Cheers,
Ilew
 

The Following 3 Users Say Thank You to Ilew For This Useful Post:
peterleinchen's Avatar
Posts: 4,117 | Thanked: 8,901 times | Joined on Aug 2010 @ Ruhrgebiet, Germany
#8
My inbox is emptied again

I propose to wait a while and see what else comes out/pops up and then I might push a new version to extras-devel repository.
__________________
SIM-Switcher, automated SIM switching with a Double (Dual) SIM adapter
--
Thank you all for voting me into the Community Council 2014-2016!

Please consider your membership / supporting Maemo e.V. and help to spread this by following/copying this link to your TMO signature:
[MC eV] Maemo Community eV membership application, http://talk.maemo.org/showthread.php?t=94257

editsignature, http://talk.maemo.org/profile.php?do=editsignature
 

The Following 2 Users Say Thank You to peterleinchen For This Useful Post:
Posts: 9 | Thanked: 29 times | Joined on Oct 2016
#9
Originally Posted by Ilew View Post
If you're willing to be a guinea pig, I may have a simple fix for the images not showing.

Could you change line 291 in '/opt/fmms/controller.py' from:
Code:
		mmsid = self.store_mms_message(pushid, message)
to
Code:
		mmsid = self.store_mms_message(pushid, message, transactionId=trans_id)
Pretty much it's reading a different transaction-id to the one it's using to store the binary.
So it's looking in a non-existent dir and failing.

Cheers,
Ilew
Zomg! I had resigned myself to never getting a usual MMS and then llew comes out with a little gem and provides the answer to all the unanswered posts I've been reading about decoding, returning, sorting, something went wrong.

You my friend are brilliant! If I could thank you more than once I would. =D

Oh yeah... did I mention it worked?
woohoo!

Last edited by cg132; 2016-10-17 at 17:51. Reason: oh yeah....
 

The Following 3 Users Say Thank You to cg132 For This Useful Post:
Posts: 75 | Thanked: 269 times | Joined on Aug 2012
#10
Originally Posted by peterleinchen View Post
My inbox is emptied again

I propose to wait a while and see what else comes out/pops up and then I might push a new version to extras-devel repository.
Sounds good to me.

Originally Posted by cg132 View Post
Zomg! I had resigned myself to never getting a usual MMS and then llew comes out with a little gem and provides the answer to all the unanswered posts I've been reading about decoding, returning, sorting, something went wrong.

You my friend are brilliant! If I could thank you more than once I would. =D

Oh yeah... did I mention it worked?
woohoo!
That's great news, thanks for providing the error messages and being the guinea pig.
 

The Following 2 Users Say Thank You to Ilew For This Useful Post:
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 22:37.