Available for a limited time only - £5 off a £20 spend at eXpansys! For more details visit this topic!

Please Log In or Register - it's FREE!

6 Pages V  « < 4 5 6  
Reply to this topicStart new topic
 The MoDaCo Developer Challenge: Win an i-mate JAQ3!
euan macinnes
post Apr 17 2007, 14:23
Post #101


Newbie
Group Icon

Group: Posters
Posts: 21
Joined: 27th February 2007
From: Singapore
Member No.: 233,626

Device(s): HTC Wizard, Dopod 838 Pro



QUOTE(johncody @ Apr 17 2007, 12:33) *
Ok, heres what I got so far:
==========================================================
Module CellInfo
Public Declare Function InitialiseRIL Lib "syncril.dll" () As Integer
Public Declare Function UpdateRIL Lib "syncril.dll" () As Integer
Public Declare Function GetCellID Lib "syncril.dll" () As Integer
Public Declare Function GetSignalQuality Lib "syncril.dll" () As Integer
Public Declare Sub FinaliseRIL Lib "syncril.dll" ()
End Module


Private Sub Refresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuItem2.Click
Dim R As Integer

R = InitialiseRIL()
If R <> 0 Then
MsgBox("InitialiseRIL <> 0: " & CStr®)
Exit Sub
End If

R = UpdateRIL()
If R <> 0 Then
MsgBox("UpdateRIL <> 0: " & CStr®)
Exit Sub
End If

'lblTowerID.Text = GetCellID.ToString
'lblSignal.Text = GetSignalQuality.ToString

Call FinaliseRIL()
MsgBox("Done!")
End Sub
==========================================================

I get a InitializeRIL <> 0: 2147467259 error sad.gif


Ok, well, it's not the problem, but to prevent something later, the return types of Initialise and Update should be Long in VB, as a long is 64 bits, whereas Integer is 32 bits only.

Once that's corrected, we'll get the right return value and see if that comes out any different. It won't make it work, but it'll present the right return value, and therefore error code for what's wrong.

Looking at the RIL code, it's expecting some sort of port number as well, maybe the next thing to try would be a port number parameter to try different RIL ports? The general feel from looking up the problem though is that there's some sort of signing/cert problem/phone unlocking problem though, which is why a non-0 value is being returned.

See: http://forum.xda-developers.com/showthread.php?t=218911

Based on the RIL_Initialize layout in MS' website: http://msdn2.microsoft.com/en-us/library/aa919106.aspx



This is definitely working on the PocketPC though, on both the Wizard and the TyTN, so there's something about the smartphone implementation that's a little different here.

Next step will be to take the serial port version and try that, as that seems to have greater reports of success from SP2003 editions. I've made it into a library today, I'll post up an example tomorrow.

In the meantime, I could use some input on using the SP2003 emulator, the publishing doesn't seem to copy over the syncril.dll properly, how do I copy over a file to it manually? The pocketPC bit is easier as there's a File Explorer already and I can share a folder, but the SP emulator doens't seem to have any options for that blink.gif


This post has been edited by euan macinnes: Apr 17 2007, 14:36
Go to the top of the page
 
+Quote Post
johncody
post Apr 17 2007, 17:27
Post #102


Regular
Group Icon

Group: Posters
Posts: 105
Joined: 12th May 2003
From: New York, NY USA
Member No.: 6,041

Device(s): HTC Dash



QUOTE(euan macinnes @ Apr 17 2007, 10:23) *
Ok, well, it's not the problem, but to prevent something later, the return types of Initialise and Update should be Long in VB, as a long is 64 bits, whereas Integer is 32 bits only.

Once that's corrected, we'll get the right return value and see if that comes out any different. It won't make it work, but it'll present the right return value, and therefore error code for what's wrong.

Looking at the RIL code, it's expecting some sort of port number as well, maybe the next thing to try would be a port number parameter to try different RIL ports? The general feel from looking up the problem though is that there's some sort of signing/cert problem/phone unlocking problem though, which is why a non-0 value is being returned.

See: http://forum.xda-developers.com/showthread.php?t=218911

Based on the RIL_Initialize layout in MS' website: http://msdn2.microsoft.com/en-us/library/aa919106.aspx
This is definitely working on the PocketPC though, on both the Wizard and the TyTN, so there's something about the smartphone implementation that's a little different here.

