Data Call between two XDA's - Windows Mobile Development and Hacking General

Hi
I am new to this form.
I had a look at the tsril.zip example as it seems from this forum that to make/receive a data call the ril is the only option. Unfortunately the documentation for ril is nonexistent and I want to ask if someone has done an example of a client/server data call, data transfer between to XDA's.
Thanks in advance.
Anton

It all depends on what type of data you want to transfer. I have never used RIL so I don't know the advantages of it, over the normal programming interface. I say normal, not thinking there is anything wrong with RIL but the little I do know is that RIL is operating system level and is normally hidden from the application programmer. There must be times when RIL must be used if Microsoft forgot functions in the normal APIs.
However I would say that for a data link between 2 devices then RAS seems the way forward. One device would be the Server and the other the Client. I have only ever programmed RAS from the client side, making a Telnet link to an already running server.
I just had a look at the help on Embedded Visual C++ 3.0 and under 'Creating a TCP Stream Socket Application' it explains the server side and then links to the client side. Have a read there.

RAS is not an option as it is a server consept, which I think does not even exist as a service on the desktop windows os let alone on a Pocket PC.
What I am looking for is something similar that you would be able to do with a landline modem or a gsm modem connected to a serial port of a pc (even a usb modem) which is to send AT commands to make/accept a call and then to make use of the serial port as if it is an io stream. This is possible on windows, linux using either c#, c++ or java. I can even do this with an embedded gsm module like the siemens TC45 java module.
What I can not understand is why Microsoft and the XDA suppliers (I am using a Qtex running Pocket PC 2002) is making it so difficult to make/answer a data call and let you run your own protocol over the connected stream.

RAS (Remote Access Services) is built into all Windows Operating Systems, including Windows CE. Did you look up the help example I pointed to ? What you do with RAS on an application level is for you to code but the connection itself is handled by the operating system.
As to making a connection similer to a modem and using AT commands. Then no you can't use AT commands directly, but you don't need to. To get that type of connection you need to use TAPI. Once Tapi has made a DATA_MODEM type connection, you use the TAPI callback connect event to then ask for a file handle that you can use with the normal WriteFile and ReadFile commands.
I already have something on this forum about that see:-
http://forum.xda-developers.com/viewtopic.php?p=7857&highlight=#7857

The problem is not so much making the data call but it is accepting/answering the data call that I can not get working on the XDA

Not sure if this is your problem, but in Australia they have a seperate "data" phone number for the same SIM. If yo call one number you get voice, if you call another number you get data on the same sim. Not sure if this may be effecting you.

I just looked into all this ras stuff a bit deeper, and yes I think I may of been talking rubbish. Although RAS does exist in PPC2002, it can't see any functions that allow the device to answer the line. I can see that PPC2003 has a Ras Server and RasIOControl that looks like the answer there.
Also looking into Tapi, I can't see how you answer a data call using that.
So I now understand your problem. It seems PPC is made as a client device.
Is GPRS the answer ? With that the link is always present and then you can use the built in Ras functions on seperate devices. Since you only pay for data actually sent then would it matter if the network link was always present ?
I have only worked out Tapi and Ras from the client side so I have never had this problem, but I agree it is an interesting one. I will have a bow out of this thread for a bit and see if anybody else knows how to Answer a Call.

Thanks for trying.
GPRS is also not the answer as you need a server in between that both XDA's can connect too and use as a router as the XDA's do not get fixed IP adresses but actually a NAT adres from the APN so you can not connect directly between the two.

Now that's an interesting thought, how about using some free web space to act as a pigion hole for your data ?

Believer: A seperate number? How do you know this, and what would the number be?

I can actually make two XDA connecting to each other using TCP. The trick is that I have one client always connect to a server to register it IP address with an ID. Then the caller send a query to the server to look up the callee's IP address.
In this way, accept() and connect() work fine.
I am using AT&T network and not sure about if other networks behave the same.

I wrote two application using TAPI. One is ModemDial and the other is ModemWatch, if I make a voice call the ModemDial dials the number successfully and ModemWatch reports that an incoming call exist. But when I change the behavior of call to DATAMODEM, the ModemWatch couldn't track any incoming call.
Is there any one, had some experience with pick a call for DataModem?
Best regards,
A. Riazi

