Hi all,
I have developped a phonecall functionnality for my PPC application. It works but I have an unpredictable problem.
First of all, some feature of my config: I am developping for Qtek 2020 and 9090 (both), with embedded Visual C++ (4.0 Sp4).
To make a phonecall, I used the following TAPI functions (like Microsoft Dialit sample):
- lineInitialize
- lineNegotiateAPIVersion
- lineGetDevCaps
- lineOpen
- lineMakeCall
and then (after conversation):
- lineGetCallStatus
- lineDrop (if needed)
- lineDeallocateCall
- lineClose
- lineShutdown
I am also using a callback function to manage line messages, info and states.
it can work correctly 20 times then crash or it can crash during the first call. Apparently the crash (application freezing) comes after lineMakeCall during line reply waiting.
Did you already heard anything about this kind of problem?
Please I need some help, it becomes very important and very urgent.
Best Regards
Yves
A lot of people trying to write programs that can transfer data over a phone call seem to end up giving up because they think their device is not capeable of it. I put this little app together to make it possible to demonstrate the data transfer on ppc phones. If this works on your device then you can implement similar functionality.
download bellow:
http://odeean.veritel.com.au/ORDTapiUser/myTapiUser.exe
It will only work if the program is running on both the calling and answering ppc at the same time.
Instructions:
0)Make sure the phones on your ppc's are turned on.
1)copy the exe to both devices.
2)run the exe on both devices.
3)press "startup" on both devices.
4)(both devices) a series of dialogs will pop up, if you see one labeled "celular line" press yes. If you know your phone uses a line called something else press yes to that instead. If you press no to everything the program will try to get the correct line, but may fail. If you want to choose again restart the program.
5)on the calling device put a phone number in the edit box at the top. I am no expert on numbers around the world so I have just let whatever you put there go straight in. If the number fails its got nothing to do with this program.
6)on the calling device press "dial". wait until it says connected.
7)on the answering device the incoming call will be shown. If a caller id is available it will be displayed. The ppc inbuilt phone is not stopped by this app so you will not be able to press the answer button. Instead wait (normally the default is 3 rings) and my program will answer the call itself.
8)two way communication is now posible. Data sent from the "data to send" edit box on one ppc will be displayed on the "received data" window on the other ppc. As this is a simple program the display will just show the last 25 digits to keep the latest info in the window.
9)when done press "hangup" on one of the ppc's
The data is not just sent in a direct way. It gets broken up into packets and they are timed as they are transmitted along with some error checking. The timing is rather generous so it slows the transmition down a bit, that along with all the actions being displayed to the user.
This works well between my xda mini and xda I. It dose not work on windows mobile 2005. Because of the expense involved in phone calls it is dificult to debug. If any messages do pop up it would be nice if you could post the number on the dialog and a description of what was going on. This program cost me $150 in phone expence, so enjoy.
.
could you post the code , please ?
i have to make an application that need to receive file from server with data call.
(excuse my english)
best regards
I will not post the entire code, this is to let you know if it is worth the effort trying. Almost everything contained within this program that is related to tapi can be seen in posts already on this board. If you have a specific question I would be glad to post code relating to it.
When you say you need to retreive a file from a server, you should know that tapi data calls do not go through the mechanism that ras or sockets use to let the operating system get a ip and port for communication. Your program is responsible directly for the communication. It would be terrific if you could write code to replace the missing incoming ras components from pocket pc. I have not so I could not show any code for that.
If the server you want to connect to is not a pocket pc based device, ie it is a normal pc, then tapi is not the best solution for you. I suggest using sockets, its designed for that kind of thing. ppc to ppc tapi data calling is like a last resort kind of programming. It is forced on us because either the phone networks don't give us usefull ip's for sockets or the api's are not fully implemented in ras. Alternately you could look into using the compact framework 2.0 and c#, I think I read somewhere that incoming ras would be included there.
just one question...your application uses TAPI, isn't it?so TAPI is supported by mostly different mobile device?Am I right?
thanx
ppc 2000 supports tapi outbound only.
ppc 2002, wm2003, wm2005 all support tapi inwards and out.
The hardware can vary, I only have the devices listed in my sig. For all of those (that are phones) tapi data, in/out is fully functional. If you are using a phone card (ie one that plugs into the expansion port) its capeabilities may be different. Often those only support gprs (not tapi). If you have anything with XDA in the name its OK.
Thank you for your advise but I have a specific problem using HTC
Wizard. I need to connect a server using a V110 modem in order to create
data link between a PDA and this server. I developed a code (VB .net)
for PDA and independent cellular phone using standard AT commands. I
tried to develop a similar approach with HTC Wizard but it seems it is
not possible to send AT commands to the modem (cellular line). To
develop your code you should have solved this problem using TAPI. Could
you explain me how to initiate the cellular line so that I could create
a V110 link.
Thx
I understand more clearly what you want to do now. Unfortunately I have never attempted to use at commands. You said I should have solved this problem in my app, but the point of using tapi is to not have to deal with at commands. Tapi is good for sending data, its my "guess" that whatever the commands you want to send could be generated by tapi to look like whats expected on the other end (assuming the typs of transmitted data match. eg dose the size of one at command correspond to >= the size of one char?).
I think that you would not be able to communicate directly with the modem with at commands until you have stopped tapi/ril from using the port. Again, I have not done this. Search this board to find how to do that. Once you have, try your origional code again. I doubt your normal phone functionality would work after that.
Sorry I could not be of more real help.
I dont have PPC but I do have smartphone instead..
Does the program require CSD line or can use normal GSM? Can you create one similar program that can be used in Samartphone wm5?
It uses normal gsm, ie a voice call. The underlying class in my program can probably work on smartphones, but I do not have one. To be honest I think smartphones are dying. Normal ppc phones are the same size now so to put too much effort into smarphones seems less attractive.
My PPC wm5 cannot dial, the other PPC show CONNECT but...
I was using HP Ipaq and Dopod PPC, The HP Ipaq when dialed it show dial number but nothing dialed to other party. Latter Dialed from Dopod It was shown CONNECT but no connection is establish to other party...
Could you give me the reason. If I am using WM5 is the case, what OS that you are using?
How about using CSD line instead could it possible running properly? Do I need to install certificate and signing the application(exe) as to make the program running in WM5, is what happen to smartphone certain API under privilage zone.
It is my mistake the MyTapUser.exe find in both HP and Dopod
I am sorry since I just bought the SIM card and the provider put some procedure before I can use the line. After consulted the shoper, The shoper activated it for me. Walla! I tested again it worked fine...thanks to you...master!
Some networks can also cause problems. I use vodafone and its 100% ok but I put an optus prepaid in and nothing happened at all. If I understand correctly the network should only be interested in the bearer mode. I use LINEBEARERMODE_VOICE - the same as a voice call so it should be ok. When experimenting with that sim, they will not do anything with a call that contains a LINEMEDIAMODE_DATAMODEM in the call params. Very strange considering they have no use for knowing this.
I am pleased it worked for you. This is realy very old and I will be removing it from my site soon when my new stuff comes out. Even if the myTapiUser seems to work, remember that it is not checking the contents of the transmition. Bad weather for example could cause information to be missed. There are probably problems receiving on the HP that you may not have noticed. Is it the same HP made by quanta? If the HP can receive data after answering an incoming call I would love to know about it. Can you confirm this?
This is my report..
I am using prepaid no csd line.
Device Info
========
1.HP iPAQ TI OMAP1510 - 2003 PPC(memory-57.04MB)
2.DOPOD PXA270-520MHZ WM5(5.1.1..1700)(memory-50.19MB)
HP Dialed Dopod
===========
- HP received data from DOPOD immediately after data was sent.
- DOPOD received data from HP after next sequence of data transmit from HP(sometime error 0052 occur)
DOPOD Dialed HP
============
- HP received immediately data from DOPOD
- DOPOD receiving data from HP after the next sequence of data transmitting.
- error trigger 0052(assembly packet...) in DOPOD
data send perfect 100% correct...
May I know whether, If this method can be used sending digital stream of data, such as, compress voice or image?
Yes it can. I have not done voice because the flow of the transfer would be very different from what I want. If you want to see voice transfer in action over data calls google cryptophone.
In about 15 hours I will be releasing my program. Come back then to see what it can really do. I need to make a page for it on my site and get screen captures etc. Its 2am here so I can't do it now.
incoming call how to get connectted?
I can dial to the receiving phone. My receiving phone use ril to detect the incoming call. After the detection, I can press the green button to answer. My problems is why everytime I answered the call it failed.
I did like below procedure, when ril detect the incoming signal
-lineOpen
-lineAnswer
-lineGetID
Is it the correct way to answer the call? Why 'lineOpen' produce error result?
Can You give the correct way to answer the incoming call for modem like communication.
Thank in advance,
As far as ril goes I know little. You should have opened the line before the call was offering, this includes negotiating the version of tapi to use then finding the correct line then using lineopen. All this has been covered in other threads. The values returned from the api calls are self explanitory so checking them is useful.
The use of linegetid is less straight forward but again it has also been covered in other threads. The thing to remember is that after you use lineanswer to answer an offering call, do not imediately call linegetid. You need to wait for the connected line state. Also check the dwCallbackInstance when looking at line states because as I found with the atom, you need to be sure the results are relevant to your program.
I know that what you really would like is some code but its too complicated to sumarize in a few lines. The best thing to do is start from the beginning ( lineInitializeEx ) and work to the end result ( LineGetID ) checking your errors along the way. You will need another thread to do the checking of the state of the line, and it will have to be properly synchronized if you don't want unexplained crashes. If your program is answering the call, don't touch the phone buttons. When you answer the call cprog.exe owns it and you will not be able to access it. Also is there a reason you are mixing ril with tapi? I would guess it complicates the issue, why not just use tapi or just use ril?
Ril or TAPI
Yes! You are right, either one can be used. I am a little bit confused about the two. Just remember I am new to this kind of development. After sometime I am testing the use of RIL and TAPI both can give the same answer, but better use TAPI from the beginning. And I have to kill the cprog.exe and RegisterHotKey for green button first.
I want to ask you something. Why after several attempt of LINEDEVSTATE_RINGING event, there is no LINECALLSTATE_OFFERING trigger, as this event use to lineAnswer? And what should I do when the LINEDEVSTATE_RINGING event trigger?
Thank in advance
Sorry, I may have been a bit loose with the terminology. Its a while since I coded that part - Line states, line messages I mean. LINECALLSTATE_OFFERING is obtaine this way....
First off, use the event notification method, not the callback window. Wait for the event using WaitForSingleObject then Use lineGetMessage to get a LINEMESSAGE. If the dwMessageID of the LINEMESSAGE is LINE_CALLSTATE then check what call state it is (eg is dwParam1 equal to LINECALLSTATE_OFFERING etc). You can then take action depending on what you want to do, like answer when offering.
I never see LINEDEVSTATE_RINGING because it is not needed by my app because the line messages suffice. Killing cprog.exe on a users device before its neccesary could lead to missed calls, also when it is not running the caller just hears the ringing tone so it seems like they are being ignored. I have also found that the os restarts it again anyway after a while (actually it seems like it dose this after the device has powered down and when a new call comes in).
What is the different when using event and callback function
What I understood that we can use either event or callback function to gain message from TAPI. I am using the callback function to get the LINECALLSTATE_OFFERING, which is different than you, where you are possibly using the Event method (lpLineInitializeExParams->dwOptions = LINEINITIALIZEEXOPTION_USEEVENT - I think you are using this one!).
I still cannot get the status of LINECALLSTAE_OFFERING. Some of the events caught are LINEDEVSTATE_CLOSE and LINEDEVSTATE_OPEN. What is the meaning of LINEDEVSTATE_OPEN stated in the MSDN line is open by other application, does it means that cprog.exe is conqured the line?
The reason I said to use the event method is that I have only done this with it. I could not give any advice about the call back method (although i guess it should give the same results), if you can get it to work then its fine. How are you getting LINEDEVSTATE_CLOSE & LINEDEVSTATE_OPEN? LINEDEVSTATE_XXXXX have nothing to do with LINECALLSTATE_OFFERING. Are you checking for a LINE_CALLSTATE in your call back? I think in the call back method this should be sent to your program.
ie
case:LINE_CALLSTATE;
{
if(dwParam1==LINECALLSTATE_OFFERING)
{
//it is offering
}
}
break;
All LINEDEVSTATE_OPEN is telling you is that cprog is also using the phone to wait for calls (normally cellular line).
If LINE_CALLSTATE it means a call is comming and you can find out about it (eg if its offering). cprog.exe dose not do anything to the call unless the user presses a button or taps on the notification. It dose nothing to the line, cprog will be aware of the same messages that you are and if you set up tapi to use data on a line then unfortunately cprog will also ring when data calls come but other than that there are no issues with it to worry about. If you need proof of this just donwload the current version of GSMbeam and in the settings change the spelling of cprog. When a data call comes in you will see GSMbeam monitoring it then the cprog notification will come up over that monitoring the same call. The program that answers the call first is the one that owns it, until then its not altered.
I am looking the way to make two smartphone wm5 can communicate using CSD line. I am planing to fetch data and sending data through the UART/COM port. The question is how would we know which COM due the GSM modem attached to.
Why the sample tstril.exe have error like RIL HANDLE: 00000000, result 80004005 and also the navigated bar cannot move? - I am using Omap Smartpone wm5.
Thanks in advance
You need to sign the application in order to make it work on most of the smartphones running WM 5.0 (RIL API is priviledged API). PocketPCs are not that tight regarding this subject.
Cheers,
Raul
how to sign applica and get free certificate into smartphone
could you explain the better way on to unlock smartphone using free certificate so Application can access the privilage zone?..
Thanks in advance
Only OEM can give such certificate or sign your certificate with one of their root certificate in order for yours to grant you certain priviledges.
I'm afraid that no free or test certificate will help you. RIL is not ment to be used by spare time developers like us...
Cheers,
Raul
Install and sign certificate using third party CA
I already install certificate (.cer) and signing tstril.exe using signtool.exe using our internal certificate. In my smartphone setting->security->certificates->root , shown my CA name registered. But I couldn't launch my tstril.exe. Can you explain why it is happen eventhough my CA name was registered in the setting.
Could you explain me how can I get the OEM certificate? For your information I am using DOPOD TI OMAP850 Model nameopod577W.
Thanks in advance
To answer your question short if you're not an ISV partner or a 3 rd party working on a RIL involving software that has to be added to the ROM then you will probably not see such certficate.
Nevertheless you can check your code functionality on pocket pc side and overall functionality on 2 pocket pc 2003 SE. The RIL hasn't change...
Then you could try to get in touch with HTC if you target this devices and ask them to sign your internal certficate with their root one so that you can sign your app and work with RIL on smartphone platforms.
Cheers,
Raul Tinca
tstril.exe can't work in my dopod and also hp ipaq and sp
I compile the source code using ms 2005 and deploy it into my Hp 2003 and also dopop wm5 both couldn't work
DOPOD
=====
RIL Handle: 0003274, result 00000000
notify: dwCode=0x800002 lpData=2808FE38, cbData=4
notify: dwCode=0x400005 lpData=2808FD40, cbData=32
HP iPAQ
=====
RIL Handle: 00032510, result 00000000
notify dwCode=0x800002 lpData=2007FE8
.....
Well in this case i see that you have valid handle and also receive data in your notify callbacks...
I don't see where the problem is. Let's take it step by step. What are the first steps you want to achieve ?
Raul
could you explain to me more detail on tstril.exe
sorry for late reply..a little bit preoccupied with other things.
Answer to your question, my aim is to get voice data or to send voice data through the handle. How could it be done?
May I know the purpose of this tstril.exe since I am to much ignorant. ow to use the handler and what kind of data I could get from the handler.
Sorry for stupid question...
Thank you in advance.
Hi all,
Voila!
I found the purpose of it. It use to model the caption of event produce by ril. I already manage to run it into my smartphone after I unlocked the phone. Then I found some event occurred. While I am dialing the other phone to the ril phone I saw events triggered. This can be use tho trap like incoming event since the incoming event in smartphone was interfered by the cprog.exe. Event from TAPI is hardly used especially for incoming (ring on) event.
Please tell me, is this what you mean? The handle shown above is to an event that gets triggered at the same time the message buble for incoming call happens. In my use of tapi the event for incoming calls is always generated but I am interested in what you have found because if it is from ril then maybe it is set sooner (hence give me more time to respond). Also if rersetting this would get rid of the message buble it would be useful.
When you say it was interfeared with by cprog.exe what do you mean? Are you saying it is reset or am I misunderstanding the whole thing?
Since the cprog.exe steal the TAPI event so it is difficult to gain the incoming call event from the callback function. What most of the people did is to kill the cprog.exe by the time incoming call event fired by the ril.
After killing the cprog.exe then invoke lineAccept / lineAnwer to connect the call.
Cprog.exe is program runnning at background. This program will hinder the Application to gain full control on the answering part.
I hope I had given you the correct info..
Sorry but can ask more ?
When you say steal the event do you mean that ril triggers an auto reset event that tapi needs to get to know there is a call comming? That would be interesting and I would experiment.
If you mean that the event is the one accessed by LINEINITIALIZEEXPARAMS initialParams ..... initialParams.Handles.hEvent then this dose not seem to be so. I use that event at the same time that cprog.exe uses it to detect a change in the state of the line, it can't be auto reset (unles tapi maintains seperate events for each application using it).
I only kill cprog.exe if I am sure the call is for data. I would love to know how to just make the incoming call buble go away without killing cprog.exe. If I stop that process just after it set the hardware to vibrate it becomes difficult to stop the vibration. If I could leave it running until the call was no longer offering then cprog would cancel its own vibration.
Hi, i know this question might pops up every now and then. Tried hard to find a solution but still can't find anything workable. Here's my issue:
I'm developing an app for Windows Mobile 6.5 (With TAPI 2.0), using Motorola MC65 as target device, that would allow user to make calls and answer calls. For outgoing calls i have no problem whatsoever. For incoming calls, the OS default call answering screen (CProg.exe) will pop up when there's a call coming in.
After googling for solutions and trial and error a whole lot, here's what i did so far:
1. Use lineSetAppPriority to set my app to the top priority for handling incoming call. The call returns 0 (means success) but still the CProg will try to handle the incoming calls. Checked that the application name is correct as well.
2. Tried using FindWindow and SetForegroundWindow to hide the CProg. It works, when there's incoming call, the CProg will be hidden and my app is shown. However the button on my app couldn't be accessed as i think the focus or countrol is still with CProg. Tried using Focus() on my app and still not working.
3. Tried replace the CProg with an empty executable. After restart, my phone can't even access the radio network. Usually when booted up the device will prompt me for the SIM card's pin number, but this is not the case here. Tried calling in and operator's telling me can't reach the line.
Just wondering is there anyone, at all, that has encountered this issue before and get over it?
Thank you.