Next step will be to take the serial port version and try that, as that seems to have greater reports of success from SP2003 editions. I've made it into a library today, I'll post up an example tomorrow.

In the meantime, I could use some input on using the SP2003 emulator, the publishing doesn't seem to copy over the syncril.dll properly, how do I copy over a file to it manually? The pocketPC bit is easier as there's a File Explorer already and I can share a folder, but the SP emulator doens't seem to have any options for that blink.gif


When I change the declare to "Long" from Integer (and also the "R" var) , I get a "NotSupportedException" when I try to do the InitialiseRIL.

OK, using the SP2003 emulator from VS2005 is realtively easy, just do these steps:

1) Disconnect any device currently connected to ActiveSync so activesync goes to sleep.
2) Open ActiveSync's (AS) "Communication Settings" and check the "Allow connections to one fo the following" - Then select "DMA".
3) In VS2005, select "Tools...Device Emulator Manager" and select the "Smartphone 2003 SE Emulator". Right click on it and select "Connect" which will open/run the emulator.
4) Right click on "Smartphone 2003 SE Emulator" again and select "Cradle".
5) This will now cause Activesync to awaken and connect to the emulator as if it was a real device. You should then be able to use AS's file explorer to copy files to the device.

-John


This post has been edited by johncody: Apr 17 2007, 17:41


--------------------
-John Cody
Go to the top of the page
 
+Quote Post
euan macinnes
post Apr 18 2007, 05:13
Post #103


Newbie
Group Icon

Group: Posters
Posts: 21
Joined: 27th February 2007
From: Singapore
Member No.: 233,626

Device(s): HTC Wizard, Dopod 838 Pro



QUOTE(johncody @ Apr 17 2007, 17:27) *
When I change the declare to "Long" from Integer (and also the "R" var) , I get a "NotSupportedException" when I try to do the InitialiseRIL.

OK, using the SP2003 emulator from VS2005 is realtively easy, just do these steps:

1) Disconnect any device currently connected to ActiveSync so activesync goes to sleep.
2) Open ActiveSync's (AS) "Communication Settings" and check the "Allow connections to one fo the following" - Then select "DMA".
3) In VS2005, select "Tools...Device Emulator Manager" and select the "Smartphone 2003 SE Emulator". Right click on it and select "Connect" which will open/run the emulator.
4) Right click on "Smartphone 2003 SE Emulator" again and select "Cradle".
5) This will now cause Activesync to awaken and connect to the emulator as if it was a real device. You should then be able to use AS's file explorer to copy files to the device.

-John


Ok thanks, got the emulator connected.

The emulator is driving me crazy. I keep getting a NotSupportedException error, even on a completely empty function in the DLL, but only in the Smartphone emulator, the PocketPC stuff is again Ok and works as expected. The test function does nothing, no return values, no parameters. Any ideas why? does the DLL need to be in a specific location (other than Windows, or the same folder as the app) for it to be found? It's not likely a P/Invoke restriction, as the serial port commands use that, and they don't cause that error.
Go to the top of the page
 
+Quote Post
johncody
post Apr 18 2007, 12:32
Post #104


Regular
Group Icon

Group: Posters
Posts: 105
Joined: 12th May 2003
From: New York, NY USA
Member No.: 6,041

Device(s): HTC Dash



QUOTE(euan macinnes @ Apr 18 2007, 01:13) *
Ok thanks, got the emulator connected.

The emulator is driving me crazy. I keep getting a NotSupportedException error, even on a completely empty function in the DLL, but only in the Smartphone emulator, the PocketPC stuff is again Ok and works as expected. The test function does nothing, no return values, no parameters. Any ideas why? does the DLL need to be in a specific location (other than Windows, or the same folder as the app) for it to be found? It's not likely a P/Invoke restriction, as the serial port commands use that, and they don't cause that error.


The radio functions may not be fully implemented in the SP2003 emulator - I don't think MS put a lot of work into that section of this [older] emulator.

As far as the location to put the file, it should be "\Storage\Windows". There are actually two "\windows" directory. The "\Windows" off of the root just contains ROM files built-into the phone - you can place files there, but when the phone is powered off, they will be erased. The "\Storage\Windows" directory is persistant and is basically treated the same as "\windows" to the OS for all intent and purpose.