riazi said:
I wrote two application using TAPI. One is ModemDial and the other is ModemWatch, if I make a voice call the ModemDial dials the number successfully and ModemWatch reports that an incoming call exist. But when I change the behavior of call to DATAMODEM, the ModemWatch couldn't track any incoming call.
Is there any one, had some experience with pick a call for DataModem?
Best regards,
A. Riazi
Click to expand...
Click to collapse
In your ModemWatch application make sure you are calling lineOpen with dwPrivileges (the 7th parameter, 1 based) equal to LINECALLPRIVILEGE_OWNER and dwMediaModes (the 8th parameter) equal to LINEMEDIAMODE_DATAMODEM.
If you're able to answer a voice call successfully, making these changes to the ModemWatch application should allow you to answer a data call.

Related

XDA2:Is there some software handler possible on GSM voice?

There's a need in mobile PC/GSM device which allows to put a software filter on voice which is transmitted via GSM network when talking.
Can it be done on XDA2 and if not which models will you suggest?
The filtering needs to be done on digital signal not packed to GSM packets, in both directions, during the talk - in realtime.
Thanks in advance.
Re: XDA2:Is there some software handler possible on GSM voic
This is impossible on XDA1,2,3 and Anextek SP230. Probably this is a limitation of PocketPC 2003 (even SE) OS. Wait for a device with a PPC 2005, maybe it would support this.
sure
it IS possible.
but you must delete default Phone application and services. and then you can run your own implementation of phone features with filter or anything other inside the voice channels.
please note: default Phone is invoked by several services, you have to lock all these ways.

How to Send String Message to XDA Application. HELP!!!!!!!!!

