Discussion:
[BitPim-devel] phone detect change
Simon C
2005-10-19 02:48:58 UTC
Permalink
The lg vx5200 responds on the modem port with all of it's data including
esn, model and manufacturer. See EOM for trace.

This causes the phone detect code to think it is on the modem port instead
of the serial port.



The dict (phone_detect.__data) after calling the phonedetect() on the vx5200
looks like:

{'COM3': {'mode_modem': True, 'mode_brew': False, 'firmwareresponse': None,
'esn': '1XXXXXXX, 'model': 'VX5200 111', 'firmware_version': 'S/W VER:
DS3.1.90 T5EVZV03 ', 'manufacturer': 'LG Electronics Inc.'}, 'COM4':
{'mode_modem': None, 'esn_file': '\xff\ <SNIP> \x00', 'mode_brew': True,
'firmwareresponse': None, 'esn': '1XXXXXXX', 'model': 'VX5200',
'brew_version.txt': 'VX5200, VRZ, 24, 2.1.3.11, 13, 771418, 14, 771458,
20050526', 'firmware_version': None, 'manufacturer': 'LG Electronics Inc'}}



The __check_profile function returns COM3, but this incorrect, it should be
COM4. comdiagnose.islikelyport returns COM4 in this instance. I'd like to
change the __check_profile function to take the likelyports list and only
return ports that are in this list. I'd also like to add a little more
logging for the phone detect.



I'll check this in tomorrow if it is OK with everyone.



Simon

















Modem port trace from vx5200



17:31:47.694 Available ports: ['COM1', 'COM2', 'COM3', 'COM4']

17:31:47.703 Available modem ports: ['COM3']

17:31:47.874 Gathering data on port: COM3

17:31:47.884 COM3: Opening port COM3, 115200 baud, timeout 1.000000,
hardwareflow 0, softwareflow 0

17:31:47.884 COM3: Open of comm port suceeded

17:31:47.884 COM3: Writing Data - 8 bytes

00000000 41 54 45 30 56 31 0d 0a ATE0V1..



17:31:47.884 COM3: Reading remaining data Data - 4 bytes

00000000 4f 4b 0d 0a OK..



17:31:47.884 COM3: Writing Data - 8 bytes

00000000 41 54 2b 47 4d 49 0d 0a AT+GMI..



17:31:47.884 COM3: Reading remaining data Data - 33 bytes

00000000 2b 47 4d 49 3a 20 4c 47 20 45 6c 65 63 74 72 6f +GMI: LG
Electro

00000010 6e 69 63 73 20 49 6e 63 2e 0d 0a 0d 0a 4f 4b 0d nics
Inc.....OK.

00000020 0a .



17:31:47.884 COM3: Writing Data - 8 bytes

00000000 41 54 2b 47 4d 4d 0d 0a AT+GMM..



17:31:47.894 COM3: Reading remaining data Data - 24 bytes

00000000 2b 47 4d 4d 3a 20 56 58 35 32 30 30 20 31 31 31 +GMM: VX5200
111

00000010 0d 0a 0d 0a 4f 4b 0d 0a ....OK..



17:31:47.894 COM3: Writing Data - 8 bytes

00000000 41 54 2b 47 4d 52 0d 0a AT+GMR..



17:31:47.894 COM3: Reading remaining data Data - 45 bytes

00000000 2b 47 4d 52 3a 20 53 2f 57 20 56 45 52 3a 20 44 +GMR: S/W VER:
D

00000010 53 33 2e 31 2e 39 30 20 20 20 20 20 54 35 45 56 S3.1.90
T5EV

00000020 5a 56 30 33 20 0d 0a 0d 0a 4f 4b 0d 0a ZV03 ....OK..



17:31:47.914 COM3: Writing Data - 8 bytes

00000000 41 54 2b 47 53 4e 0d 0a AT+GSN..



17:31:47.914 COM3: Reading remaining data Data - 22 bytes

00000000 2b 47 53 4e 3a 20 31 44 43 44 35 31 46 34 0d 0a +GSN: 1XXXXXX..
(deliberately changed)

00000010 0d 0a 4f 4b 0d 0a ..OK..
Joe Pham
2005-10-19 03:47:59 UTC
Permalink
I’d like to change the __check_profile function to take the
likelyports list and only return ports that are in this list.
That approach will not work for users with cables that BitPim fails to autodetect. Instead, you might want to add a check for a BREW vs modem port.

-Joe Pham



______________________________________________________________________
Revolutionize the way you surf the Web!
Try NetZero HiSpeed 3G.
Visit http://www.netzero.com to sign up today!
Simon C
2005-10-19 15:25:56 UTC
Permalink
Post by Joe Pham
That approach will not work for users with cables that BitPim fails to
autodetect. Instead, you might want to add a check for a BREW vs modem
port.
True, just to confirm you are saying that a port should not be auto-detected
unless it is BREW capable and not a modem or do you think just testing for
BREW is enough.

Simon
Joe Pham
2005-10-19 23:08:39 UTC
Permalink
Post by Simon C
just to confirm you are saying
What I meant is that to qualify as a "good" port, it must match three criteria: model, manufacturer, and port type (any of which can be ignored). Right now, we only have 2 criteria: model & manufacturer.

-Joe Pham




______________________________________________________________________
Revolutionize the way you surf the Web!
Try NetZero HiSpeed 3G.
Visit http://www.netzero.com to sign up today!
Simon C
2005-10-19 23:20:47 UTC
Permalink
Post by Joe Pham
What I meant is that to qualify as a "good" port, it
must match three criteria: model, manufacturer, and
port type (any of which can be ignored). Right now,
we only have 2 criteria: model & manufacturer.
I'll add a change to require the port['class'] to be
in the 'deviceclasses' in the phone's profile.
Joe Pham
2005-10-20 02:01:35 UTC
Permalink
I'll add a change to require the port['class'] to be in
the 'deviceclasses' in the phone's profile.
or you can simply check for port['mode_brew'] and ['mode_modem']

-Joe Pham



______________________________________________________________________
Revolutionize the way you surf the Web!
Try NetZero HiSpeed 3G.
Visit http://www.netzero.com to sign up today!
Simon C
2005-10-20 02:22:48 UTC
Permalink
Post by Joe Pham
I'll add a change to require the port['class'] to be in
the 'deviceclasses' in the phone's profile.
or you can simply check for port['mode_brew'] and ['mode_modem']
This is getting into an area I'm not very familiar with so bear with me if
you will.
Checking a port for mode_brew assumes that all phones that can be
autodetected support brew, and do not communicate via AT commands. After a
brief look at the code for the various phones this seems to be a reasonable
assumption. The phonedetect function does allow for a phone to return the
port specifically if it does something really weird and skip the
verification function.
The change would be to test for brew support and not modem, although I' not
sure if the modem check is required if brew is true. Does this make sense?

Simon
Joe Pham
2005-10-20 03:09:32 UTC
Permalink
Post by Simon C
The change would be to test for brew support and not modem
If the phone profile indicates so since this must work for all phones, not just the LGs.

-Joe Pham




______________________________________________________________________
Revolutionize the way you surf the Web!
Try NetZero HiSpeed 3G.
Visit http://www.netzero.com to sign up today!

Loading...