I have a real SP2003 device, so if there is any testing I can do on it to help you figure out real-world operations, please let me know.
Go to the top of the page
 
+Quote Post
euan macinnes
post Apr 23 2007, 01:29
Post #105


Newbie
Group Icon

Group: Posters
Posts: 21
Joined: 27th February 2007
From: Singapore
Member No.: 233,626

Device(s): HTC Wizard, Dopod 838 Pro



QUOTE(johncody @ Apr 18 2007, 12:32) *
The radio functions may not be fully implemented in the SP2003 emulator - I don't think MS put a lot of work into that section of this [older] emulator.

As far as the location to put the file, it should be "\Storage\Windows". There are actually two "\windows" directory. The "\Windows" off of the root just contains ROM files built-into the phone - you can place files there, but when the phone is powered off, they will be erased. The "\Storage\Windows" directory is persistant and is basically treated the same as "\windows" to the OS for all intent and purpose.

I have a real SP2003 device, so if there is any testing I can do on it to help you figure out real-world operations, please let me know.


I'll be busy for the next week on work issues, (I do get to work on this during office hours, but my primary mission is the engineering app for Windows CE 5.0 and the applications behind it, I'm actually working on a network-based solution for this and using the phone app as a test solution), but will see what I can do with it. My C++ is a little limited though, I'll have to do some more research on why the RIL isn't activating, as it's clear that the call is working for you, but RIL just isn't responding with a valid handle.
Go to the top of the page
 
+Quote Post
Dick Heuser
post May 22 2007, 15:54
Post #106


Newbie
Group Icon

Group: Posters
Posts: 8
Joined: 20th May 2007
From: Fremont, Ca, USA
Member No.: 258,291

Device(s): Cingular Blackjack, 8525



I have downloaded this Library and found that it works well. It has taught me a lot about how to access RIL and other unmanaged code from managed code. I have added a couple of more API calls to RIL including EquipmentInfo and SubscriberNumbers.
QUOTE(dan.ardelean @ Apr 10 2007, 07:26) *
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.

[attachment=21304:RilTest.zip]


--------------------

Richard L. Heuser
310 Tumbleweed Court
Fremont, Ca 94539
510-490-2339 office
510-219-7701 mobile
rheuser@cadorian.com




Go to the top of the page
 
+Quote Post
Dick Heuser
post May 22 2007, 16:11
Post #107


Newbie
Group Icon

Group: Posters
Posts: 8
Joined: 20th May 2007
From: Fremont, Ca, USA
Member No.: 258,291

Device(s): Cingular Blackjack, 8525



QUOTE(dan.ardelean @ Apr 10 2007, 06:26) *
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.

[attachment=21304:RilTest.zip]

I have spent the last two days working with your RilTest code posted on April 10, 2007 to learn how to access Ril facilities from managed code. It has been extremely helpful. Thank you. The code is excellent and I have learned a lot from it.

It works well on my Cingular 8525 and Blackjack.

I have added calls to EquipmentInfo and SubscriberNumbers. They are both working but I am having some difficulty in figuring out how to handle the Marshalling of the RILADDRESS that is embedded in the RILSUBSCRIBERINFO, ie, a Struct within a Struct. Would you be willing to take a look at what I have done to determine how I should fix it?
Go to the top of the page
 
+Quote Post
Dick Heuser
post May 22 2007, 19:19
Post #108


Newbie
Group Icon

Group: Posters
Posts: 8
Joined: 20th May 2007
From: Fremont, Ca, USA
Member No.: 258,291

Device(s): Cingular Blackjack, 8525



QUOTE(dan.ardelean @ Apr 10 2007, 06:26) *
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.

[attachment=21304:RilTest.zip]

I have attached the copy of your Riltest code which I have updated adding support for calls to EquipmentInfo and SubscriberNumbers. I was after Serial number and the Subscriber Address or phone number. I am getting that information but I do not know how to preperly handle the RILADDRESS structure that is embedded in the RILSUBSCRIBERINFOstructure. I jury rigged a way around my ignorance but I would love to know the right way to handle this kind of a data structure. Thanks for you terrific code and your help.

