starting a process on incoming call and stopping when the call is answered - Windows Mobile Development and Hacking General

Hi,
I am trying to write a small application for my WM6 phone device.
What I intend to do is :
- write the application in c#
- it will be a background application (daemon)
- starting to blink leds of my phone (I have a dll which I know how to call from within a C# app)
- stopping this process when the call is answered or the ringing state is passed
- no forms will be used (as it will be a background application which will only play with leds)
- when the exe is called a second time , it should disable itself
Unfortunately, I could not succeed a few months ago as seen here :
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2454023&SiteID=1
Then , I had some other issues to deal with and left the project. Now I want to start over, fresh...
However, I am not sure of what is the most acceptable solution for this.
As I do not want to load the CPU or memory with unneccessary processes, I want to be able to do it correctly.
Could someone show me the path ?
Please take a look at the thread that I gave the URL above. At that time we discussed this but I couldn't achieve it.
Thanks for any help, comments...

SystemState class seems to only work if you have a form based application. Which is silly I know. Basically the only solution is do dump the daemon idea and have a form based app but hide the form.

thanks for your reply.
what do you mean by "dump the daemon idea" ? do you mean I shouldn't use it ?
if I create a form based app and hide the form, which method should I use to start the process when phone starts ringing ?
p.s : english is not my native language so I may misunderstand some phrases.

yes he means forget the daemon..and i recommend using C++ as it uses less system resources plus its fast .. im currently developing my first Kitchen in C++ if u want i can work with you also

I agree with you; of course c++ is faster but it's not as easy as c#.
what do you mean by kitchen ?
I would like to work with you but my intention is just creating a simple application. This is not my job, you see ?

A kitchen is a place where you can cook your OWN ROM for your Windows Mobile Device..currently its for Himalaya Only ..check it out here
http://forum.xda-developers.com/showthread.php?t=378498
for me its not a JOB also its just my hobby ..im also a student in 12th grade

thanks for your kind offer. however, I wouldn't like to take your time for my very simple application
If you tell me the correct and easiest method to invoke my application and start its process, I can write the application. I'd just consult you if I'm stuck.
If you are also interested in this app. I can always send you the source code.

sure sure..send me the source....i am not doing much at the moment any way..except for re-writing the tools in C++..i have another useful suggestion..u can use MortScript to this but then it will be different

if you pm me your email address , I can send you the current source code.
But I am not sure if what I wrote is the best way of doing it.
by "best" I mean least cpu power used.

ather90,
did you receive my email ?

yeah i got the source..but there is a problem..you have built this on WM6 Pro SDK..not on WM5..i dnt have WM6 SDK..so i couldnt work yet..but will download it today..its better if you can switch it to WM5 SDK ( it will be same for WM6/6.1 i guess).

I don't know how to convert it to WM5 SDK.
If you tell me I can switch...

NO probs..the SDK is almost downloaded..i figured i might as well download the SDK caz i will need later

ok; waiting for your update...

any updates ?

Related

unlocking software licensing restrictions

is it true that xda2 has very strict restrictions on wat is allowed to be installed on it?
if so is it then possible to unlock that feature so i can write my own c programs for it?
maybe even write a new browser that has jvm say ?
Dave
No. You can write and install whatever you like. Where did you hear that rumour?
Surur
Dave,
So youre a programmer.
I am still looking for someone who can contribute the following software to this community:
Today pluging that makes ot possible to toggle Bluetooth & TomTom GPS being switched on / off. If youre interested, let me know, I can supply you with more exact specs. It seeems to me quite simple: just reading / updating some registry values.
programming
sure ill give it a go.
email me with specs and sourcecode
[email protected]
this would be my first xda2 programming experience tho, so it ight take me a little while to get fammiliar with xda2 programming first. im mostly a pc proammer good in c++ and opengl graphics, however im fast learner.
there are enoug forums for PPC programmers where u can read how to modify registry:
www.devbuzz.com
www.pocketpcdn.com
amd of course www.msdn.com
etc
flashing the phone rom what does that do for u practicaly?
flashing the phone rom what does that do for u practicaly?
flashing means to upgrade the s/w (firmware) that is stored in (flash) "rom".
Normally you only flash the device when
- You suffer from bugs in the old'rom
- The new rom has specific benefits
There are 3 types of rom on the device that can be flashed:
OS- the operating system
Phone (aka Radio)- the gsm/gprs radio functionality
ExtendedROM- add-on and customisation s/w (usually put together by the service operator)
Flashing the rom on the xda 1 since the developers got their hands on it is a whole new ball game, they discovered that the autoconfig program was taking up acres of space and wasnt really needed, there was also some unused space. They devised a way of writing complete programs to this space and my xda has numerous programs in rom that would normally be taking up precious ram when installed. These guys are brilliant in adding value and funcionality to a brilliant device.

I've managed to compile cryptophone for PocketPC 2003

I've build a version of crypto phone for PocketPC 2003. ( unsing the sources from www.cryptophone.de ),
with some workarrounds for license test.
I don't have two phone to test it yet. If anyone can test it please send feedback.
As i see it use data call as link layer so your provider must suport it.
PS: Who's testing it , please send feedback.
I've tested in my Qtek 2020, (XDA II, MDA II…).
Is it working? I was able to compile it too, but it died on exchanging keys.
mamaich said:
Is it working? I was able to compile it too, but it died on exchanging keys.
Click to expand...
Click to collapse
Don't work. :-(
I have programmed 2 xda 1 with wm2003 and the crypto, it works perfectly. The only bug is the "file" bar vanishes after a call is placed or received, other than that its great. 8)
Can you post what you changed in the source file in order we could reply your compiled code?
The idea is simple, if we can have access to the original source code and can do the changes you documented, generating the same code as you, with the same hash value for the encrypted code, we can assure that your code have the same security of cryptophone.
dumb ?
what is cryptophone?
Hi,
i am very interested in this (or a similar) software for
the Wallaby or Himalaya platform.
Anyone here who has a working & easy too install binary?
(Or are there any real free & opensource applications like cryptophone?).
kind regards,
Ben
Has anyone managed to get cryptophone working on the XDA ??
... or find a similar program ??
Regards
There are several similar commercial projects. Just wait some time for their announcements.
mamaich said:
There are several similar commercial projects. Just wait some time for their announcements.
Click to expand...
Click to collapse
Hi mamaich,
thnx for that prompt reply
I know about cryptophone.de, raseac.com.br & caspertech.com
Are there any others I have missed ??
Regards
John
2-3 russian companies are also working on similar projects. I don't know their sites.
cryptophone Somebody to compiled? for motorola smartphone mpx220 :?
one more company.
http://www.securegsm.com
and question - where is source download page on http://www.cryptophone.de ?
in general "cryptophone" application isn't difficult
- good vocoder
- some crypto
- good realtime data transfer - CSD for GSM network
- some audio components like AEC
could some one point me to good ARM implementation of vocoder with 2.4-4.8kbitps bitrate? ARM9(v5) PXAxxx ~100MIPS.
Free is preferable, but reasonable commertial offers are welcome too.
just a question,
isn`t it possible with the sourcecode of this software and the sdk for windows mobile 2003 smartphones to make a installer?
is very interesting, or?
is there any other software for ppc or smartphone avalable?
a free wm5 client for this should be awesome! coders go compile now!
is the encryption limited to "only" this version of application ?
- or is there some sort of standard ?
ryhor said:
one more company.
http://www.securegsm.com
and question - where is source download page on http://www.cryptophone.de ?
in general "cryptophone" application isn't difficult
- good vocoder
- some crypto
- good realtime data transfer - CSD for GSM network
- some audio components like AEC
could some one point me to good ARM implementation of vocoder with 2.4-4.8kbitps bitrate? ARM9(v5) PXAxxx ~100MIPS.
Free is preferable, but reasonable commertial offers are welcome too.
Click to expand...
Click to collapse
here
http://www.cryptophone.de/support/downloads/downloads.html
Lord Ashmedai said:
I've tested in my Qtek 2020, (XDA II, MDA II…).
Click to expand...
Click to collapse
Hi, did you manage to get it to work?
I tried on my O2 xda... it hung on the key exchange part...
It concerns me that this program starts two processs, spcore.exe and ui2003.exe. I have not looked over the code, but can you tell me why it must use two. Furthermore once they are going there is no way to stop the spcore.exe. My guess is that if that process contains the thread that is waiting for tapi events, its stopping mechanism has not been implemented properly. If you want to make a thread that is waiting for the event for line state then when the user wants to stop the thread/process, the event interest needs to be reset. eg SetCommMask(hSerialHandle,0); ,but it must be done from the ui thread not the waiting thread because obviously the waiting thread cant do anything. Once it is set to 0 (as apposed to EV_RXCHAR for example) the waiting thread will finish waiting imeadiately.
I tried sending a message to destroy the window with no effect, I then tried using terminatethread to stop it but that did not work so it must be in an api call (such as waiting).
On my mini it starts up ok, and dose not interfear with the phone. I could not test the functionality because the only other phone I had with me was my xda and it dose not install corectly on that. No error messages on intalation but the icon in the program files is not shown properly and it fails when I try to start it.

what needed to program??

Hello,
i have visual c# express, is there any chance to get a template for mobile development? or any other good ide without downloading 200 single files to get embedded visual c++ 4.0 working?
i mean something simple like visual c# full version?
i want to start programming but i dont get it, because no right ide is out there only this ms ****
got it worked,downloaded evc++4.0, dont like it
im more into assembler/basic progrmaming languages
is it possbile to use assembler for programming? something like nasm to the desktop pc world?
If you want to do assembly, use evc to start you off then put assemble into that. I used to do this on the desktop (pc) all the time when I was writing a program to controll some hardware over a parallel port. I see in the evc4 documentation some info on inline assembly so it should be fine there (its part of the c++ language to allow this).
What is it you need that low level for? To do an entire project that way must be very hard.
thanks for the info
i only asked for imformation, later i want to write my own bootloader,l simple kernel,like i did for pc, maybe getting more into the low level programming, which i like more than the high level stuff
is there no basic language for windows mobile that allows you to create easily applications, for free
sometimes i dont understand the developers, doing some weird stuff like evc++ where you need so much sdk/extra stuff only to develop, why not packing everything into a basic language and give this language all the apis which are needed
well thats something i think should be more supportet :lol:
Confused
I thought of starting it myself. I'm not very into "Visual" products, I'm a C++ to Java converted person More of a Java person. Anyway, was trying to step my foot into this realm and I've found a few SDK that can be downloaded and use, what should I start first? There are several choices that I've for from M$
1. Windows Mobile 5.0 SDK for Pocket PC Genuine Windows download
2. eMbedded Visual C++ 4.0
3. SDK for Windows Mobile 2003-based Pocket PCs
Confused...
Wow, writing a bootloader. What do you intend to do with it? Custom OS or something else?
Guys, this is unlikely to be helpful for assembler etc., but I wrote an opus about an introduction to programming, from a beginner's point of view (ie mine!) a few days ago. Might be helpful to some.
http://forum.xda-developers.com/viewtopic.php?p=209136#209136
V
Hi everybody,
I'm a really-confused guy about programming PDA...
I have a PocketPC 2003 device. I have to use TAPI for my university final project and I want to establish a data call through GSM from this device to a desktop PC with a GSM USB device working as modem.
Now...
-I've built a dll with TAPI functions with eVC++ 4.0
-I've built a wrapper in c# with VS2005, a smart device application that calls the functions I need stored in the previous dll (using p/invoke).
-I installed pocket PC2003 SDK from Microsoft.
Am I right?does the pocketPC support TAPI or not?I'm really confused b/c I'm reading tons of forums and some say it works and someother say the contrary...
please, only tell me if I'm using the right method of programnming.
thanx
looki here:
http://forum.xda-developers.com/viewtopic.php?t=38223
That question would probably have been better put in one of the other tapi threads.
I know you want to do ppc to pc but give that a try first. If you can borrow someone else's phone because you will need two ppc for this test. If you can communicate ppc - ppc then ppc -pc should be easy.
Every ppc phone I have had can make and receive data calls, but I have not rewritten the program to work with wm2005 so if thats your os don't bother.
There is another way to get a connection between a ppc -pc over a call. One of my phone/gprs cards had a gprs config tool that let me manually enter the number for gprs. After that I was able to use the terminal services client on ppc to take over my pc. The ppc tries to connect via the gprs and that dials my home phone then I set up the pc to accept incoming phone calls. After logging in it worked very well as long as some data was being transfered. The problem was that if no transfer occured for more than a few seconds the connection dropped out. I think its because the modem was treating a regular call as gprs, ie doing nothing when its not needed.
well vijay, i only want to get some outputs on my pocket phone, testing stuff etc
the problem is i dont have any experience about the bootsectors of the sd card (i think thats the only way not to erase wm2003), else i dont have any experience about the architectur
on pc its easy, because you have much references and some forums about this stuff, but for ppc i dont think there is any forum about os developing.
on pc you can easily use a floppy , writing the bootloader in the bootsector and let the bootloader call the kernel, thats it (for the beginning)
has anybody some stuff about it? some informations, would be helpfull
thanks
Have you seen itsme's posts (I think) in the wiki, and generally on google. The kernel stuff there was whoosh, right over my head. Incredible work, definitive I'd say. The founding fathers of XDA devs have done quite a lot of work on this stuff I think.
V

today screen Plugin ?

hi
any one know how to code my own Today Screen Plugin?
i m a programmer.
i want to create my own usefull Today Screen Plugin like Clock.
short cuts. and timer..
i can only develop application for O2, but i dont know how to make
Today Screen
Hi tinkyawoo!
I assume you program in c++?
Today plug-in is basically a DLL that exports two functions with fixed ordinals.
InitCustomItem - the important one, and another (don't remember the name) for options dialog (if you want one).
There is an article on this at www.pocketpcdn.com.
You can also use my code published here for reference:
http://forum.xda-developers.com/viewtopic.php?t=45084
Good luck!
thanks. i will check it
tinkyawoo: if you're a programmer, I suggest checking out the SDK; it has a good example framework for a plugin, although watch out for the repainting bug in the sample.
Otherwise, read levenum's source code as well. It's excellent. You can learn a lot.
V
Would it not be possible....
Would it not be possible to write a small dll which can be controlled from VB.NET or C#.net to display certain things?
If this was released (under BSD or another permissive licence) then we could all use it to develop stuff, which would help those of us who's first language is Basic
Today Plugin
Unfortunately you can't write today screen DLLs in .Net.
There is a lot of info on the microsoft web site - if u care to search.
They do - however - give you a means of writing a EVC DLL that calls a .net application for the today screen info , but I haven't tried it.
Charlie Grillo
Re: Would it not be possible....
What do you mean by "controlled from". Do you want a .NET app to be able to effect the plug in somehow? If so, it is possible...since .NET is managed code and the plug-in is a native dll, the simplest way to have the two communicate is via windows messages.
You can do the following:
-Register a custom Message that your .NET app will broadcast to your plug-in(s)
-in your DLL WndProc procedure, listen for that message and act accordingly
Alternatively, you can have the dll do the same thing, but ofcourse, your .net app would have to be running to recieve that message (unless you have the dll launch it directly).
JonTheNiceGuy said:
Would it not be possible to write a small dll which can be controlled from VB.NET or C#.net to display certain things?
If this was released (under BSD or another permissive licence) then we could all use it to develop stuff, which would help those of us who's first language is Basic
Click to expand...
Click to collapse

Application programming for HTP P3300 (ARTEMIS) and a few questions

As I'm new in this forum: Hi everybody!
I have been programming Windows CE-based devices for many years, but no experience yet with the HTC ARTEMIS (P3300). Therefore, I've a few questions and hope to get answers from this forum:
- I assume, it is possible to program visual-C++ based applications for the programme. SDK for Windows Mobile should be available at Microsoft. Is that correct?
All further questions are based on the assumption that visual-C++ (or embedded VC) is used for application development.
1. Is it possible to direclty receive incoming Short Messages (SMS) via the application? (Any keyword on how this works would also be welcome)
2. Is it possible to query the battery status from the device?
3. Can the GSM module easily be accessed and can Cell-IDs or carrier IDs be read from the device? (In particular, I want to identify the home country of the current mobile carrier) - If yes, how does it work?
4. Is it possible to restrict the appearance of the ARTEMIS. I.e., the user should only be able to access "my" application and mobile phone (voice) features. All other applications and system functions shall be hidden to the user.
Thanks in advance and kind regards,
ma_gu
yeah the stk can be downloaded and accessed from visual studio
1. i would asume so even if it had to be don with a dll hook
2. yeah many 3th party applications can display it asume there is an api call to get it
3. yeah there is an api forget the name searching in this forum should give some hits
4. yeah but if they hardreset or reflash the device it would be more troublesome
Hi Rudegar,
thanks for your fast reply. That sounds good and I think, I'll be able to find the regarding API calls (anyway, if somebody could provide some keywords, it would be very welcome).
But I have never restricted the appearance of any Windows-CE based device (question #4). How can this be done? At the beginning, I assumed that this needs rebuilding of the operating system via a system builder, but that's obviously not the case. Can you give me some hints on how to do this?
Kind regards,
ma_gu
http://forum.xda-developers.com/showthread.php?t=256646&highlight=programming
the api is called ril
depend on who you wanna develop really
1 option is making pure arm code (kinda skipping the ce) using gcc compiler for arm
2 option is the high lvl c# .net or c++ .net path but it's not that fast and dont have as much os access as pure win32 stk and even microMFC
3 option microMFC old ms class lib for c++ oop the granddad of .net you might say
4 pure win32 stk you handle the msg loop and everything more work but more power where many developrs who do today items and programs end up
if you can live with .net it's the easy path
if you want more then starting with microMFC and moving on to pure win32stk is prob the thing
java is not that well supported by wm imho
oooh yeah and you dont use platform builders and stuff like that
unless you are building roms from scratch and got access to all drivers for spc devices
you start a new project in embedded visual stuio or visual stuio 200X
and pick your path as in .net or the likes
and then you can debug using a simulator or directly on the device
it use activesync to get the exe there
otherwise you can normaly activesync the exe file to your device and run it directly
or copy it to a sd card and run it from there

Categories

Resources