Get XDA to respond to AT commands. - Windows Mobile Development and Hacking General

Ive been looking around for a while to find ways to talk the GSM module with AT Commands. There seem to be a few ways:-
1) open a line using tapi the "cellular line", in datamodem passthru mode , getting a comm handle using lineGetID , write and reading commands.
2) open comm port 2 (which then blows up the phone normal comms) and writing and reading (found in the serial comms bit in this forum).
3) open comm port 9 (the virtual comm port) and reading and writing.
My problem is however that all these actually run code with out returning any errors, but i can not get a response from modem. Ive tried Dialing and just inquiring with
"AT\r\n", and would expect back "OK\r\n" like any normal modem. Has Anyone got this working or got any ideas? The forum hints that AT commands are possible but doesnt actually show you how..
Ill be grateful for a reply.
Thanks.

try to turn echo on to read reply.

( for newer roms, with wmodem.exe )
the trick is to send this ioctl after opening com2:
Code:
DeviceIoControl (hCom,0xAAAA5679L, {0x84,0}, 2,0,0,0,0)
( with {0x84,0} I mean a buffer containing these bytes )
you will be talking to the gsm together with the rest of the phone.
to silence the RIL layer, send this ioctl to the RIL1: device.
Code:
DeviceIoControl(hRil, 0x03000314L,0,0, &rildevresult, sizeof(DWORD), &nReturned,0)
looking at serial3.dll, 0xaaaa5677 and 0xaaaa5678 also seem to be
valid ioctls. - I have not experimented yet to figure out
what they do.
COM9: is used by rsupgrade, to update the radio rom.
( I sort of figured out how the protocol works, but have not been
able to actually send them through com9, I documented what I found on this page.)

I have been struggling with this for some time also. ok, so I opened COM2: and got my hCom to pass to
DeviceIoControl (hCom,0xAAAA5679L, {0x84,0}, 2,0,0,0,0)
and continue with the normal Read/Write functions (the same as writing to, say, COM1
... but still no response!
Do I also need 'to silence the RIL layer'? if so, where do I get hRil from for:
DeviceIoControl(hRil, 0x03000314L,0,0, &rildevresult, sizeof(DWORD), &nReturned,0)
Thanks
Andrew

Source Code anybody ??
Can somebody stop the ### and let the ppl know how to get that internal phone responding ??? Somebody out there must of made it work !!!! Some programs exist that do it but they dont wanna give their source code -!

Re: Source Code anybody ??
nutitija said:
Can somebody stop the ### and let the ppl know how to get that internal phone responding ??? Somebody out there must of made it work !!!! Some programs exist that do it but they dont wanna give their source code -!
Click to expand...
Click to collapse
Press the "Search" link, there are lots of samples posted on this forum.

dude thats sad
how f**ken dumb do u think i am , i'm asking for a working sample , i go through the search everyday if ur so smart why dont u post one for me ???

Please take a chill pill!!

Re: dude thats sad
nutitija said:
how f**ken dumb do u think i am
Click to expand...
Click to collapse
You are really dumb - http://forum.xda-developers.com/viewtopic.php?t=3347#26389

Tapi ??
sorry for being aggressive but yeh - i dont think i'm dumb anyways - just i'm not finding what i'm looking for !!! Can u guys check out my other posts as nobody seems to respond or have any idea what i'm asking. Thanks for the link was interesting not what i'm looking for though.
If anybody could assist me on this ?? just geting a working tapi sample to make a call on an XDA programmed in eVC++ would be really nice. And yes i have had a look around ... nobody seems to have done it or just gives away functions. I would like an entire source code.
cheers for ur help guys

Re: Tapi ??
nutitija said:
just geting a working tapi sample to make a call on an XDA
Click to expand...
Click to collapse
Look at your hard disk - "C:\Program Files\Windows CE Tools\wce420\POCKET PC 2003\Samples\Win32\Cellcore\CeDialer\"
this is a dialer example. Uses TAPI.
nutitija. Try to use your brains (if you have them) and search for the info yourself. Everything is already explained in this forum or MSDN.
In my post I've provided a link to the entire source code of DLL that gets cell ID from the internal modem. Just copy&paste it into your project. If you cannot do such simple things - noone can help you.

Hi,
I try to communicate with gsm module throught the port COM9. I send at command but i have no answer.
I also try to open the port COM2 but i can't.
Somebody can help me ?
Thanks
Damien

What is COM9
Hi,
I was reading whole thread.. and found at many places that we can send data to virtual communication port, that is COM9, now what is that and how to open that and how to send - receive data from/to that.. please let me know...
thanks..

hi gregstarns, for you..
As you told,
1) open a line using tapi the "cellular line", in datamodem passthru mode , getting a comm handle using lineGetID , write and reading commands.
how you write and read from the comm port ?? can you please explain briefly... ??

