I Need To Use a Java Program To Receive Bytes From an MPU Using Bluetooth

I posted this problem on the Networking Protocols, and Devices forum and couldn't get any help.
Then I found a few topics on this forum that are similar to my problem so I'll try for help here.

I hope it is proper for me to just link to my post:
http://forum.arduino.cc/index.php?topic=223934

I am sorry if I should not do it that way.

Thanks,

Pete

The best thing to do is to ask the moderator to move your thread.

But isn't this a question for the section Interfacing w/ Software on the Computer ?

...R

On second thought, forget it. I have been trying to solve this problem for three weeks. No one seems able to help me. Now my searches keep turning up my postings asking for help.

I will do the project in Visual Basic. It could have been completed 2.5 weeks ago.

Sorry for using the space and bandwidth.

Processing, built on top of java, can read serial pretty easily.
Go to processing.org

Thanks but I can't spend any more time learning another language. Especially if it isn't certain that it will solve my problem.
I must have tried 50 different things that might have gotten "close" to helping me but ultimately didn't. And I lost many many hours trying them

I am in trouble with my boss. I convinced him I could do it in java not knowing the poor support for the type of devices we work with.

I have to finish NOW!.

PeteCal:
Thanks but I can't spend any more time learning another language. Especially if it isn't certain that it will solve my problem.
I must have tried 50 different things that might have gotten "close" to helping me but ultimately didn't. And I lost many many hours trying them

I am in trouble with my boss. I convinced him I could do it in java not knowing the poor support for the type of devices we work with.

I have to finish NOW!.

If you know java, processing is a breeze. The language is java like. It has java components to read serial if a few lines of code. Or you can steal processing's serial library and import it into your java app.

It's up to you to spend a few minute to finish your project or a few weeks.

mistergreen:
If you know java, processing is a breeze. The language is java like.

From the little I've seen Processing is more like the C++ used on the Arduino than it is like Java.

@PeteCal, What Java serial library are you using? RxTx?

I have recently discovered a Java serial library called JSSC which you might wish to try if you have a few spare minutes.

Have you tried hardcoding the port names rather than getting your program to search for them?

Please ask the moderator to merge this Thread with your other one?

...R

Robin2,
I have tried RxTx.
I have also tried the programs shown in the attached screen capture. The MyPrograms are other various attempts to understand how BlueTooth works.

In the future I might take a look at JSSC. Right now I am plunging ahead. In the 10 or 12 working hours since I switched from the java implementation to Visual Basic I have had great success. I completely rebuilt the GUI and have the serial communications working. A lot more code has to be created but at least I can tell the boss, "progress"!

As for hardcoding the port. The port I want is COM11 but I cannot get any java program to find it. The other post may have too much information but in there I explain:

"My problem is how do I get java to find COM11? I have a java program, ComportLister.
Now here is where things get confusing. If I DO NOT have (the Windows) terminal program running ComportLister does not find COM11. It finds:
COM12 (The HC-05 incoming port, not the one I want) and
COM1 (a hardware RS232 board in this computer) and
COM4 (a modem board in this computer).
So any attempt to open or access COM11 causes an exception.
Ready for more confusion? If I start the terminal program and connect to COM11 so that the data stream is showing in the terminal window and then run ComportLister it now finds COM11 (along with the others). If I attempt to open it I get an excepton, most likely because the Terminal program has COM11."

So hardcoding it will cause an exception either because it doesn't exist ( Windows terminal program not running) or it is in use (Windows terminal program running).

I tried to contact the moderator to move that post but I can't seem to find a way.

Thanks,
Pete

BlueToothTried.jpg

Use the "Report to Moderator" link ?

...R

Ouch, I always think that is to report foul language or something improper.

I'll try it.

[Edit]
I tried it and got:
"You can't report your own post to the moderator, that doesn't make sense! "

actually, speaking of processing. Go to processing's forum. Lots of JAVA heads there with hardware knowledge.
\