Solved

Using Java to Make a GPRS Connection with a Wavecom Fasttrack (GPRS) Modem

Posted on 2003-11-20
9
1,292 Views
Last Modified: 2013-12-09
Hi,

I have a basic Java application that communicates with over a GPRS connection. Until now we have been using the Motorola v66e GPRS mobile phone connected to a USB port as our GPRS modem. This phone comes with a handy tool called GPRS Manager which is used to make the initial connection to the APN (or whatever?).

I now have write a Java application that actually makes the connection aswell as communicate over it, but using a new Wavecom GPRS Modem connected to com1 and installed as a Standard Windows Modem (9600). I was wondering if there was a Java API out there that would allow me to make a connection (with the least hassle - ie with the smallest learning curve, as I know near to nothing about AT commands etc) or if someone has a simple piece of code in Java that can make a GPRS connection using the Wavecom Modem (or any modem, as I can adapt it to my own needs if I have to)?

Thanks
Scott Curtis
0
Comment
Question by:scurtis_1
  • 4
  • 3
  • 2
9 Comments
 
LVL 4

Expert Comment

by:SimonTay
ID: 9971484
The Siemens TC45 includes a JVM, so the whole application will run on the module.  The TCP/IP stack is also included.  See www.tdc.co.uk for more information.  TDC also have a terminal (i.e. boxed, ready to go TC45) if you need one.  It's not on the web site, yet, but you can get more information if you email TDC.

Simon
0
 
LVL 4

Accepted Solution

by:
SimonTay earned 250 total points
ID: 9985076
In the TC45, we simply do this :

      // Setup Gprs
      String response;
      response = ata.send("AT^SJNET=GPRS," + gprsPoint + "," + gprsUser + "," + gprsPass + "\r");

      if (response.indexOf("OK") >= 0)
      {
        System.out.println("GPRS Setup : OK " + gprsPoint);
      }
 

Easy!

Simon
0
 
LVL 4

Expert Comment

by:SimonTay
ID: 10250922
I've also put a presentation about the TC45 at www.tdc.co.uk.

http://www.tdc.co.uk/presentations/tc45_intro.htm

Simon
0
 
LVL 5

Assisted Solution

by:andres101
andres101 earned 250 total points
ID: 10288160
I'm working on the exact same thing. I am able to connect GPRS, but not use it. I still need to implement an IP Stack. Have you made any progress? Please post if you do, I'll do the same!

In my code, I have a Modem class with a method sendCommand that takes two parms. The first parm is the command to send over the port, the second is what response it should expect from the modem. if the second parm is false, it doesn't wait for a response. methos return true or false. the apn in the third command should be set to your apn (normally "internet"). also change 115200 to your baud rate.

These are the AT Commands to start the GPRS.
            if (modem.sendCommand("AT+FCLASS=0;&W\r\n","OK")) {
                  //set modem into GPRS mode
                  if (modem.sendCommand("AT+CGATT=1\r\n","OK")) {
                        if (modem.sendCommand("AT+CGDCONT=1,\"IP\",\""+ apn +"\"\r\n","OK")) {
                              if (modem.sendCommand("AT+CGQREQ=1,0,0,3,0,0\r\n","OK")) {
                                    if (modem.sendCommand("AT+CGACT=1,1\r\n","OK")) {
                                          if (modem.sendCommand("AT+IPR=115200;&W\r\n","OK")) {
                                                //connect GPRS
                                                modem.sendCommand("ATD*99***1#",false);
0
VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

 
LVL 5

Expert Comment

by:andres101
ID: 10288164
the above commands are for a Wavecom FastTrack modem
0
 

Author Comment

by:scurtis_1
ID: 10288265
I did manage to get this working but it had to be fudged slightly.

We had to set the modem up as a standard windows modem with some particular settings (give me a shout if you want them and I can email a document explaining how we got it working - scott_b_curtis@mailblocks.com)

I had to make the modem connect before my java stuff happened (every 15 minutes) so I used Windows Schedular to run a batch file which used RASDIAL to dial the modem and then, once connected, my java process was kicked off. With my short time scales I didn't have enough time to make it completely Java driven as you (andres101) seem to be close to doing! If you do get a complete example together I would be really be glad to see a copy so that I can make my own system cross platform again!!

Thanks
Scott
0
 
LVL 5

Expert Comment

by:andres101
ID: 10288896
i have it set up as a windows modem, but we are porting from C++ to Java as we are going to use the product on Linux. I think I will follow your route and set the connection to automatically connect and retry on failure. In my code I will just keep on trying to connect to the server.
0
 
LVL 5

Expert Comment

by:andres101
ID: 10676564
thx for the assist... not sure i deserved it though...

technically i answered your question: "or if someone has a simple piece of code in Java that can make a GPRS connection using the Wavecom Modem" - my code makes a connection... just can't do anything with it.

have you made any progress or are you still using the windows dialup?

i have found a tcpip stack written completely in java:
http://www.jopdesign.com/ejip/

i can't make any sense of it though... but i must admit, i didn't try very hard.
0
 

Author Comment

by:scurtis_1
ID: 10676628
Ooops! Clicked the wrong button! :-) Enjoy the points!
0

Featured Post

Free camera licenses with purchase of My Cloud NAS

Milestone Arcus software is compatible with thousands of industry-leading cameras for added flexibility. Upon installation on your My Cloud NAS, you will receive two (2) camera licenses already enabled in the software. And for a limited time, get additional camera licenses FREE.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Wifi(LAN) GW being picked up 2 45
Cisco WLC: Blocking specific MAC address 3 61
iPad Won't Connect 16 75
2008 R2 Radius Server for wireless authentication 4 42
Need WiFi? Often, there are perfectly good networks that don't have WiFi capability - and there's a need to add it.  - Perhaps you have an Ethernet port into a network but no WiFi nearby. - Perhaps you have a powerline extender and no WiFi at the…
With the purchase of CloudCommand by Comcast customers are left in a bind as subscriptions expire and render the AP's disabled. The following will explain how to flash your Ubiquiti AP's with CloudCommand firmware back to Ubiquiti firmware. HOWTO…
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now