BTW, when I run CommTest.java I get as a result in the console:

Searching for devices...
Test complete.
Error 2 opening registry key HARDWARE\DEVICEMAP\SERIALCOM

When I step into the debugger he only sees LPT1 and LPT2.


On Feb 4, 4:59 pm, Jan Hulst <[email protected]> wrote:
> Hi Pradeepm,
>
> Installation instructions here:http://smslib.org/doc/installation/
> About Java Comm installation it says:
> ++++++++++++++++++++++
> Java Comm Installation
> The installation procedure for both the old Java Comm v2 and the new
> Java Comm v3 is identical.
> Java Comm v2 is for Win32 systems and it is available for download at
> the Downloads section.
> ...
> To install it, unzip the downloaded archive file in a temporary place
> and do the following copies:
>
>     * File comm.jar should go under JDKDIR/jre/lib/ext/
>     * File javax.comm.properties should go under JDKDIR/jre/lib/
>     * Library files (i.e. win32com.dll for Win32 or the .so Linux
> library files) should go under JDKDIR/jre/bin/
>
> If you have a separate JRE directory, do the same copies for the
> JREDIR directory!
> +++++++++++++++++++++++
>
> I have a C:\java directory with subdirectories:
> jdk1.6.0_11
> jre6.0_11
>
> comm.jar I have both in:
> jdk1.6.0_11\jre\lib\ext
> jre6.0_11\lib\ext
>
> javax.comm.properties I have in:
> jdk1.6.0_11\jre\lib
> jre6.0_11\lib
>
> win32com.dll I have in:
> jdk1.6.0_11\jre\bin
> jre6.0_11\bin
>
> So where do you think I went wrong?
>
> Thank in advance.
>
> Jan/Amsterdam
>
> On Feb 4, 4:38 pm, Jan Hulst <[email protected]> wrote:
>
> > Logged in as administrator gives the same result.
>
> > "modem-bundled application"?   I run nothing but SendMessage on my
> > machine.
>
> > I cannot imagine that Vista causes problems.
>
> > Started the debugger:
>
> > Result: Exception in class CommPortIdentifier.
> > Here is where the exception originated:
>
> > public static CommPortIdentifier getPortIdentifier(String portName)
> >         {
> >                 if (classCommPortIdentifier == null) { throw new 
> > RuntimeException
> > ("CommPortIdentifier class not found"); }
> >                 CommPortIdentifier port;
> >                 try
> >                 {
> >                         //get the string of real objects
> >                         Method method = classCommPortIdentifier.getMethod
> > ("getPortIdentifier", String.class);
> >                         port = new CommPortIdentifier(method.invoke(null, 
> > portName));
> >                 }
> >                 catch (InvocationTargetException e)
> >                 {
> >                         throw new RuntimeException(new 
> > RuntimeException(e.getTargetException
> > ().toString()));
> >                 }
> >                 ...
>
> > Exception in line: port = new CommPortIdentifier(method.invoke(null,
> > portName));
> > portName = COM1
> > method != null
> > e is of type InvocationTargetException with target=NoSuchPortException
>
> > BTW in SendMessage I did not change any of the 5 parameters of
> > SerialModemGateway constructor, incl. "Nokia" and "6310i", since I
> > have no idea what to fill in here. (I swapped my T-Mobile Compact IV
> > back to my old T-Mobile Compact III since the desktop at least
> > recognises the latter in WMDC).
>
> > Cheers,
>
> > Jan/Amsterdam
>
> > On Feb 3, 8:32 pm, Thanasis <[email protected]> wrote:
>
> > > Hi,
>
> > > I have no experience on Vista. The error read about an non-existent
> > > port, but of course this is not the actual cause. The actual error is
> > > misinterpreted.
>
> > > I remember an old post from another friend who reported that JavaComm
> > > is working on Vista...
>
> > > Could this have anything to do with Administrative priviledges?
> > > Are you running any modem-bundled application?
>
> > > On Feb 3, 5:04 pm, Jan Hulst <[email protected]> wrote:
>
> > > > Managed to make some progress!
>
> > > > Followed carefully the instructions:http://smslib.org/doc/installation/
>
> > > > Removed all references to smslib*.jar as you advised.
>
> > > > This time I did a build of smslib myself. Succeeded.
>
> > > > I had to copy tools.jar from jdklib to jrelib though and had to rename
> > > > in build.properties
> > > > commons-net-1.4.1.jar into commons-net-2.0.jar.
>
> > > > When running from the Eclipse ide I got this error:
>
> > > > org.smslib.GatewayException: Comm library exception:
> > > > java.lang.RuntimeException: javax.comm.NoSuchPortException
>
> > > > Saw somewhere here on this site your advise to do this:
>
> > > > D:\smslib\dist\classes>java -Dsmslib.debug examples.modem.SendMessage
>
> > > > Result:
>
> > > > Example: Send message from a serial gsm modem.
> > > > SMSLib: A Java API library for sending and receiving SMS via a GSM
> > > > modem or other supported gateways.
> > > > This software is distributed under the terms of the Apache v2.0
> > > > License.
> > > > Web Site:http://smslib.org
> > > > Version: 3.3.3
> > > > 0 [main] INFO org.smslib  - SMSLib: A Java API library for sending and
> > > > receiving SMS via a GSM modem or other supported gateways.
> > > > This software is distributed under the terms of the Apache v2.0
> > > > License.
> > > > Web Site:http://smslib.org
> > > > 0 [main] INFO org.smslib  - Version: 3.3.3
> > > > 0 [main] INFO org.smslib  - JRE Version: 1.6.0_11
> > > > 15 [main] INFO org.smslib  - JRE Impl Version: 11.0-b16
> > > > 15 [main] INFO org.smslib  - O/S: Windows Vista / x86 / 6.0
> > > > 47 [SMSLib-WatchDog] DEBUG org.smslib  - WatchDog started.
> > > > 47 [SMSLib-WatchDog] INFO org.smslib  - WatchDog running...
> > > > 47 [Thread-1] INFO org.smslib  - GTW: modem.com1: Starting gateway,
> > > > using Generic AT Handler.
> > > > 62 [Thread-1] INFO org.smslib  - GTW: modem.com1: Opening: COM1 @57600
> > > > Error 2 opening registry key HARDWARE\DEVICEMAP\SERIALCOMM
> > > > org.smslib.GatewayException: Comm library exception:
> > > > java.lang.RuntimeException: javax.comm.NoSuchPortException
> > > >         at org.smslib.modem.SerialModemDriver.connectPort
> > > > (SerialModemDriver.java:92)
> > > >         at org.smslib.modem.AModemDriver.connect(AModemDriver.java:
> > > > 110)
> > > >         at org.smslib.modem.ModemGateway.startGateway
> > > > (ModemGateway.java:126)
> > > >         at org.smslib.Service$1Starter.run(Service.java:222)
>
> > > > D:\smslib\dist\classes>
>
> > > > I modified the class to try com2, com3 and com4, with the same result.
>
> > > > There was a connection between my mobile and windows device management
> > > > application while trying this out.
> > > > Same result if I had WDMC application closed.
>
> > > > Any suggestions?
>
> > > > Thanks in advance.
>
> > > > Jan/Amsterdam
>
> > > > On Feb 3, 4:34 am, Thanasis <[email protected]> wrote:
>
> > > > > Ok, lets do the following:
>
> > > > > * Remove ALL traces of smslib related .jar files from your system.
> > > > > * Go to the smslib directory. Run "ant compile-smslib".
> > > > > * Go to dist/classes subdirectory and run "java
> > > > > examples.modem.SendMessage".
>
> > > > > Is this one running?
>
> > > > > On Feb 2, 9:21 pm, Jan Hulst <[email protected]> wrote:
>
> > > > > > I forgot: I am on the win32 (Vista) platform.
>
> > > > > > On Feb 2, 8:18 pm, Jan Hulst <[email protected]> wrote:
>
> > > > > > > Hello Thanasis,
>
> > > > > > > I checked the setup as described 
> > > > > > > here:http://smslib.org/doc/installation/
>
> > > > > > > I don't understand why the jre cannot find the class
> > > > > > > CommPortIdentifier; there are even 2 versions of this class in the
> > > > > > > build path, one in smslib-3.3.3.jar and one in smsserver-3.3.3.jar
> > > > > > > (which one does he need btw?).
>
> > > > > > > The error is located in SendMessage.java/srv.startService();
>
> > > > > > > Thanks in advance.
>
> > > > > > > Jan/Amsterdam
> > > > > > > .
>
> > > > > > > On Jan 29, 2:45 pm, Thanasis <[email protected]> wrote:
>
> > > > > > > > Hi,
>
> > > > > > > > The error seems to be attributed to incorrect javacomm 
> > > > > > > > installation,
> > > > > > > > as some classes seem to be missing / not found. Can you please 
> > > > > > > > review
> > > > > > > > the steps? Are you on Win32 platform?
>
> > > > > > > > As far as whether the phone can be used, the only safe solution 
> > > > > > > > would
> > > > > > > > be to test it.
>
> > > > > > > > Thanks :)
>
> > > > > > > > On Jan 29, 11:32 am, Jan Hulst <[email protected]> wrote:
>
> > > > > > > > > Hello Thanasis,
>
> > > > > > > > > First of all, thanks for providing smslib!
>
> > > > > > > > > I have a T-Mobile MDA Compact IV high end mobile phone, 
> > > > > > > > > connected to
> > > > > > > > > my computer with a USB cable. I managed to synchronize my 
> > > > > > > > > telephone
> > > > > > > > > data, email addresses etc. with it. I want to use this MDA as 
> > > > > > > > > a modem
> > > > > > > > > to send SMS messages from java to a simple cheap Nokia 
> > > > > > > > > prepaid mobile
> > > > > > > > > phone. Questions:
>
> > > > > > > > > 1. How can I decide if the MDA Compact IV is suitable to 
> > > > > > > > > serve as a
> > > > > > > > > modem using smslib?
>
> > > > > > > > > 2. While running the example SendMessage.java I get the 
> > > > > > > > > following
> > > > > > > > > output:
>
> > > > > > > > > Example: Send message from a serial gsm modem.
> > > > > > > > > SMSLib: A Java API library for sending and receiving SMS via 
> > > > > > > > > a GSM
> > > > > > > > > modem or other supported gateways.
> > > > > > > > > This software is distributed under the terms of the Apache 
> > > > > > > > > v2.0
> > > > > > > > > License.
> > > > > > > > > Web Site:http://smslib.org
> > > > > > > > > Version: 3.3.3
> > > > > > > > > Exception in thread "Thread-1" 
> > > > > > > > > java.lang.ExceptionInInitializerError
> > > > > > > > >         at org.smslib.modem.SerialModemDriver.connectPort
> > > > > > > > > (SerialModemDriver.java:67)
> > > > > > > > >         at 
> > > > > > > > > org.smslib.modem.AModemDriver.connect(AModemDriver.java:110)
> > > > > > > > >         at 
> > > > > > > > > org.smslib.modem.ModemGateway.startGateway(ModemGateway.java:126)
> > > > > > > > >         at org.smslib.Service$1Starter.run(Service.java:222)
> > > > > > > > > Caused by: java.lang.RuntimeException: CommPortIdentifier 
> > > > > > > > > class not
> > > > > > > > > found
> > > > > > > > >         at org.smslib.helper.CommPortIdentifier.<clinit>
> > > > > > > > > (CommPortIdentifier.java:76)
> > > > > > > > >         ... 4 more
>
> > > > > > > > > Any suggestions how to proceed?
> > > > > > > > > Thanks in advance!
> > > > > > > > > Jan/Amsterdam
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"SMSLib User Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/SMSLib?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to