In this topic and some others allready wrote. Can you read or only write?
1)You must say to RIL to drop COM-port (look DeviceIoControl)
2)Open COM2 for send commands
PS
http://forum.xda-developers.com/viewtopic.php?t=11701
look mamaich post

For COM9:
just open it after connection (use CreateFile)
and close before disconnection

i dont think u need COM 9 , im pretty much just using Com2 to send At commands .... i'm not too sure what the virtual port on COm9 does... maybe anyone wanna help ?? Maybe its to access data ?? during a datacall ??

OK wait a sec !!!! Are You saying that i should use
1) Tapi to establish a data call through COM2, by dropping RIL
2) Read data from COM9 the virtual port
I was pretty sure TAPI didnt need RIL to be dropped off as just by using the TapiMakeCall function i was able to establish a call. How would i establish a data call and read the info ??
Cheers for ur help

if i silent the RIL ....
can i still send SMS in PDU format as well as establish datacalls by an ATD command ?

couldn't able to open COM2
Hi,
It seems i got a basic problem. COM2 port of my i-mate is not opening. In these discussion i found, first I have to disconnect RIL using COM2. Infact many of here are discussing on the same. but no where i can see the code snippet which disconnet the RIL using COM2 so that i can access it for AT commands.
Hope you guys are already crossed this huddle by this time. It would be great help if you can post that piece of code.
Thanks for you all, most of the post I found to very useful and accurate.
Pramod.

Related

Source code for GPRS measurement using ril.h?

