Jump to content

The MoDaCo Developer Challenge: Win an i-mate JAQ3!


Recommended Posts

Guest dan.ardelean
Posted

As both function have the same prototype I copied a piece of code and forgot to modify. The v0.0.3 should give real results. Tonight, if I have time, I will make a procedure that calls all the functions and logs to a file. Till then... the modified exe

RilTest_v0.0.3.zip

P.S. The AT Command would be the most generic solution (should work on all modems), the difficult part is to find the interface to send AT Commands to the modem (maybe using the VSP returned by RIL or RIL_RegisterATCommandLogging but I have to try it). I also have to try the notification part of the RIL.

Guest Paul (MVP)
Posted

With that version:

SignalStrength: -77

MinSignalStrength: -113

Max: SignalStrength: -51

BitErrorRate: 4294967295

LowSignalStrength: -110

High: SignalStrength: -60

No idea what they mean :D

The 4294967295 value (FFFFFFFF) worries me a bit tho :)

P

Guest dan.ardelean
Posted

BitErrorRate Bit error rate in 1/100 of a percent. Must be one of the bit error rate constants

#define RIL_BITERRORRATE_UNKNOWN (0xffffffff)

Guest dan.ardelean
Posted

As I've promised I am sending a new version. In the menu there is a new option to log the results to a file.

You can download and try the new version here:

RilTest_v0.0.4.zip

