Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

[help] robonova bluetooth and java

Hitec robotics including ROBONOVA humanoid, HSR-8498HB servos, MR C-3024 Controllers and RoboBasic
9 postsPage 1 of 1
9 postsPage 1 of 1

[help] robonova bluetooth and java

Post by kris0010 » Thu Mar 06, 2008 5:35 am

Post by kris0010
Thu Mar 06, 2008 5:35 am

i'm using robonova for my undergraduate project, the project is basically on robotic vision. i already implemented the robotic vision in the PC for simulation using Java, and i also have installed bluetooth on my robonova.

I want to send commands through bluetooth to tell the robonova what to do using the information gathered from the image processing code, but the problem is, i don't know how to write a bluetooth code using java. I have been searching for templates and books about it but i can't understand it..

can someone help me please?
i'm using robonova for my undergraduate project, the project is basically on robotic vision. i already implemented the robotic vision in the PC for simulation using Java, and i also have installed bluetooth on my robonova.

I want to send commands through bluetooth to tell the robonova what to do using the information gathered from the image processing code, but the problem is, i don't know how to write a bluetooth code using java. I have been searching for templates and books about it but i can't understand it..

can someone help me please?
kris0010
Newbie
Newbie
Posts: 4
Joined: Thu Mar 06, 2008 5:29 am

Post by Robo1 » Thu Mar 06, 2008 6:34 am

Post by Robo1
Thu Mar 06, 2008 6:34 am

Hi there

Have you tried using a com port redirect software. I use a wiport and use a com port redirect software and it works well. Then you can just use the standard class for dealing with com ports.

Bren
Hi there

Have you tried using a com port redirect software. I use a wiport and use a com port redirect software and it works well. Then you can just use the standard class for dealing with com ports.

Bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by kris0010 » Thu Mar 06, 2008 8:51 am

Post by kris0010
Thu Mar 06, 2008 8:51 am

what's a com port redirect software?
*sorry.. i'm a total n00b..*
what's a com port redirect software?
*sorry.. i'm a total n00b..*
kris0010
Newbie
Newbie
Posts: 4
Joined: Thu Mar 06, 2008 5:29 am

Post by limor » Thu Mar 06, 2008 3:07 pm

Post by limor
Thu Mar 06, 2008 3:07 pm

serial interface
serial interface
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by kris0010 » Thu Mar 06, 2008 5:19 pm

Post by kris0010
Thu Mar 06, 2008 5:19 pm

umm... i'm still a little confused..

the thing is i used an external BT adapter, and my RN1 is registered as COM9 (outgoing) and COM10 (incoming) in the device manager.. I realized that Java can send through this com port, but when i tried using Java to do it, the program just tell me that it can't detect the port specified.. is my approach wrong?
umm... i'm still a little confused..

the thing is i used an external BT adapter, and my RN1 is registered as COM9 (outgoing) and COM10 (incoming) in the device manager.. I realized that Java can send through this com port, but when i tried using Java to do it, the program just tell me that it can't detect the port specified.. is my approach wrong?
kris0010
Newbie
Newbie
Posts: 4
Joined: Thu Mar 06, 2008 5:29 am

Post by JavaRN » Thu Mar 06, 2008 9:07 pm

Post by JavaRN
Thu Mar 06, 2008 9:07 pm

For bluetooth communication with Java you can use RXTX package, it's very easy to use, you can download it from this site:

http://www.rxtx.org/

It works nicely with bluesmirf bluetooth module and a bluetooth receiver which you can buy from Robosavvy.
For bluetooth communication with Java you can use RXTX package, it's very easy to use, you can download it from this site:

http://www.rxtx.org/

It works nicely with bluesmirf bluetooth module and a bluetooth receiver which you can buy from Robosavvy.
F'dan il-passatemp ghandek bzonn zewg affarijiet - FLUS u HIN. Zewg affarijiet li huma skarsi hafna u li jien minnhom ghandi vera ftit!
JavaRN
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 282
Joined: Fri Mar 02, 2007 11:01 pm

Post by Robo1 » Thu Mar 06, 2008 11:46 pm

Post by Robo1
Thu Mar 06, 2008 11:46 pm

Hello

Just to clear this up. Can you communicate with a terminal program e.g. through the com port if you can then it's pretty simple. If you need to test this connect the tx and rx together then send a message if you get the message back then it's working. This will also get you the setting which you need for your java program.

You can then use the javax.comm which this the main classes for communicating with the com port. It has good documentation and if you need any help with it I should be able to get you up and running.

Bren
Hello

Just to clear this up. Can you communicate with a terminal program e.g. through the com port if you can then it's pretty simple. If you need to test this connect the tx and rx together then send a message if you get the message back then it's working. This will also get you the setting which you need for your java program.

You can then use the javax.comm which this the main classes for communicating with the com port. It has good documentation and if you need any help with it I should be able to get you up and running.

Bren
Robo1
Savvy Roboteer
Savvy Roboteer
Posts: 501
Joined: Fri Jun 30, 2006 1:00 am
Location: UK - Bristol

Post by kris0010 » Fri Mar 07, 2008 1:59 am

Post by kris0010
Fri Mar 07, 2008 1:59 am

thanks for all the explanation..

my code works now, the problem that i can't detect the port? it's because of the javax.comm.properties is missing so the port detection keep returning empty enumeration. but it works fine now =)

again thanks.. now i'll just have to work things up a little bit since i'll have an exhibition tommorow.. wish me luck =)
thanks for all the explanation..

my code works now, the problem that i can't detect the port? it's because of the javax.comm.properties is missing so the port detection keep returning empty enumeration. but it works fine now =)

again thanks.. now i'll just have to work things up a little bit since i'll have an exhibition tommorow.. wish me luck =)
kris0010
Newbie
Newbie
Posts: 4
Joined: Thu Mar 06, 2008 5:29 am

Post by JavaRN » Fri Mar 07, 2008 5:02 pm

Post by JavaRN
Fri Mar 07, 2008 5:02 pm

You can then use the javax.comm which this the main classes for communicating with the com port.


Yes javax.comm can do the job too. Sorry for not mentioning it. :oops:



Charles
You can then use the javax.comm which this the main classes for communicating with the com port.


Yes javax.comm can do the job too. Sorry for not mentioning it. :oops:



Charles
F'dan il-passatemp ghandek bzonn zewg affarijiet - FLUS u HIN. Zewg affarijiet li huma skarsi hafna u li jien minnhom ghandi vera ftit!
JavaRN
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 282
Joined: Fri Mar 02, 2007 11:01 pm


9 postsPage 1 of 1
9 postsPage 1 of 1