Does anybody have an easy example using RILL to see GPRS band strength.
Thanks.
I include some code I developed for this. However the calibration for this is for XDA I. For XDA II this goes too high values.
If you want to have a hack, look at:
http://forum.xda-developers.com/viewtopic.php?p=11643&highlight=#11643
I had a quick look at the xda-developers ril API, and I think this now passes the max and min possible signal strength, so it would be accurate on any device. Maybe somebody else can confirm this.
Therefore, my function to return a percentage should be something like:
static double dValue;
dValue = (double)data->SignalQuality;
dValue -= dLo;
dValue /= (dHi - dLo);
dValue *= 100;
m_dwSigQuality = (DWORD)dValue;
Hope this is of some use, sorry it's not complete.
Ben.
I have seen the topic you say before I post this
The problem is that I don't know how to use the info. that comes with the post you say.
If you look at the work completed by the xda-developers, they provided a program which shows how RIL works. Their example, last time I looked, shows how to start RIL, and listened for incomming SMS messages. To start with, find this code and add the rill calls to your program.
Find the function called 'ResultCallback'. This is called by RIL when something happens which your program may want to know about. Add to this the code I posted, starting:
if (hrCmdID == m_dwSigQualityID) {
From your own program, you now call my function containing:
m_dwSigQualityID = RIL_GetSignalQuality(g_hRil);
If this works, this will return the percentage signal strength.
Although as I said, this works well on XDA I, but needs a re-calibration for XDA II and more recent work on RIL.
Ben.
It works!
If the GPRS is connected it returns 69%, but if GPRS is not connected it returns a GSM value.
Any idea of how to make an easy dll to use this value in other program?
Thanks.
Very glad it works! Sorry about the 69%. This is fixed with the XDA II.
As far as an easy .dll, I don't know. (Or a nice easy class) Somebody here does I am sure....
Ben
Can you please attach a working ResultCallback code for the signal stregth?
I get 603% on my XDA2...
I think i did something wrong.
Thanks, Patrick
Hi,
benclewett said:
If you look at the work completed by the xda-developers, they provided a program which shows how RIL works. Their example, last time I looked, shows how to start RIL, and listened for incomming SMS messages. To start with, find this code and add the rill calls to your program.
Click to expand...
Click to collapse
Can anyone tell me where this is please?
Also, does anyone have any code for returning gprs traffic usage? - I want to report the amount of data used in the current session and also in the current month.
Thanks!
--ian

[new release] VJSMSSender Class 0 SMS

Guys, this is just to fill a request on my website
It is used to send a Class 0 SMS. It's used in exactly the same way as VJSMSSender from VJPhoneTools.
Class 0 SMS, for those who don't know, is an SMS that is sent directly to the recipient's phone and will appear immediately on the screen, without requiring the recipient to go into the Inbox. Also, the SMS is not saved in the inbox, so there is no trace of it on the phone.
Great for illicit affairs!
Please use it responsibily, I don't know if there are any special rules about Class 0 SMS, but if there are any objections I'll remove it.
Check it out on my website
V
Hi Vijay,
another fine release.. )))
THANX mate.
How you do them all ??? ))))
BTW, why would you remove it from your website?? Flash SMS is perfectly legal AFAIK.
THANX
buzz
I'm sure it is legal, but it's quite scary how it works! I love it, I'll be freaking out all of my friends... oh, what friends :shock: too much programming!
How you doing Buzz. Been quite for a while... must mean good things on their way?
V
vijay555 said:
I'm sure it is legal, but it's quite scary how it works! I love it, I'll be freaking out all of my friends... oh, what friends :shock: too much programming!
How you doing Buzz. Been quite for a while... must mean good things on their way?
V
Click to expand...
Click to collapse
YEAH!
i'm totally overloaded in work... i ave absolutely no time for my stuff... (
...but i've got some GOOD news for tomorrow.. ))
buzz
Where is this program? I cant seem to find it in your site Vj...
I am curious of how it work :wink:
What about allowing a different sender ID? E.g. another number or text.
It's there : http://www.vijay555.com/index.php?Releases:VJPhoneTools:VJSMSSender_Class0 :wink:
Good things from Buzz.....
Is that combining the extrom to storage on the Universal?????
Cheers,
chris_khho said:
Good things from Buzz.....
Is that combining the extrom to storage on the Universal?????
Cheers,
Click to expand...
Click to collapse
)
hi Chris,
the good news is HERE
buzz
Chatty said:
What about allowing a different sender ID? E.g. another number or text.
Click to expand...
Click to collapse
Yes that would be a great idea if it could be done.
vijay555 is this possible ?
TraumaTiger
Hum, how do i run this app? command line how? Can someone explain thanks.
q-biq:
download and install VJPhoneTools
http://www.vijay555.com/index.php?Releases:VJPhoneTools
and check out the page for instructions on how to use VJSMSSender.
Then, the class 0 prog works in exactly the same way as VJSMSSender.
Use GSFinder etc to make appropriate shortcuts, or use a today launcher like cLaunch etc.
TraumaTiger/Chatty: I think I could write an SMS spoofer, but I don't think it's wise. I will try to write it anyway for the fun of it (!) and tell you if it works...
V
oh koool. workin great, but do i need to change the shortcut evry time i need to send to a new phonenumber? takes to long time hehe..
and how have you created the icons on the top so i can send from there?
Once again..
VJ its possible to send to more than one recipient at the same time ?
thank you
q-biq: yep, the shortcut needs to be changed each time. It's more for use on a today screen: it was requested that you could eg send a msg to your wife on the way home with no key presses etc. VJSMS still requires you to press send, while VJSMSSender sends it straight off, so yes, it has to be manually configures each time.
More that that and it would have to work like a replacement for the inbox, and that's not what it's for (right now! perhaps in the future).
fcaeiro: no, I'm afraid VJSMSSender doesn't have a CC feature. I could try to look into it a some point, but I haven't thought about it right now...too busy coding other stuff! :shock:
V
It's definately possible to spoof the sender ID - Siemens S25 tools offered it already (if you remember that old handset).
can you explain howto spoof id??
SMS ID spoofing is easy enough in theory. I will try to write it, and if it works, I'll take feedback on whether it deserves releasing. But let me write it first
V
vijay555 said:
SMS ID spoofing is easy enough in theory. I will try to write it, and if it works, I'll take feedback on whether it deserves releasing. But let me write it first
V
Click to expand...
Click to collapse
Yaaa it good if our ID, phone number not appear...or with spoof ID...
waiting for ur progress Vijay555...
With Vodafone.se you can just put a -A- in the begining of the sms to hide your number.

RIL

