Cellular forums Home > Archive > Bluetooth discussion > March 2007 > Using a Java application to dial a mobile / cell phone via Bluetooth









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Using a Java application to dial a mobile / cell phone via Bluetooth
jwlawler@yahoo.com

2007-03-27, 12:33 pm

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=E1n O'Leathl=F3bhair

Brandon McCombs

2007-03-28, 4:33 am

jwlawler@yahoo.com wrote:
> 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.
jwlawler@yahoo.com

2007-03-28, 4:33 am

On Mar 27, 11:46 pm, Brandon McCombs <n...@none.com> wrote:
> jwlaw...@yahoo.com wrote:
>
>
> 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=E1n O'Leathl=F3bhair

Brandon McCombs

2007-03-28, 10:33 pm

jwlawler@yahoo.com wrote:
> On Mar 27, 11:46 pm, Brandon McCombs <n...@none.com> wrote:
>
>
> 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".
jwlawler@yahoo.com

2007-03-29, 7:33 am

On Mar 29, 2:38 am, Brandon McCombs <n...@none.com> wrote:
> jwlaw...@yahoo.com wrote:
ar[color=darkred]
>
>
>
> 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 quote=

d 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.

--
Se=E1n O'Leathl=F3bhair


jwlawler@yahoo.com

2007-03-30, 4:33 am

On Mar 29, 12:21 pm, jwlaw...@yahoo.com wrote:
> On Mar 29, 2:38 am, Brandon McCombs <n...@none.com> wrote:
>
>
>
>
>
op[color=darkred]
ote[color=darkred]
ust[color=darkred]
ot[color=darkred]
ing[color=darkred]
us[color=darkred]
ill[color=darkred]
re[color=darkred]
hat[color=darkred]
uld[color=darkred]
ure[color=darkred]
ular[color=darkred]
ou[color=darkred]
>
>
>
>
>
>
ted text -[color=darkred]
>
> 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.

--
Se=E1n O'Leathl=F3bhair

LinkBot





Other Archives: Real Estate forum archive | Web Design archive | Software support archive | PC Hardware reviews archive | Medical topics archive

Copyright 2004 - 2008 cellphonetopics.com