Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


How can I use AT-Commands?


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-07-2007, 07:49 AM
Newbie
 
Join Date: Sep 2007
Posts: 9
Question How can I use AT-Commands?

Hi,
How can I use AT-Commands (like getting current gsm provider etc) with basic4ppc? Do I have to use the serial commands?
Does anybody have an example or a usefull libraray that can ?
tx
Reply With Quote
  #2 (permalink)  
Old 09-07-2007, 08:39 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,563
Default

Do you have a modem connected to your device?
You can use the Serial library to send AT commands (send it like a regular string).
Reply With Quote
  #3 (permalink)  
Old 09-07-2007, 08:45 AM
Newbie
 
Join Date: Sep 2007
Posts: 9
Default

Nope, I want to send the commands to the gsm device of my HTC Prophet. Do I have to use serial communication however it is not an external device?
Btw, any idea which COM-port, baud rate etc I have to use?
Reply With Quote
  #4 (permalink)  
Old 09-07-2007, 09:31 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,563
Default

Assuming that the internal modem exposes a virtual port you could use the serial library to communicate with it.
If the port is described in the registry, you can use the code from this post to find it:
Reading com ports information from the registry

What are you trying to achieve? Maybe there is a simpler way to do it.
Reply With Quote
  #5 (permalink)  
Old 09-07-2007, 10:26 AM
Newbie
 
Join Date: Sep 2007
Posts: 9
Default

First of all, thanks a lot for your help!
Iīm trying to get the current CellID of my mobile. With this information (and maybe some more) Iīll try to calculate the current position. This is of course not exact, but at least in cities the tolerance is only ~50m.
So I could 'emulate' a GPS device or build a simple location based service... there are many possibilities ; )
I already used the program you mentioned, but it only displays that COM1 is my Communication port (well, ASync I guess) and COM4 is my Infrared Port. 0,2,3 and 9 are displayed but without a description.
Iīm currently playing around with serial commands, but the port does not seem to open or send any information...
Iīll try different ports and baud-rates now, maybe I get it working.

EDIT: Hey, sometimes the port opens. And immediately after that, the program crashes (including b4ppc)...

Last edited by blackwinged : 09-07-2007 at 10:32 AM.
Reply With Quote
  #6 (permalink)  
Old 09-07-2007, 10:39 AM
dzt's Avatar
dzt dzt is offline
Basic4ppc Veteran
 
Join Date: May 2007
Location: Greece
Posts: 352
Awards Showcase
Forum Contributer 
Total Awards: 1
Default

Hello,

I think that there is not a virtual com port for a windows mobile (phone) targeting the GSM module.
So, can't send directly AT commands.

It should ne some other way to read relative info.
__________________
Dimitris Zacharakis
http://www.terracom.gr
Reply With Quote
  #7 (permalink)  
Old 09-07-2007, 10:49 AM
Newbie
 
Join Date: Sep 2007
Posts: 9
Default

So...when I connect from a windows machine to my mobile I should be able to send the commands (should - didnīt work for me either). At least I read so. But I canīt do this from the device itself? I donīt hope so...
Reply With Quote
  #8 (permalink)  
Old 09-12-2007, 12:57 PM
Newbie
 
Join Date: Sep 2007
Posts: 9
Default

I found a dll on an older website that makes it possible to get the cell information I need.
its here
I manage creating an object from the file MDAGetCellDll.dll, but it doesnīt return the information I need.
Now Iīm quite new to basic programming languages - in case that anyone has tried (or is going to try) this with success, please tell me.

I found that many ppl are looking for a solution to get cell ids, so this would be very helpful.
Reply With Quote
  #9 (permalink)  
Old 09-12-2007, 01:18 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,563
Default

I haven't tried it, but you should try to put the native dll mdaatcom.dll in basic4ppc folder: \Program Files\Basic4ppc
Reply With Quote
  #10 (permalink)  
Old 09-20-2007, 09:34 AM
Newbie
 
Join Date: Sep 2007
Posts: 9
Default

I just don´t get any results... Only empty Strings are returned from the functions.
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 10:05 AM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0