Attached File(s)
Attached File  RilTest_2007_5_22.zip ( 154.08K ) Number of downloads: 194
 
Go to the top of the page
 
+Quote Post
Dick Heuser
post May 22 2007, 19:25
Post #109


Newbie
Group Icon

Group: Posters
Posts: 8
Joined: 20th May 2007
From: Fremont, Ca, USA
Member No.: 258,291

Device(s): Cingular Blackjack, 8525



I have attached the copy of your Riltest code which I have updated adding support for calls to EquipmentInfo and SubscriberNumbers. I was after Serial number and the Subscriber Address or phone number. I am getting that information but I do not know how to preperly handle the RILADDRESS structure that is embedded in the RILSUBSCRIBERINFOstructure. I jury rigged a way around my ignorance but I would love to know the right way to handle this kind of a data structure. Thanks for you terrific code and your help.
Attached File(s)
Attached File  RilTest_2007_5_22.zip ( 154.08K ) Number of downloads: 127
 
Go to the top of the page
 
+Quote Post
Dick Heuser
post May 23 2007, 05:38
Post #110


Newbie
Group Icon

Group: Posters
Posts: 8
Joined: 20th May 2007
From: Fremont, Ca, USA
Member No.: 258,291

Device(s): Cingular Blackjack, 8525



QUOTE(dan.ardelean @ Apr 10 2007, 06:26) *
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.

[attachment=21304:RilTest.zip]


I have downloaded this library and found that it works well on both my Cingular 8525 and my Samsung Blackjack.

I have attached the copy of your Riltest code which I have updated adding support for calls to EquipmentInfo and SubscriberNumbers. I was after Serial number and the Subscriber Address or phone number. I am getting that information but I do not know how to preperly handle the RILADDRESS structure that is embedded in the RILSUBSCRIBERINFOstructure. I jury rigged a way around my ignorance but I would love to know the right way to handle this kind of a data structure. Thanks for you terrific code and your help.

Attached File(s)
Attached File  RilTest_2007_5_22.zip ( 154.08K ) Number of downloads: 252
 
Go to the top of the page
 
+Quote Post
Dick Heuser
post Jun 15 2007, 08:00
Post #111


Newbie
Group Icon

Group: Posters
Posts: 8
Joined: 20th May 2007
From: Fremont, Ca, USA
Member No.: 258,291

Device(s): Cingular Blackjack, 8525



QUOTE(dan.ardelean @ Apr 10 2007, 07:26) *
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.

[attachment=21304:RilTest.zip]



I have developed an app using your Riltest as a guide that gets Cell Tower info and Gets Cell Tower info on Notify of a change. It works quite well for a PocketPC based Phone. However, for a Smartphone it fails on the GetCellTowerInfo but the Notifies work just fine. Do you have any idea from your experience what I might be doing wrong.
Go to the top of the page
 
+Quote Post
b0ris747
post Jul 8 2007, 23:52
Post #112


Newbie
Group Icon

Group: Posters
Posts: 2
Joined: 5th July 2007
From: France
Member No.: 274,291

Device(s): Beetle, Magician, Prophet



QUOTE(Paul (MVP) @ Jan 17 2007, 20:53) *
[attachment=20779:attachment]

We've done Developer Challenges before on MoDaCo and they've always been a great success... so i'm proud to announce another one! This one raises the bar somewhat however smile.gif
...


After some work, I submit my DLL, with C# application and C++ application

The C# side is just a PoC to show it is compatible. The C++ side is more complete, and implements some offset finder, a learning mode and others feats.

You can manually edit the cellguardian.xml file to set a new configuration for your device (which include compatible methods to access CellID Informations, the AT Commands COM port, the offset in memory...)

By default, it will try to determine the best method to use on your device.

On the website you'll see some generated Google Maps made using this application.

http://usuc.dyndns.org/tv/gsm/

Thanks for feedbacks, or new configuration submission.    rolleyes.gif
Go to the top of the page
 
+Quote Post
b0ris747
post Aug 7 2007, 10:06
Post #113


Newbie
Group Icon

Group: Posters
Posts: 2
Joined: 5th July 2007
From: France
Member No.: 274,291

Device(s): Beetle, Magician, Prophet



Nobody tested this one?  sad.... It means NO configuration improvement

