Using a Java application to dial a mobile / cell phone via Bluetooth

J

jwlawler

I want to add a facility to some of my Java applications on a lap top
to dial phone numbers on my mobile / cell phone using Bluetooth. Note
that I am not talking about a dial up connection to the internet, just
an ordinary voice call initiated by the Java application. I have got
as far as downloading the Avetana implementation of JSR-82 and running
its demo application. This finds various devices and lists their
services. It will connect to some but not others. It is not obvious
that it will do much more. Also, it is not obvious which service will
allow me to make the call. However, it must be possible since I can
use my PDA to initiate a call in the way I want to. Even if I figure
out the service, I need to what to send to it and how. The phone that
I am testing with is a Sony Ericson T68i but I would hope that I could
use other phones. I am having trouble finding documentation or
examples doing this sort of thing.

Seán O'Leathlóbhair
 
B

Brandon McCombs

I want to add a facility to some of my Java applications on a lap top
to dial phone numbers on my mobile / cell phone using Bluetooth. Note
that I am not talking about a dial up connection to the internet, just
an ordinary voice call initiated by the Java application. I have got
as far as downloading the Avetana implementation of JSR-82 and running
its demo application. This finds various devices and lists their
services. It will connect to some but not others. It is not obvious
that it will do much more. Also, it is not obvious which service will
allow me to make the call. However, it must be possible since I can
use my PDA to initiate a call in the way I want to. Even if I figure
out the service, I need to what to send to it and how. The phone that
I am testing with is a Sony Ericson T68i but I would hope that I could
use other phones. I am having trouble finding documentation or
examples doing this sort of thing.

Seán O'Leathlóbhair

This is more related to your cell phone than Java since once you figure
out what the phone needs then you could theoretically do it in any
language that has available APIs. I suggest you try a newsgroup or a
forum that contains information about your phone or about the particular
action you are trying to accomplish rather than about the language you
are trying to use.
 
J

jwlawler

This is more related to your cell phone than Java since once you figure
out what the phone needs then you could theoretically do it in any
language that has available APIs. I suggest you try a newsgroup or a
forum that contains information about your phone or about the particular
action you are trying to accomplish rather than about the language you
are trying to use.- Hide quoted text -


Thank you.

Are you saying that the likely to be specific to the phone? This
would render the project rather pointless. The T68i is just what I
happened to be using for initial testing and I would want the solution
to work with most, if not all, Bluetooth phones. My iPAQ can use
pretty much any Bluetooth phone to dial as I wish, surely it does not
have specific code for a huge range of ranges, including ones that
were released after it. I have just tried with my wife' Motorola V3
and it worked just as easily. I think that phone is newer than the
iPAQ.

Seán O'Leathlóbhair
 
B

Brandon McCombs

Thank you.

Are you saying that the likely to be specific to the phone? This

No, although it could be. What I was trying to say is that this is less
about Java and more about the API that the phone supports (whether the
API is based on Java is irrelevant in some respects).
would render the project rather pointless. The T68i is just what I
happened to be using for initial testing and I would want the solution
to work with most, if not all, Bluetooth phones. My iPAQ can use
pretty much any Bluetooth phone to dial as I wish, surely it does not
have specific code for a huge range of ranges, including ones that
were released after it. I have just tried with my wife' Motorola V3
and it worked just as easily. I think that phone is newer than the
iPAQ.

Seán O'Leathlóbhair

Start doing your research to find out what API and specification are
needed to communicate with a phone using Bluetooth. Java is a language
and the API could be written in Java (or C++, or C, or assembly, etc.)
but language is just the means to the end. The "end" being the fact that
you need to have an API; the 'I' after all means "interface".
 
J

jwlawler

No, although it could be. What I was trying to say is that this is less
about Java and more about the API that the phone supports (whether the
API is based on Java is irrelevant in some respects).



Start doing your research to find out what API and specification are
needed to communicate with a phone using Bluetooth. Java is a language
and the API could be written in Java (or C++, or C, or assembly, etc.)
but language is just the means to the end. The "end" being the fact that
you need to have an API; the 'I' after all means "interface".- Hide quoted text -

Indeed Java is just a language but it is the one that I am working
with. If necessary, I could switch to something else, e.g. C++, but I
would like to stay in Java if possible.

I have done some research and experimentation. If I use Windows "My
Bluetooth Places" to establish a connection to the serial port on my
phone and then use Hyper Terminal to connect to the COM port for the
connection, I can send Hayes commands to phone e.g. ATDT01234-567890;
and this does what I want.

So, I then went back to Java. Based on the Avetana example, wrote a
program which established a connection to the phone, opened a stream
to it and wrote the same string, Unfortunately, the phone paid no
attention to the string. I guess that I have not established the same
type of connection.
 
J

jwlawler

Indeed Java is just a language but it is the one that I am working
with. If necessary, I could switch to something else, e.g. C++, but I
would like to stay in Java if possible.

I have done some research and experimentation. If I use Windows "My
Bluetooth Places" to establish a connection to the serial port on my
phone and then use Hyper Terminal to connect to the COM port for the
connection, I can send Hayes commands to phone e.g. ATDT01234-567890;
and this does what I want.

So, I then went back to Java. Based on the Avetana example, wrote a
program which established a connection to the phone, opened a stream
to it and wrote the same string, Unfortunately, the phone paid no
attention to the string. I guess that I have not established the same
type of connection.


I solved it and the problem was quite trivial. The Hayes commands
must be terminated with "\r\n" or just "\r" but not just "\n". As
simple as that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top