I have followed various posts regarding establishing a data connection using good old "Hayes AT Commands" over COM2 - there is a wash of great info to be found here! Only I get a bit confused when everyone starts telling me I should use the TAPI or even the RIL-API or whatever... I can't - I am just not good enough to understand these complex structures. I am just about good enough to open a COM port, issue my ATD[tel.no] and wait for the "CONNECTxxx", just like I have done for the last hundred years! I don't think I am alone - I am sure there are loads of developers who are not comfortable to leave their C# / VB world.
So, a wopsy big please: has anybody managed to encapsulate the complexity of establishing a GSM call for data in a way that can be easily consumed in C#? :?
If someone has got a commercial solution to this issue, I do not have a problem to pay a licence fee! That has to be less painful than banging my head against this brick wall!!!!
have u managed to establish the data call u wanted ??
nutitija, if you want to establish datacall...
TAPI
1)kill cprog.exe
2)initialize TAPI (lineInitializeEx)
3)find device with 9600 (lineGetDevCaps lineGetAddressCaps)
4)Open Line and set to receive datacalls(lineOpen)
5)Receive message from line in cycle (lineGetMessage)
6)For originate call - lineMakeCall
7)For Answer - lineAnswer
8)for Hangup - lineDrop
9)After connect get COM-device (lineGetID)
RIL
1)Deny to TAPI to drop datacalls (search on this forum)
2)Initialize RIL and set callbacks(RIL_Initialize)
3)For originate - RIL_Dial
4)For answer - RIL_Answer
5)For hangup - RIL_Hangup
6)After connect get COM-device (RIL_GetSerialPortHandle)
AT
1)Deny to RIL to use com ports (search on this forum for mamich posts)
2)Open COM2
3)For send and receive commands use COM2
4)After connection open COM9
5)For send and receive data use COM9
for more details use search on this form
many thanks my friend ,
I just needed validation from somebody that actually did implement before wasting hours of my time for something that cant work
cheers
When using the AT command method. I open COM2 i send my ATD command. Its succesfull my device rings. Now i would like to retrieve the information from COM9.
1) Should i close COM2 before retrieving data from COM9.
2) Should i reactivate RIL before retrieving data from COM9.
3) When using Readfile shall I implement it in a while loop to accumulate the GPS stream that will be sent to the buffer ? Or by calling readfile just once would it return all the data ?
Thanks for your helps.
Related
I'm having problems with TCP/IP "freezing" with the XDA. What happens is that the XDA stops receiving messages if there's a period of inactivity over the IP connection of about 45 seconds.
The IP connection still works, and I can send messages from the XDA in the other direction, which then "unfreezes" the waiting messages and they then appear at the XDA.
GPRS is still connected throughout.
This happens both with my IP test apps and with MS Messenger. In messenger, if I start a chat with a PC and the person on the PC doesn't type anything for 45 secs, then no further message comes in from the PC until I send a message from the XDA, whereupon I get all the messages they sent to me.
This seems, therefore, to be a bug in the XDA's socket stack.
Is this a known problem and, if so, is there a fix?
I'm running BIOS version 3.12.07 ENG, 08/13/02.
Cheers,
MikeS.
Upgrade your software.
I had the same issue and fixed it by upgrading to 3.16.13 & 3.19.
Thanks bamse - was planning on doing that as soon as I get a smart card reader.
i have various different versions of the radio stack and bios on different devices but none of them are as recent as the versions you mention. can anyone tell me where to get these versions of the bios and radio software? did they come from microsoft or from the device manufacturer, or somewhere else perhaps?
thanks,
nick.
You might want to try this:
http://www.idedata.no/support/support.asp?ID=299
The files seem to be the same for all of the Scandinavian countries (SE/DK/NO), and they work just fine for me in Sweden. I don't know if anyone tried them anywhere else, but I can't see why they wouldn't work.
Thanks!
Not speaking Norwegian I'm not sure exactly what it says, but I already have Radio version 4.08 so I'm not going to change that. Is there a list of the problems that this release fixes that you know of? (There isn't one in the zip file) I'm specifically interested in fixes to the Communication Manager and GPRS connection handling and I don't know whether these would be in the BIOS upgrade or the Radio upgrade. I know that various people have Radio v6.x and ideally i'd like to get hold of this.
Any help you can give is much appreciated,
nick.
4.08 is actually way older than 3.19 (v8 compared to v19). From what I've read on this site, the first digit in the version number is sort of an area code that will differ between different areas rather than different versions. I am not sure the 3.XX would work for you as your original is 4.XX, but I think there has been a discussion about that in another thread.
What it tells you on the Norweigan page is more or less that you have to make the upgrades in the correct order, or they will fail and leave you with a non-working device.
I think the improvements you're looking for are in the radio upgrade, but for a stable device you should probably upgrade both at the same time.
I've also heard that in the UK, the O2 version of the radio stack has been 'optimised' (a moot point, since it doesn't currently work that well) for use over the O2 GPRS network, so I'm thinking it might be wise to wait for the official 4.x release. Unfortunately they're being slow in producing the update and we've got customers complaining about the reliability of the connectivity in our software when it's all down to the flaky radio stack (!)
Thanks for your help,
nick.
Just to update everyone: it was a problem with the radio stack not allocating resource for the return leg.
The problem went away when I installed radio stack 4.20.
MikeS.
GPRS has an issue. The downlink is kept alive by sending packets in hte uplink, and vice versa. So if you are sending downlink UDP data with nothing on the uplink then the GPRS downlink will timeout after 62 seconds.
So if you are coding a video or audio streaming application please send an uplink packet now and then...
(Pay attention Microsoft WMP team)
try this program:
https://www.handango.com/PlatformPr...og=30&txtSearch=gprs§ionId=0&platformId=2
GPRS socket
Could anyone send me a sample code creating and using socket over GPRS ??
I ve only found how to send HTP request over GPRS in the forum.
I d like to be able to send packets in UDP for a VoIP softphone.
THANK YOU FOR YOUR HELP
:?:
HI all !
We have program writen in eVC that open serial port. The program open serial port, is returned handle, program is sending data but no electric signal sent to our device. Is need any incoming signel to MDA and what signal ?
Thanks
Honza.
not quite sure what exactly, but it is true that the serial port only starts giving signals when it is connected.
I work in VB.NET but use a free DLL: CFSerialClass.dll from Richard Grier. http://www.hardandsoftware.net/
It works excellently!
I am interested to know what baud rate you are using. I have noticed problems with TX data on the XDA1 with less than 1200 baud.
2400 and above are fine and 1200 can be a problem with missed characters.
Receive is always fine but TX does not work, I found it helped to write multiple characters and not 1 at a time.
Anyone else had this happen ?
I do not know if you are asking me this, but my app uses over 9600 without errors, because I use the DRS and DTR (Data Set Ready and Data Terminal Ready) signals (handshaking). With this option I have the sending device wait until I am ready.
So the receiving application controls when the sender can send.
Honza said:
:?:
HI all !
We have program writen in eVC that open serial port. The program open serial port, is returned handle, program is sending data but no electric signal sent to our device. Is need any incoming signel to MDA and what signal ?
Thanks
Honza.
Click to expand...
Click to collapse
It is OK, now.
EscapeCommFunction is malfunction. THANKS.
I am trying (unsuccessfully so far) to develop a program that will create a data (modem) connection to a modem connected to any other phone. I then want to transfer a small file using xmodem.
I have done extensive searches and tried solutions with TAPI calls based on samples I have found. I can dial the number of my laptop from the i-mate and the laptop on my desk rings. I tell it to pickup the line (ATA) and it does, but there is no "LINECALLSTATE_CONNECTED" from the "lineInitialize" callback function on the imate. All I get is a "LINECALLSTATE_DISCONNECTED" with the type as "LINEDISCONNECTMODE_UNREACHABLE". finally the it all hangs up, no connection.
I seem to be banging my head against a wall at the moment. There must be many of you out there who have done this or very similar.
I can post source is you want that type of thing, but I dont expect anyone to debug my app, but any pointers or others experiences are appreciated. I have come across the RIL interface, but I get the impression that TAPI is the "correct" way.
Thanks in advance.
Frustrated...
Have you got data enabled on your SIM. I was also banging my head against a wall until I thought I would check that with my service provider. There are 2 data things they can enable, one is fax but there is also data. Without data enabled you will never get a sucessfull modem connection.
arrhh!.. that's is. lol. I knew it would be something silly. Ill call today.
Thanks also. God bless you.
Well sorry to say that was not the issue, I still only get repeated
"LINEDISCONNECTMODE_UNREACHABLE"
errors. I am starting to wonder if I am just getting really bad lines. Can someone who has made a modem connection from the PPC to a desktop modem please post their experience on how reliable it is and what type of connection speed it should connect at (9600? 1200? 300? any connection?).
Is their any working sample code for creating a data connection from the PPC using the TAPI?
I will be happy to publish the code to the small project I am doing so future developers have something to work from as I havent been able to find a working example so far. (when it works that is)
Any help appreciated.
Thank-you
Figured out why it would not connect, for anyone else who has similar problems. Mine was the "CSC Line Type" option in the connection settings area.
It was set to "9600 v110" and "Non-transparent".
Im in australia, I understand the v.110 is the american standard, I changed it to
"9600 v.32" and "Non-transparent" and it connects fine. (dont you hate this type of bug)
Im still unsure what the "Transparent" and "Non-transparent" are todo with, if anyone could expain it would be appreciated.
I am glad you got it working. So I guess your code must be OK. I did not set any special communication mode so I guess that my XDA must of been set correctly anyway. It seems sensible that you are supplied with a setup for the country your device is meant for. I say this is bad of the provider.
How do you get to this setting ? I can't even seem to find it on my XDA. I have got a CSD setting that has a choice of 'Analogue' or 'ISDN' mode, mine is set to 'Analogue'.
I did post some code on this forum that is cut from an application I wrote, have a look at
http://forum.xda-developers.com/viewtopic.php?p=7857&highlight=#7857
Cheers
Paul
The code actually worked almost first time when I had all the connection settings right. Ive got the XModem transfer working now also.
The "CSD Line Type" on my device (an i-mate) is an icon in the setting connection tab. In the same tab there is also
"Beam" - allows you to turn on recieve all incoming beams
"Bluetooth" - on/off/discoverable and bonding
"Connections" - normal connection setup
"GPRS Settings" - PAP/CHAP auth and class 8(4RIT)/class 10(3R2T)
not sure what the different GPRS settings are for either, but that side seems to work.
Hey to you all,
I'm trying to set up a CSD connection via RIL , AT commands and TAPI!!! You seem to have accomplished the TAPI solution which i have not started yet, could you advice me on the necessary TAPI functions to use in order to make this work ?
Any help would be very appreciated. Thanks to all.
Have you seen this link?
http://forum.xda-developers.com/viewtopic.php?t=1716&highlight=csd
I am in the testing stage on a soon to be released program. It uses the phone and works 100% on my xda mini, xda II, XDA I but on the atom I can only get outward bound call to work with data.
normal opperation:
OFFERING
lineSetCallPrivilege
lineAnswer
CONECTED
lineGetID
SetCommState
SetCommTimeouts
......15 -20 seconds
CONECTED
read etc.
with the atom all goes for outbound calls but with inbound calls the 15-20 second delay when the modems talk is 0 seconds. The remote party still stops for 15-20 seconds and then it gets a connected message.
the handle i get for the serial port when answering a call dose not cause any read/write errors such as 6(bad handle) it just times out depending on my settings.
Has anyone succesfully answered and received data with an atom?
Dose anyone have a link to the manufacturess (quanta) site so I can ask if they implemented the TSPI_lineGetID fully.
I would just flush the atom if I owned another mobile 2005, but until then I cant be sure if its the hardware the operating system or my code.
I have confirmation that my code is good and wm2005 is good. My friend bought a jamin and we tested it.
edit:
replace:THE ATOM DOSE NOT WORK. with:MAKES MORE PROBLEMS THAN ITS WORTH FIXING...
If you are thinking of bying it I strongly recomend not doing so. I will be buying a jamin or kjam in a couple of weeks and never look back to the atom. IMO the origional XDA is better than the atom, it isn't fancy but its never let me down.
I seem to have found a very strange fix for this problem. I have been opening the line using lineOpen() and passing a dwCallbackInstance of 1. This has worked well on every device and because the documentation says...
User-instance data passed back to the application with each message associated with this line or with addresses or calls on this line. This parameter is not interpreted by TAPI.
I assumed it would have no effect on the way a call is made other than if I use it to sort out messages. Today I changed this to an arbitrary 3019 while cleaning up some of my code, just to make sure I am probably not conflicting with other people programs and now the atom can answer calls properly.
The timing of the line event messages is still wrong and my ui looks like its malfunctioning but after waiting the normal time for a connection the read/write opperations succeed. I have not changed any other code in relation to how the call is sent or answered so this baffles me but at least it works.
This may not be related, but I think the whole implementation of KernelIOControl function is a bit different on the atom then on most other phones (and PPC in general).
I encountered this when I tried to retrieve the devices UUID with a buffer bigger that 16. On most other devices it should be 36 or 40 (which actually matches, by size if not by content, the MSDN documentation) but on atom it was 52 (if I am not mistaken).
Very odd.
I had not noticed that, its a long time since I used the id but my old code still works. Its probably because I use a huge buffer the difference was not causing any problems.
Using AP3.0 I seem to have a very unique problem as I can not find any references to it, so I would like to debug the radio or at least look at what is going on between the cell company(fido) and the phone. I have 10+ years of c/c++.
The problem is that the phone is not connecting 50% of all calls in or out. If I dial out, after 3 seconds it hangs up. Inbound calls are fw to vm.
How would I go about producing a log file to begin with?
Thanks
The thread below is for an application built into most WM phones (but not the Athena) which shows the cellular engineering data coming from the celluar radio. Unfortunately most of the functions only appear to work for a very short time before they lock up, which is probably why the application wasn't included in our Athenas. However, it does demonstrate that its possible to interface with the radio - if you can find the documentation that tells you how. Works great on my wife's Tilt.
If you manage to write a similar program that works on our phones, please post it!
http://forum.xda-developers.com/showthread.php?t=431971