Is any buddy working in the RIL now days. ????? :?:
Did any able to get the RIL_RESULT_ * notifications.
can some post some code , how to get this.
thanks, for u'r :idea: 's
What kind of details do you need?
To register for RIL_RESULT_* notifications you need to call RIL_Initialize() and pass in pointers to your result and notification handlers.
awm129 said:
What kind of details do you need?
To register for RIL_RESULT_* notifications you need to call RIL_Initialize() and pass in pointers to your result and notification handlers.
Click to expand...
Click to collapse
Thaks for the response,
Actually , i trying to check the call status (busy/not answered..)
i can not use TAPI ,and even i tried with AT commands(+CEER),but not worked
regarding RIL,
ihave sucessully done all the initlizations & i can get the Rx value,call start up ,disconnected notifications but i did not get any notifications for RIL_RESULT_BUSY etc.
if some body can post some code it will be more helpful
:?
wow its suprising , no body using the RIL :roll:
certainly we use RIL
but practically:
every device vendor (manufacture) implements own version of RIL, and every device vendor implements own modem. well, if not "every" than at least we know many versions actually on the market. it also can change when you update/change ROM version.
you can use RIL but you can check what commands are implemented in the specified device you interest, and then what AT commandes are implemented in modem
for example:
some devices response to AT command asks for CELLID, but some other devices (modems) do not
it's hard, but it exists in this status today
CellID and RxLev
maybe this can help u...
http://forum.xda-developers.com/viewtopic.php?t=3347&highlight=nicetrack
:wink: :?

How to switch Radio ON/OFF

Does anyone know how to write an application to switch radio on/off i PPC WM5?
Can you send me source ([email protected])? It could be in C++/C# or even worse
I was looking through google but nothing was helpful enough.
Thanks!
Danny, I'm still at work right now, no source code with me. I can try to send you some code a little later, subject to my brain functioning. If I don't send it tonight, please PM me tomorrow.
Basically, from memory, you have to set up a TAPI setup and toggle the radio mode there. Can't remember the details off hand though Later...
V
...originally it is meant to put audio continiously to your headphone by BT... but you can also use them offcourse as a shortcut to toggle on/off gprs, ir , bt.
Put the exe to anyplace and change shortcuts with total commander for changing the path within the files....
With thanks to VIJAY555...
Thanks Krinkiespijer!
... but what I'm waiting for is source code.
I have found tel.on-off_100.exe application which switches radio on/off but I have to write it in my own app!
Danny
Lost all day and still don't know how to do it....
Guys, I should clarify for Danny, that he's looking for a managed code solution. I've given him a pointer in native C++, but can't help with managed.
Danny, I suggest you look over http://www.opennetcf.org/ and then follow the functions I pointed you towards.
Basically you need to get a TAPI line and change the equipment state.
V
It's not that I need only managed code solution. I prefer it but native code is also enough. I was trying even understand it in native code but even msdn documentation is not enough to get by without complete source code.
Even though thanks for bothering
Hi guys, this is kinda OT here, but may i ask if there is a way to turn the Radio ON/OFF thru registry? Thanks
..no, you can only choose between always on or apps depending.
With next key key in register you can change it:
HKLM\CommConnMgr\Providers\{7c4b7a38-5ff7-4bc1-80f6-5da7870bb1aa}\connections\t-mobile]
always on dword=0=off dword=1=on
t-mobile is the name of your internetconnection

tool for monitoring cells

Hi there,
are there any devices/programs that can show all visible cell-id, not only thw one currently connected?
If you know let me know.
saulius
[email protected]
phonealarm pro can do this. once you montior the cell, you can link profiles to it and make it set your device config as you like when you come home or at your work, etc. very useful!
try type *#*#364#*#* in phone application
blondak said:
try type *#*#364#*#* in phone application
Click to expand...
Click to collapse
does not work for me
hi there,
jep thanks ...364.... works for me. is there any program that worked with cell1-cell6 info?
excellent tip. Thanks
CellProfileSwitcher can log any cell's it encounters and also near by ones. It can do more than just profile switching.
http://maniac.fschreiner.de/
h4waii said:
CellProfileSwitcher can log any cell's it encounters and also near by ones. It can do more than just profile switching.
http://maniac.fschreiner.de/
Click to expand...
Click to collapse
@h4waii
I have installed this software on HTC Universal but the prog doesnt recognise any cell. Is this device hardware limitation or I need to find proper version?
cellprofileswitcher
yes, i tried this one too...
you can check the forum and will notice that tytn gsm module is some kind different so it doesn't work.
For this reason all ideas are welcome.
I'm interested would it be posible to store data to a file, if the data is seen at the screen, suppose we enter some code (like get imie), or run program and the required information is showen on the screen...
getting info
Maybe someone could share how to get info such like cellprofileswitch returns?
Since i need to combine more information at the same time and know that cps won't manage to do it...
Yes !!!
Work in my Cruise !
Tanks Blondak

Categories

Resources