Bluetooth Wireless Communication

From RepRap
Revision as of 09:28, 18 March 2010 by Buzz (talk | contribs)
Jump to: navigation, search

This page is a development stub. Please enhance this page by adding information, cad files, nice big images, and well structured data!

Crystal Clear action run.png
Bluetooth Wireless Communication

Release status: Experimental

No image available.png
Description
Enabling a RepRap to communicate without a PC tether
License
GPL
Author
Contributors
Based-on
Categories
Wireless
CAD Models
External Link


"We live in a wireless world, so should the RepRap"

This is a side project for RepRap to enable users, who, like myself when they have their RepRap built and eventually running, won't have to fall over any cables that happen to cross an access way, where space is a premium and a RepRap and PC cannot be adjacent to one aother.


Working Notes. Initial Goals

To have a wireless tether from a PC tothe RepRap via a BlueSMiRF.


Setup BlueSMiRF

Before you can use your bluetooth modem, it first needs to be setup correctly, as chances are it won't. I spent 3 days working this out in hopes that no one else will have to waste their valuable time.


First Steps

1) You need to get yourself a Bluetooth dongle, if your PC doesn't have internal bluetooth capablities.

Most laptops/notebooks already have bluetooth capability, and you can use this instead of buying a dongle.

If you don't have a dongle, I suggest you buy one that is bluetooth 2.0 or greater compatible.


2) Wire up the BlueSMiRF.

The BlueSMiRF just needs the RTS and CTS lines connected, as well as the normal power and ground, ie +5V and Ground/Common.

This site has a good way of illustrating how to do that, and most of this page.

Mod the Motherboard

You will need to modify the motherboard to supply a continuous supply of power to the BlueSMiRF, however once this mod has been made, you cannot use an RS232 adapter, because you will likely blow up the USB on your PC.

I have made an RS232 adapter from the Parallax Prop Plug, and not wire up the +5V line intentionally so that I could debug my electronics.

The mod is a simple wire link on the back of the board. Wire up the VCC pin of the Arduino programming adapter to the 5VSB of the motherboard, the closest pin is also used for ICSP.


Setup BlueSMiRF for slower communication

For some strange reason the BlueSMiRF comes from the factory with 115200 BAUD already setup, as I did. You'll find that you often can "connect" with the device but cannot talk to it, that is because it has a higher BAUD than the latency. This needs to be dropped to around 9600 or 19200 BAUD, (I recommend 9600), to do that, you may want to use this tool, as it was the only tool I found that worked.

When you run the program, ensure you disconnect the device. Then in the Terminal Setup, make sure the check box "Echo typed characters locally". In the Port Setup, select the COM Port that the BlueSMiRF is using for outgoing traffic (ie the PC initiates the connection (PC is the master)). Then from the drop down box, select 115200.

IMPORTANT! Power down the BlueSMiRF completely before putting power back on. You have 60 seconds from power on, to connect to the BluSMiRF and enter command mode.

Click the connect button.

Enter command mode by typing +++

You'll most likely get a "?" popup, thats good, even though it doesn't know what your doing, yet.

Now you need to enter the command to reduce the BAUD of the device.

Type SU,96,8,0,0,1 Ensure you use capital letters

You can check the final result by typing D or E which ever tells you the BAUD rate.


When you are finished, close down command mode, and return the device to normal operating mode by typing ---

Disconnect from the the device from the terminal program.

To test out the BlueSMiRf comms, open up HyperTerminal that comes with Windows XP, make sure you that if you have the choice, use 9600 as the BAUD then click connect. If all went well you'll be greeted with "Ok".

Sweet, that's all setup.


Time to setup RepRap Host/Firmware

Yeah, this is the last thing you have to do to get your RepRap or RepStrap to communicate with the host.

In firmware you need to change the BAUD rate also down to 9600.

In the host application you need to change the BAUD to 9600 also. Don't forget to change the Com Port to that of the BlueSMiRF.


All Done

Power down the RepRap/RepStrap, then start it up again. Run the Host application, and it should be working.

It should! I've spent 3 days surfing the web, banging my head agaisn't a wall, to sort this out. For me at least, its working. Working as well as the host is stable.

Power down your RepRap, and power it back up again then run the Host


Final Notes

This setup process has worked for me, using the Windows XP OS and a V2.0 Bluetooth dongle, I cannot make any guarantees that it will work at all on a Linux Distro, Mac, or even any other Windows platform. I can be found on the Forums as the Username "Grogyan" if you have any queries.