Results 1 to 13 of 13
  1.    #1  
    Here are the beginnings of a script to check for the usual model, carrier, etc. parameters we all seem to bat around and tweak for our own platform situations.

    As is, PPC-PlatformCheck.mscr will determine if the model is a Treo 700w. Please test it for me on other models.

    I encourage others to add to this code such that it eventually becomes a universal platform check that we can all call as a subroutine, passing/returning the same variable names.

    Note that the WirelessCarrier check will not work on non-700w PPCs when xCast is active or some other banner script has written to the System\State\Phone registry entry. However, it does work on the 700w.

    To find registry entries to parse for your model, search for strings like "700wx", "Sprint", "750", etc. with a registry editor.

    Then test and upload your results here.

    Thanks,

    JDC

    Code:
    # PPC-PlatformTest.mscr
    # Ver: 0.b
    #
    # Initial Version verifies Verizon Treo 700w and may work "as is" for 700wx and 750.
    # However, the "WirelessCarrier" will display xCast weather string (if xCast is active and if
    # the model is a 'non-700w').
    #
    # 0.b -- added code to check if phone off
    #
    
    HWTypeString = "???"
    DeviceMfg = "???"
    Device = "???"
    DeviceStyle = "???"
    DeviceModel = "???"
    DeviceMfg = "???"
    WirelessCarrier = "????"
    TreoTest = 0
    len = 0
    
    Platform = MortScriptType()
    OpSys = SystemVersion("platform")
    OpSysVer = SystemVersion()
    HWTypeString = RegRead("HKLM", "Drivers\USB\FunctionDrivers\Serial_Class", "Product")
    DeviceMfg = RegRead("HKLM", "Drivers\USB\FunctionDrivers\Serial_Class", "Manufacturer")
    WirelessCarrier = RegRead("HKLM", "System\State\Phone", "Current Operator Name")
    PhoneStatus = RegValueExists( "HKLM", "System\State\Phone", "Current Operator Name" )
    PhoneState = RegRead("HKLM", "System\State\Phone", "Cellular System Available")
    
    
    len = length (HwTypeString)
    TreoTest = Find (HwTypeString, "Treo")
    	If (TreoTest > 0)
    		DeviceStyle = "Treo"
    		Device = SubStr (HWTypeString, TreoTest, len - TreoTest +1 )
    		DeviceModel = SubStr (Device, 6)
    	EndIf
    
    If (Device eq "Treo 700w")
    	If (PhoneStatus = 0 or PhoneState = 0)
    		WirelessCarrier = "??PhoneOff??"
    	EndIf
    		
    EndIf
    
    BigMessage 	("    ---------- PPC Platform Test ---------^NL^^NL^" \
    		&"Platform:		" & Platform & "^NL^" \
    		&"Operating Sys:	" & OpSys & " " & OpSysVer & "^NL^" \
    		&"DeviceMfg:	" & DeviceMfg & "^NL^" \
    		&"Device:		" & Device & "^NL^" \
    		&"DeviceStyle:	" & DeviceStyle & "^NL^" \
    		&"DeviceModel:	" & DeviceModel & "^NL^" \
    		&"WirelessCarrier:	" & WirelessCarrier & "^NL^^NL^^NL^" \
    		&"HWTypeString: ^NL^" & HWTypeString \
    		,"PPC-PlatformTest")
    Attached Files Attached Files
    Last edited by jdcochran; 03/31/2007 at 11:19 PM.
  2. #2  
    Note that when the phone is off the 700w deletes this registry value.

    WirelessCarrier = RegRead("HKLM", "System\State\Phone", "Current Operator Name")
  3.    #3  
    Quote Originally Posted by hannip View Post
    Note that when the phone is off the 700w deletes this registry value.

    WirelessCarrier = RegRead("HKLM", "System\State\Phone", "Current Operator Name")
    Thanks. Updated initial post to rev 0.b.

    BTW, what's the best way to attack this? All-encompassing subroutine with Mfg, Style, Model SubSubSub routines. Exit sub when find a "hit"?

    -- JDC
  4. #4  
    Maybe have it create an ini with all of the values you are printing out in BigMessage for reference. Too bad we don't have environment variables.
  5.    #5  
    Quote Originally Posted by hannip View Post
    Maybe have it create an ini with all of the values you are printing out in BigMessage for reference. Too bad we don't have environment variables.
    Yeah, run the util once... have it create a standard ini:

    MortEnvars.ini
    [Platform]
    DeviceMfg = "Palm"
    Device = "Treo 700w"
    DeviceStyle = "Treo"
    DeviceModel = "700w"
    WirelessCarrier = "Verizon Wireless"
  6. #6  
    Quote Originally Posted by jdcochran View Post

    Then test and upload your results here.
    Seems to detect my 700w just fine. I can't believe there is not a really, really simple way to do this.

    Is there a system file we need to look at?
    Attached Images Attached Images
  7. #7  
    well i kind of worked for me. i am using the sprint 700wx

  8.    #8  
    Quote Originally Posted by codyppc View Post
    well i kind of worked for me. i am using the sprint 700wx

    uhoh... same driver. help?
  9. #9  
    Quote Originally Posted by jdcochran View Post
    uhoh... same driver. help?
    Hey jdcochran, here's an idea you can ignore it if you like. I had to implement something similar for Tweakster in order to allow for "compatibility checks" for device-specific tweaks. I'm not trying to push my ideas or code, egos seem easily bruised around here, and there's always more than one way to skin a cat

    Since there doesn't seem to be any standard way to identify the model via the registry, I created a devices.ini file that allows you to define models by specifying a set of registry keys, and matching strings. If ALL of the registry keys have matched...

    [Sprint 700wx]
    HKLM\Software\Palm\Version|SoftwareVersionString, *TREO700WX*
    HKLM\Drivers\USB\FunctionDrivers\Serial_Class|Product, *Treo 700w*
    HKLM\Software\Palm\Version|SoftwareVersionString, *SPNT*

    ...then you have found your model.

    This allows for sophisticated checks and allows for slight differentiation between very similar models. Once you've found the model, you can cache the results in the same .ini file or a different file. And as new models are tried out, you just edit the .ini file to add another model. Of course, the second half of the problem is WHAT to do once you know the model, lol.
  10.    #10  
    Quote Originally Posted by zbop View Post
    Hey jdcochran, here's an idea you can ignore it if you like. I had to implement something similar for Tweakster in order to allow for "compatibility checks" for device-specific tweaks. I'm not trying to push my ideas or code, egos seem easily bruised around here, and there's always more than one way to skin a cat

    Since there doesn't seem to be any standard way to identify the model via the registry, I created a devices.ini file that allows you to define models by specifying a set of registry keys, and matching strings. If ALL of the registry keys have matched...

    [Sprint 700wx]
    HKLM\Software\Palm\Version|SoftwareVersionString, *TREO700WX*
    HKLM\Drivers\USB\FunctionDrivers\Serial_Class|Product, *Treo 700w*
    HKLM\Software\Palm\Version|SoftwareVersionString, *SPNT*

    ...then you have found your model.

    This allows for sophisticated checks and allows for slight differentiation between very similar models. Once you've found the model, you can cache the results in the same .ini file or a different file. And as new models are tried out, you just edit the .ini file to add another model. Of course, the second half of the problem is WHAT to do once you know the model, lol.
    Ego? What's that? My ex wife stomped on mine years ago.

    Ignore? The only thing I ignore is ignorance.

    This is the type of info that I'm looking for.

    What are the secrets to the other models? I can only test the Verizon 700w and I've created a code section that does not difinitevely identify the 700w vs. the 700wx.

    Also, surely someone with a WM SDK can finger out a simple routine to extract the info that is stuffed in the Settings, Systen, About, Phone page.

    Where does this info originate?

    -- JDC
    Last edited by jdcochran; 04/01/2007 at 12:52 PM.
  11. #11  
    Quote Originally Posted by jdcochran View Post
    Ego? What's that? My ex wife stomped on mine years ago.

    Ignore? The only thing I ignore is ignorance.

    This is the type of info that I'm looking for.

    What are the secrets to the other models? I can only test the Verizon 700w and I've created a code section that does not difinitevely identify the 700w vs. the 700wx.

    Also, surely someone with a WM SDK can finger out a simple routine to extract the info that is stuffed in the Settings, Systen, About, Phone page.

    Where does this info originate?

    -- JDC
    Unforunately, I can only afford one Treo, so that's all I have

    If I had to guess, I would bet that it is stamped somewhere in a dll or control panel at build time, but that's just a guess. Maybe hannip knows...

    Or you could ask over at xda-developers, you'd probably get a quicker answer there.
  12.    #12  
    BTW, I've been resisting installing your very eloquent tweakster app because I KNOW I'd go off on a 2-month tangent and I need to focus on finishing other things.

    - JDC
  13. #13  
    Quote Originally Posted by jdcochran View Post
    BTW, I've been resisting installing your very eloquent tweakster app because I KNOW I'd go off on a 2-month tangent and I need to focus on finishing other things.

    - JDC
    Heh, yeah I know all about tangents, that thing has sorta turned into a beast, started out real simple and you keep saying to yourself "just one more thing..."

Posting Permissions