Discussion:
[BitPim-devel] trouble detecting Samsung SPH-M500's model data
Chris Peterson
2007-09-11 07:06:53 UTC
Permalink
hi, I'm trying to add support for my Samsung SPH-M500 phone to BitPim (using
Mac OS X 10.4). I'm having trouble detecting my phone's model information.

I believe I have my BitPim dev environment configured correctly. I have
successfully built sqlite-3.4.2 and apsw-3.3.13-r1 from source. I can sync
BitPim from SVN and run the 'python bp.py' GUI. I already know Python and
I've created stub files for com_samsungsphm500.py and p_samsungsphm500.p
(and protogen'd p_samsungsphm500.py).

My problem:

DetectPhone.__get_data() returns a valid manufacturer and firmware_version,
but that's all:

r = {'mode_modem': True, 'mode_brew': False, 'firmwareresponse': None,
'esn': '', 'model': '', 'firmware_version': 'ES.M500 1 [Nov 03 2006
16:17:56]', 'manufacturer': 'SAMSUNG ELECTRONICS CO., LTD.'}

In the Protocol Log, I see that the phone does seem to be returning a valid
GMM response: "SPH-M500/154":

23:52:17.890 /dev/cu.usbmodem3B11: Writing Data - 8 bytes
00000000 41 54 2b 47 4d 4d 0d 0a AT+GMM..

23:52:17.890 /dev/cu.usbmodem3B11: Reading remaining data Data - 20
bytes
00000000 53 50 48 2d 4d 35 30 30 2f 31 35 34 0d 0a 0d 0a
SPH-M500/154....
00000010 4f 4b 0d 0a OK..


Any ideas why DetectPhone.__get_data() could see the manufacturer and
firmware_version, but not model in the GMM response?


thanks,
chris peterson
Joe Pham
2007-09-11 21:35:04 UTC
Permalink
Post by Chris Peterson
I've created stub files for com_samsungsphm500.py and
p_samsungsphm500.p
What's the parent class for your Phone class?

-Joe Pham

_____________________________________________________________
Make money while helping others. Click here for information on becoming a personal trainer.
http://3rdpartyoffers.netzero.net/TGL2211/fc/Ioyw6ijm6rh6IeFvYhGHxI36aYhvn5LjgAAxOPRDQWf7ygxcSl0RBS/
Chris Peterson
2007-09-13 02:15:37 UTC
Permalink
hi Joe,

Following the example of many other Samsang phones' com_samsung*.py files, I
tested using the com_samsungspha620 Phone class and then just
com_samsung_packet Phone class.

I'm not sure how, but I know I was reading the phone's AT GMM model
correctly because I made the following notes in my dev notes text file:

__check_profile: e = {'mode_modem': False, 'mode_brew': True,
'firmwareresponse': None, 'esn': '18D497DE', 'model': 'SPH-M500/154',
'firmware_version': '+GMR: ES.M500 1 [Nov 03 2006 16:17:56]',
'manufacturer': '+GMI: SAMSUNG ELECTRONICS CO., LTD.'}

As you can see, both the ESN and Model were correctly initialized, but now
only firmware_version and manufacturer get are initialized:

__get_data: r = {'mode_modem': True, 'mode_brew': False, 'firmwareresponse':
None, 'esn': '', 'model': '', 'firmware_version': 'ES.M500 1 [Nov 03
2006 16:17:56]', 'manufacturer': 'SAMSUNG ELECTRONICS CO., LTD.'}


thanks,
chris
Post by Joe Pham
Post by Chris Peterson
I've created stub files for com_samsungsphm500.py and
p_samsungsphm500.p
What's the parent class for your Phone class?
-Joe Pham
Sandy Patterson
2008-02-16 18:04:34 UTC
Permalink
Hi, I'm running into this same problem. I'm not sure how it should be
fixed. It looks as though the m500 responds to the AT+GMM command with
a simple string that doesn't include the "+GMM: " part .... it does
include this part of the response for the +GMR and +GMI commands. So,
if I just change a line in phone_detect.py somewhere around 107.

#return ': '.join(resp[0].split(': ')[1:])
return resp[0]

then it detects the phone right. I don't think breaking detection for
every other phone is the correct solution though. Before the change
the model detected is blank. I'm also hesitant to muck about with this
part of the code since i can't test on any other phones.

I did figure out that I could change the modelresp packet (form the
one in p_samsung_packet.p) to model this not returning the command
itself, but it didn't change the phone detection.

Thanks,
Sandy Patterson
Post by Chris Peterson
hi Joe,
Following the example of many other Samsang phones' com_samsung*.py files, I
tested using the com_samsungspha620 Phone class and then just
com_samsung_packet Phone class.
I'm not sure how, but I know I was reading the phone's AT GMM model
__check_profile: e = {'mode_modem': False, 'mode_brew': True,
'firmwareresponse': None, 'esn': '18D497DE', 'model': 'SPH-M500/154',
'firmware_version': '+GMR: ES.M500 1 [Nov 03 2006 16:17:56]',
'manufacturer': '+GMI: SAMSUNG ELECTRONICS CO., LTD.'}
As you can see, both the ESN and Model were correctly initialized, but now
None, 'esn': '', 'model': '', 'firmware_version': 'ES.M500 1 [Nov 03
2006 16:17:56]', 'manufacturer': 'SAMSUNG ELECTRONICS CO., LTD.'}
thanks,
chris
Post by Joe Pham
Post by Chris Peterson
I've created stub files for com_samsungsphm500.py and
p_samsungsphm500.p
What's the parent class for your Phone class?
-Joe Pham
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
BitPim-devel mailing list
https://lists.sourceforge.net/lists/listinfo/bitpim-devel
Joe Pham
2008-02-16 22:33:20 UTC
Permalink
So, if I just change a line in phone_detect.py somewhere around 107.
You're on the right path; but instead making changes in phone_detetc.py, you can customize your phone detection code in your own phone class.

-Joe Pham


_____________________________________________________________
Hospitality Management - Get the career you've always wanted. Click Now.
http://thirdpartyoffers.netzero.net/TGL2211/fc/Ioyw6ijneZqGhuKrSDe1ekUybfJoIFi3keTudBORb1T6Jjj2n1u9z2/
Loading...