The current version has only a few bugs
-offset method only recognizes "ALL" version
-the fieldTest compatible version does not work (no device to try, need some debug traces to determine the structure of the RIL answer)
-Mio devices were not tested, a RIL subclass should be done later

Any way, this application should be able to give cell informations for most HTC devices under WM5.

I'd like someone to try this!

Works on (tested):
Prophet/Wizard: RIL GSMTestMode, Offset, COM Port on COM9:, RIL Notifications and RIL Tower
HP ipaq 6910: Offset

I hope to have some feedbacks!



QUOTE(b0ris747 @ Jul 8 2007, 23:52) *
After some work, I submit my DLL, with C# application and C++ application

The C# side is just a PoC to show it is compatible. The C++ side is more complete, and implements some offset finder, a learning mode and others feats.

You can manually edit the cellguardian.xml file to set a new configuration for your device (which include compatible methods to access CellID Informations, the AT Commands COM port, the offset in memory...)

By default, it will try to determine the best method to use on your device.

On the website you'll see some generated Google Maps made using this application.

http://usuc.dyndns.org/tv/gsm/

Thanks for feedbacks, or new configuration submission.    rolleyes.gif
Go to the top of the page
 
+Quote Post
dan.ardelean
post Jan 11 2008, 15:15
Post #114


Newbie
Group Icon

Group: Posters
Posts: 28
Joined: 17th January 2006
Member No.: 167,893

Device(s): SPV C600



Paul any winner for the contest?
Go to the top of the page
 
+Quote Post
abramQ
post May 4 2008, 00:47
Post #115


Newbie
Group Icon

Group: Posters
Posts: 14
Joined: 24th December 2006
Member No.: 219,250



QUOTE(dan.ardelean @ Apr 10 2007, 15:26) *
Hope you will make use of it.


Hello Dan!

I am trying to use your nice work, but please tell me - is it possible to list more than one CellID? I mean like in old CellTrack - where was all visible cells (eight of them as I remember) shown.
Please answer:-)

Thanks in advance!
RA
Go to the top of the page
 
+Quote Post
dan.ardelean
post Aug 13 2008, 15:44
Post #116


Newbie
Group Icon

Group: Posters
Posts: 28
Joined: 17th January 2006
Member No.: 167,893

Device(s): SPV C600



abram I only saw your message today. If you are still interested I will take a look and let you know

Regards,
Dan
Go to the top of the page
 
+Quote Post

6 Pages V  « < 4 5 6
Reply to this topicStart new topic
Tags
No Tag inserted yet


Collapse

Similar Topics

  Topic Replies Topic Starter Views Last Action
No new Dont try this at home !!, alone or unsupervised!
29 bigdaddykane 2,180 Today, 11:06
Last post by: bene elim
No New Posts Topic has attachmentscannot Open .zip files??!!
5 cooleydan5 117 Today, 10:23
Last post by: NateLiu
No new Topic has attachmentsAdrynlyne has done it again! Check this Gps fix out
83 bga7x 4,002 Today, 06:45
Last post by: Junoman
No new New Nordic ROM (more languages, incl. English!)
Expert's help needed to flash
16 tibor22 708 Today, 16:43
Last post by: tibor22
No New Posts When will the Omnia have the universal charge connector?
6 Laoyumi 223 Today, 08:27
Last post by: Adrynalyne
No New Posts How to access the Preconfiguration menu in Vodafone branded phones.
In case you were searching all over Modaco and Google (like me) and yo
1 Polemos 35 Today, 13:45
Last post by: Linkman

1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 


RSS hit counter Lo-Fi Version Time is now: 4th July 2009 - 17:25

Please visit our 'Plus Partners' - these companies support MoDaCo through 'MoDaCo Plus' - Click Here for more details!

ActiveKitten | Aiko Solutions | Ateksoft | Binaryfish | Conduits | DeveloperOne | eSoft Interactive | FTouchSL | Inesoft | Lingvosoft |

monocube | Mykesoft | OmegaOne | Omnisoft | Opera Software | Resco | SBSH | Slipstream Solutions | SPB Software House |

Splashdata | Sprite Software | Syncdata | Teksoft | VITO | WalkingHotSpot | WebIS | z4soft

Would your company like to become a 'Plus Partner'? Click Here to contact us!