In this version you will get the OOPS error if the RIL cannot be initialized or if the command is not implemented. You will get a Timeout error if I don't get an answer before the timeout I've set (now it's static set to 4 seconds). If I don't get the RESULT_OK you will see the error and finally if I have no errors you will see what the function returned.

On my Spv C600 I got the following results:

operatortLongName

LongName: I WIND

ShortName: NA/REQ

NumName: NA/REQ

CountryCode: NA/REQ

operatortShortName

LongName: NA/REQ

ShortName: I WIND

NumName: NA/REQ

CountryCode: NA/REQ

operatortNumName

LongName: WIND

ShortName: NA/REQ

NumName: 22288

CountryCode: IT

cellTowerInfo

MobileCountryCode: NA/REQ

MobileNetworkCode: NA/REQ

LocationAreaCode: 10052

CellID: 40628

RxLevel: NA/REQ

RxQuality: NA/REQ

signalStrength

SignalStrength: -51

MinSignalStrength: -113

MaxSignalStrength: -51

BitErrorRate: 4294967295

LowSignalStrength: -110

HighSignalStrength: -60

Now I can think we can re-run the tests. Sorry Paul for the errors I had in the previous versions.

Guest Craig B
Posted

Hi,

Dopod 838Pro (HTC Hermes 100) results using 0.0.4:

operatortLongName

LongName: Telstra Mobile C

ShortName: NA/REQ

NumName: NA/REQ

CountryCode: NA/REQ

operatortShortName

LongName: NA/REQ

ShortName: M-NET

NumName: NA/REQ

CountryCode: NA/REQ

operatortNumName

LongName: Telstra sux ass

ShortName: NA/REQ

NumName: 50501

CountryCode: NA/REQ

cellTowerInfo

MobileCountryCode: NA/REQ

MobileNetworkCode: NA/REQ

LocationAreaCode: 276

CellID: 8971

RxLevel: NA/REQ

RxQuality: NA/REQ

signalStrength

SignalStrength: -43

MinSignalStrength: -113

MaxSignalStrength: -51

BitErrorRate: 4294967295

LowSignalStrength: -110

HighSignalStrength: -60

Note that the operatortNumName/LongName has come from the registry change I have mode myself.

C

Guest dan.ardelean
Posted

Guys I am available to improve the library, but I would need feedback. Paul, if you have time could you test it on the devices it was not working?

  • 2 weeks later...
Guest dan.ardelean
Posted

I had a request from a user to use the functions from a library. Attached you will find a demo project that uses RilWrapper.dll (a library that I created) and of course RilWrapper.dll. I think that we are at a good point but I would really appreciate further tests (I tested on the devices I have)

Have Fun,

Dan

RilTest.zip

Guest Paul (MVP)
Posted

I am away for a few days, but will give it a thorough test when I return!

P

  • 2 weeks later...
Guest dan.ardelean
Posted

Paul any news for the tests?

Thanks

Guest Paul (MVP)
Posted

I'm now back from holiday and will be having a play ;)

P

Guest rasikha
Posted
I had a request from a user to use the functions from a library. Attached you will find a demo project that uses RilWrapper.dll (a library that I created) and of course RilWrapper.dll. I think that we are at a good point but I would really appreciate further tests (I tested on the devices I have)

Have Fun,

Dan

RilTest.zip

  • 2 weeks later...
Guest dan.ardelean
Posted

Paul is the contest dead? No feedback for a while

Regards,

Dan

Guest euan macinnes
Posted

here's a memory-based approach to it, currently done for the HTC Wizard/O2 XDA Mini S. I'll be adding in device-customisations and selections of different methods depending on phone types and models etc.. there's also a remote memory browser included to help with locating the right data. The visual studio TEST priviledged certificate may be required.

These are currently compiled as test applications, rather than components, but the memory browser is implemented as dynamic pointers, so it's not a fixed record structure. The goal is to eventually create an XML definitions file that contains the relevant version-specific details for phones.

There's an issue with IsBadReadPtr at the moment, as this is entirely managed C#, seems to not apply properly to kernel memory, or I've just declared it wrong:

[DllImport("coredll.dll")]

extern public static Boolean IsBadReadPtr(byte* lp, UInt32 ucb);

so if you put in an invalid memory address, then the app will just quit out currently.

Please let me know if you can get it to work on any HTC Wizard you have available. Other phones aren't configured here at the moment and probably won't work at the moment, although I'm working on getting the XML config file up early next week.

The app uses AT commands on COM 9 for the most part to get the base details, but then gets all the neighbouring cells through memory decoding. (RIL_GetCellTowerInfo isn't implemented on any HTC phone).

For the memory viewer, here's a brief intro:

IP Address: of the Windows XP machine running MemViewSvr.

Starting Address: memory address to start scanning (tick the HEX box to enter the value in HEX, leave blank for decimal)

Range: Number of bytes to scan (again in either hex or decimal)

Value: Double-byte value to scan for (either hex or decimal)

Pressing Connect & Scan will connect to the Server application, scan the memory, and then dump out addresses of any values if it finds. If it doesn't find anything, then nothing much will happen. Some phone details are also decoded via AT commands, like serving CellID, to give hex values to scan for.

Pressing Connect & Report dumps the entire memory (assuming it's readable), over to the server. The "Value" to scan for is ignored.

For HEX values, don't put any formatting, just the value in hex, i.e. FFC5 will do. Don't get confused by the byte order. If the server shows Cell ID D5C2, then scan for D5C2, however the memory report will show these bytes coming up as C2 D5, due to how it's actually stored in memory. The funny squiggly characters at the end are the ASCII characters representing the same bytes.

Expect lots of ranges to come up for a CellID, however if scanning for serving cell, there will be two instances of that within 200 or so bytes of each other to help narrow down the search a lot.

MoDaCo_CellZone_early_test.rar

  • 2 weeks later...
Guest carpenter
Posted

very nice work!!

I have a question; using RIL_getcelltowerinfo, can you get the Timing Advance value?

its calculated for the current cell and (am not sure) only during a call (when you have a dedicated channel).

regards,

jim.

Guest dan.ardelean
Posted

As the contest seems quite dead I am publishing the source code of my work. Initially I intended to publish the source code after the winner of the contest was choosen cause it took me 3 days of work to get all the data I needed and to get it better it's just a matter of time and not knowledge anymore. Hope you will make use of it.

RilTest.zip

Guest euan macinnes
Posted
very nice work!!

I have a question; using RIL_getcelltowerinfo, can you get the Timing Advance value?

its calculated for the current cell and (am not sure) only during a call (when you have a dedicated channel).

regards,

jim.

The TA is calculated by the serving BTS and transmitted to the MS during the lifetime of a connection, so you'll only get it under the scenarios you mention. "Idle" mode will not have TA available.

Guest Paul (MVP)
Posted

I think in the context of the contest, dan.ardelean is closest to being the winner, and is most deserving of the prize... and as a group we can refine and improve his work perhaps by implementing fall back to other methods for when his fails.

Any objections to awarding Dan the prize and working as a team to develop this?

P

Guest Erwin Wernsen
Posted

Hi Dan,

For what I can read from the sources you use rill.dll and wrap it in a c# interface. What is the rill.dll? Is it a standard dll from microsoft or did you develop it yourself. If so, would you be kind enough to share the source for that as well?

regards,

Erwin

P.S. Paul, I would love to cooperate with further developing the component but as a Java developer my contribution might be limited to testing :-)

Guest dan.ardelean
Posted

To understand better what is RIL you will have to read the attached document (I don't think that there will be copyright problems as I found the document on the web)

RIL_whitepaper_MS_Intrinsyc_June2004_1_.pdf

You would also need an updated ril.h from the CE 6.0 Platform Builder (the one you find on xda-developers or other site is old and it misses some parts).

ril.zip

To understand what every function does you will have to use the MSDN Library website and the newly published documentation for CellCore

MSDN CellCore

Guest johncody
Posted

Being a VB.NET programmer, I was glad to see one of the goals of the contest to be "Create a component that can be used in a VB.net".

Would it be possible for Dan or Evan to make up a simply smartphone demo app in VB.Net to demonstration their solution?

Guest euan macinnes
Posted (edited)
I think in the context of the contest, dan.ardelean is closest to being the winner, and is most deserving of the prize... and as a group we can refine and improve his work perhaps by implementing fall back to other methods for when his fails.

Any objections to awarding Dan the prize and working as a team to develop this?

P

sounds fine. Happy to move it forward anyway.

from some of the work here, I'm thinking AT commands and COM ports are probably the first port of call (no pun intended), falling back to RIL and then memory reading. Main reason for that is that COM port reading doesn't require privileged certs, whereas RIL and memory reading will (at least on the phones here). AT+CSQ retrieves the RSSI, and AT+CREG=2 AT+CREG? retrieves the current serving cell and LAC. AT+CCED will retrieve all relevant tower information (including neighbours) on Wavecomm stacks, but seemingly no others. I'm still working out how GSMTestMode.exe does it, it does use RIL to retrieve info, but must be some internal-to-HTC Device-specific commands.

The IMEI and a few registry entries should be sufficient for model/version identification, and some kind of SOAP webservice to house all that, rather than a downloadable database, something the phone can one-time connect to over WiFi or ActiveSync (or GPRS if nobody minded the one-time bill).

As far as discovering the memory location on phones goes, I'm looking to adjust the memory reader, based on the source for pmemdump, to figure out the memory locations for the kernel DLL containing the signal data, that will then search for the two locations inside that DLL that must have the serving cell, within 256 bytes of each other, and then dump that area +- 4kb to a text file so that these can be posted online, and categorised automatically from the uploaded IMEI/OS version numbers.

Edited by euan macinnes
Guest euan macinnes
Posted
Being a VB.NET programmer, I was glad to see one of the goals of the contest to be "Create a component that can be used in a VB.net".

Would it be possible for Dan or Evan to make up a simply smartphone demo app in VB.Net to demonstration their solution?

If I post it up as a .NET assembly, you should be able to use it in VB.Net, will that suffice? I'll need to parameterise the memory reading stuff, but I've merged in Dan's RIL code as well, so it'll all be accessible from VB.Net.

Guest johncody
Posted
If I post it up as a .NET assembly, you should be able to use it in VB.Net, will that suffice?

Sure will ;)

but I've merged in Dan's RIL code as well, so it'll all be accessible from VB.Net.

Question: Will the merged code from Dan then require your solution to only work with Compact Framework 2.0? Meaning, Smartphones (non-touch screen devices) using WM 2003 can NOT load compact framework 2.0 onto them. So, any solution that requires CF2.0 can only work on WM5 and higher smartphones.

Guest Paul (MVP)
Posted
If I post it up as a .NET assembly, you should be able to use it in VB.Net, will that suffice? I'll need to parameterise the memory reading stuff, but I've merged in Dan's RIL code as well, so it'll all be accessible from VB.Net.

Great!

Sounds like I might be needing 2 JAQ3s, heh...

P


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.