hi, my dear friends
I am a freshman to XDA dev, I am using ms vs2003 to develop an application on XDA II.
The application is about dispatching a job to a driver's XDA, the senario likes the following: (1) The dispatch server sends a job to driver's XDA thru GPRS. (2) The driver then view the job on the XDA application and Accept it.
The question is how to send a job from the server side to an XDA application, what need I to do with the server programs and what need I to do with the XDA applications? Do we need some develop toolkit from the SP?
Thanks in advance, your suggestion and help are very appreciated!!!
If your network gives you an ip that others can see from outside then you just need to write a small server on your xda using sockets to accept the messages over gprs. Unfortunately, most phone networks do not do this. I think the easiest thing for you would be to make it sms based.
Otherwise you could make a page on your (pc) server and have your xda check it at regular intervals to see if any new jobs are there. The down side of this is the cost of all that checking.
Thanks ORD for you help.
Re: If your network gives you an ip that others can see from outside then you just need to write a small server on your xda using sockets to accept the messages over gprs. Hi ORD, do you mean the Public IP for each XDA phone? Do you know if the SP O2 in British provides this kind of service?
Thanks again!
I don't know what you mean public address? The phone network will have a server address and your phone will get assigned a client address. I can't tell about o2 as I only have tried vodafone in Australia. I think that most IP's given are only useful from within the private network of the provider. I am no expert with the internet, but I think if the ip starts with 10.XXX.XXX.XXX its no good. Perhaps if you post the first half of your IP some of the other network wizez here can tell you if its accessible from outside.
Even if your ip is good, it probably would not be static so I think its not worth the effort. Still... if you go that way, the implementation of sockets on ppc works 100%. In fact I have cut and pasted code straight from ppc apps to desktop apps and had no problems!
Why not just have your phones connect as clients to a small custom coded server on your pc periodically. You could streamline the transmition to only transfer as few bytes as possible each time. The only time a large transfer would be needed is when a job is accepted and the details are needed. my network charges by the kilobyte and when i transfer in only the tens of bytes it dose not even register it on my bill (i don't know how big the handshake is).
Thanks, ORD, yes, we can check the server every XX seconds, the only thing I am worrying about is if I have more than 1 thousand XDA units to connect and check the server, if the server can afford to this load?
This sound like a real world problem you have (like taxis?). If you want the best solutuion (ie sending jobs to xda's) start checking the service providers. 1000 units is a lot. I think there must be a carrier out there willing to provide
usefull addresses. Also try connecting two devices from within the same network. If all your devices are within the same private network they may be able to communicate. You PC server could be connected to the internet via a gprs card and send out jobs to all the xda's within service provided by the same carrier. I have been wanting to try this for a while but I do not have two gprs connections with the same provider.
I have a couple of small apps that may help you test this if you have multiple gprs connections with the same provider.
The following is a ppc program to attempt to connect to another one of itself over a network using sockets:
http://odeean.veritel.com.au/serv/testSocketServer.exe
the next program is for the PC so you can show that the program at least works in the direction of ppc to pc via gprs then internet:
http://odeean.veritel.com.au/serv/ORDsocketUserPC.exe
Do the following:
-Turn on your internet connection and gprs
-On your pc run the ORDsocketUserPC.exe
-to simplify things just turn off any firewalls etc (my app dose nothing bad, but sometimes even if you open a port, firewalls cause it to fail)
-On you xda run testSocketServer.exe
-On the pc server function side enter the desired port details. Because you are first testing if it works at all change the ip to 0 as this causes it to listen for all incoming ip's in my app.
-On the pc server side press listen
-On the xda set the port on the client side to the same as on your pc. Enter the pc's ip (ie from your connection status).
-On the xda press connect
-Now the xda should attempt to connect. It says waiting to read when connected at first
-Now on the pc it should say blocking-listening with some code.
-Two way data transfer is now possible. The desktop version is self explanitory. The ppc version has a lack of screen space so to elliminate some buttons I replaced the get button with ..... make data edit box clear, press send, this generates a dialog with the read data so far.
-This is only a very raw app some things malfunction but I get reliable two way communication. If something goes wrong just close the program and start again.
If all that works you are ready to test the ppc to ppc connection. Make sure you get gprs on each from the same provider run the testSocketServer.exe on both xda's at once. One with server side only and one with client side only. In the client enter the ip of the server (my app dose not find this for you - you may need some third party program for this), make sure the server ip was set to 0 before you press listen.
Please post to tell if it works within the same network as I am very interested. If it dose your problem is solved, otherwise I see no way to help because of the volume of units to communicate to.
Thanks ORD, it is too complicated for me, frankly. Can I push an email to the XDA then let the driver knows that he has a job? He can click an button to request the job. The question is how to push an email to the XDA unit.
Sorry, I can't help with emails.
Its a pitty you could not try it. If anyone else cares to try gprs device to device communication with both ends within the same phone network I am still interested in the result. I just do not want to get yet another sim. vodafone sales people in Australia do not seem to understand their own network and I have wasted enough money buying products from them that do not do what they claim.
Sending of string message over O2
Hi ORD!
Im interested in this and I am using a VPN approach to get both of the devices talking!
I am using your programs but I also wish to view the source code on how u coded this, as when I click connect I recieve an error stating the socket is not writable??? I think it doesnt even start the 3G/GPRS service on the XDA? Could you send me the code?
If it does start GPRS in the background i do apologise!!! But Im uncertain that this is the case!
Thanks!
AJ.
possible solution
All pockets pcs are using private internet addresses, i.e. they can access other external sites, but no one can directly access them as no external connections are allowed to access them without the XDAs initiating the connection.
So all of your 1000 xdas initiate the connection and connect to a central server (on server use asyncrhonous sockets for scaleability).server should be able to handle this easily.
when a job is ready for dispatch the server simply sends it to the appropriate XDA(possible because that XDA initiated the connection, so the phone operator will allow it through their firewall).
No polling needed on the XDA, just the need to monitor the connection and keep it open to the server.
XDA to XDA commmunication. Easy. The server acts as an intermediary.
Imagine XDA1 (vodaphone) wants to talk to XDA2(02) and both are on different networks. They cannot talk directly to each other.
XDA1 sends it message to the server already connected. The server (with a connection already set up) forwards it on to XDA2.
XDA2 replies back to the server, which then forwards it to XDA1.
The server acts as a gateway between the two networks and is able to do so because it is XDA1 and XDA2 initiateed the connection to the server.
For a more technical explanation of how private IP address are assigned by phone operators read up on NAT (Network Address Translation).
This solution would also work if both XDA1 and XDA2 had public IP addresses. All logic can be kept on the server and there is no need for XDA1 to find XDA2s public IP address, which with a 1000 XDAs could become messy very quickly.
cheers
Steve Jubb
I posted a response to this thread that ended up in its own thread.
Please read this: http://forum.xda-developers.com/viewtopic.php?t=55255

SIP VoIP on TyTN

My first post in this outstanding forum
I've spent quite some time looking for programs able to run my SIP VoIP desktop client on Tynt. On WinXP I use X-Lite with VoIPDiscount and I know for sure it's possible to configure X-Lite with many other SIP based services like VoIP Stunt.
Is there a tested client for Tynt? All I've found was for PPC2003 and I got errors all over. Ideal'd be a client working with both UMTS and WiFi, but WiFi would suffice completely.
On the other hand, Skype works flowlessly
I use SJPhone:
http://www.sjphone.org/preview/ce/
You need to adjust settings to make it work correctly, also audio is a lot better with the USB headset, see this thread for right settings:
http://forum.xda-developers.com/viewtopic.php?t=59131
You can also use x-lite CE 1.01, find it here:
http://forum.xda-developers.com/viewtopic.php?t=58154
SJPhone all the way here too. It also works as a Vonage Softphone!
thanks guys. I saw SJphone but somehow I didn't manage access to the beta page.
I'll let you know
If your provider supports IAX protocol (which is much better while on hostile firewalled networks) my choice is http://www.voipsurfer.net/
My sincere thanks, guys I'm gonna try them all. At this point I created correctly the profile with SJPhone; the same profile works great with the windows client (after creating the profile I copied it to my desktop and the XP client accepted the profile like it was its own). After applying the profile the PDA client asks for id & pw, but I cannot register. Explorer is online so I know the internet connection is fine. I think I need some working yet.
I have managed to instal the pocketpc version of xlite and it works ok from the point of view of me trying to ring my home phone, it connecting and disconnecting ok and it registering as a broadband phone call through my isp when I check my online records.
The sound quality on the device is unusable.
When I use the supplied mini usb headphones I can hear the person I am calling very clearly but they can not hear me properly.
Can someone talk me through anything I can do to improve the settings so that I have a chance of using my device for voip calls whilst at home. I am not in the realms of anything to techincal though.

Are multiple VoIP accounts at the same time possible?

Now that there is a solution for VoIP available I can't help but get greedy So far I used a softphone with multi provider support for this task, but now I wonder: Is it possible to use two different providers at the same time? Right now I am helping myself by switching by hotkey assigned cab files (which works pretty well btw), but what I am really looking for is using one provider for inbound calls and the others for outbound telephony. There are of course providers which can act as a proxy for others, but that solution never really worked out for me as many voip vendors seem to block these attempts (especially pointing a finger at SipGate here ). So, is there any solution for handling multiple providers?
Theoreticall, they are "Backup SIP Settings" you can provision in Windows Mobile 6. Just look at http://msdn2.microsoft.com/en-us/library/aa926605.aspx.
Having only one working VOIP provider, I haven't tried this yet.
However, the format of the XML provisioning is very similar to the one I posed in http://cleanimport.xda/index.php?posts/299950/.
You just have to replace parm name="SIPSettings" by parm name="BackupSIPSettings".
If you try it out, please report here.
Thanks.
--eluth.
The CAB installs fine, but there is no difference between installing a new provider with just "SIPSettings" and "BackupSIPSettings" I tried this with Arcor and SIPGate to test ut whether both incoming numbers would be available at the same time.

Forward incoming calls to SIP (local asterisk)

Hello everyone,
Is it possible, on an Android phone, to forward incoming calls (from the GSM network) to a local asterisk server (via SIP)?
I know that Android supports SIP as an extension, but that is not useful to me. Currently, the only way I've found, is to use a Bluetooth adaptor on the asterisk server. I'd prefer the SIP solution instead, if one existed.
Thank you!
Andr0ides said:
Hello everyone,
Is it possible, on an Android phone, to forward incoming calls (from the GSM network) to a local asterisk server (via SIP)?
I know that Android supports SIP as an extension, but that is not useful to me. Currently, the only way I've found, is to use a Bluetooth adaptor on the asterisk server. I'd prefer the SIP solution instead, if one existed.
Thank you!
Click to expand...
Click to collapse
I've got the same question.
"Y U dig up old thread?"
See above
So far, I've only found information, that you COULD compile Asterisk for Android. And that the RIL WOULD be difficult to handle.
Has anyone ever tried it? Did you manage to get it working or not?
No I couldn't find a way to do it. In theory, someone could create an app that redirects a call to the PBX, but nobody has done it, afaik.
What I've done instead, I've got a Grandstream VoIP phone with bluetooth support. So all my incoming mobile calls actually ring on the Grandstream. While the calls don't go through the PBX, at least I don't have to bother with the mobile phone anymore.

Resources