Sanguinololu Wireless Adapter

From RepRap
Revision as of 18:25, 1 March 2012 by ODDepot (talk | contribs)
Jump to: navigation, search
Crystal Clear action run.png
Sanguinololu Wireless Adapter

Release status: working

Sanguinololu Wireless Adapter.jpg
Description
Release Version 1.0
License
unknown
Author
Contributors
Based-on
[[]]
Categories
CAD Models
Kicad
External Link


Introduction

The Sanguinololu Wireless Adapter (SWA) allows full wireless communication with the Sanguinololu controller. It includes a bluetooth module (Roving Networks RN-41) as well as a microSD card reader.


Latest Updates

  • The SWA has been successfully tested on revision 1.3a of the Sanguinololu, however it should function correctly on revisions 1.2 and above.
  • Connecting the SWA to a Sanguinololu of revision 1.1 or below, may damage your SWA or your Sanguinololu.
  • The SWA has been successfully tested using the most recent versions of Sprinter and Printrun.


Description

Communication

The SWA uses RX1/TX1 on the Sanguinololu for serial communication. As of this writing, no known firmware supports the SWA 'out of box' without a little modification. Using Sprinter, this is relatively easy to do if you are familiar with uploading firmware. Firstly, find the following three files:

  • Sprinter.pde
  • SdFatUtil.h
  • SdFile.cpp

Then, with your favorite text editor replace each instance of 'Serial.' with 'Serial1.' in every file. Finally, compile and upload to the Sanguinololu. After modification, the USB cable will not function during regular USB communication with the Sanguinololu. Don't worry, the USB cable will still work with the bootloader when uploading new firmware so you can revert the code and re-establish regular USB communication at any time.


Indication

D1 (Green LED)

--Slow blinking: RN-41 is sleep mode.
--Fast blinking: RN-41 is ready to be paired.
--Constantly on: Serial connection established.

You will not be able to pair the device in sleep mode. When this happens (and it will after about 1 minute) you should press the reset button on the Sanguinololu to 'wake up' the RN-41. If the RN-41 is already paired and the LED is in this state, you shouldn't have a problem establishing a serial connection.

D2 (Yellow LED)

--Serial connection established.

D3 (Red LED)

--Power applied / microSD card inserted

D3 was meant to be a SD card detect indicator. However, the terminals for this function on the SD card socket have proven to be too difficult to solder by hand. Luckily, it can also serve as a 3.3V power indicator if pad 11 is soldered to pad 10 on the SD socket footprint (this is the usual outcome anyway if you're not precise enough). The power indicator function has proven to be more useful when testing the SWA.


Connecting

Make sure the Sanguinololu is without power. Properly connect the SWA. Turn on power. D1 (Green LED) should immediately start fast blinking.


Ubuntu

Command Line

In a terminal type something like:

 hcitool scan


You should see something similar to:

 Scanning ...
         00:06:66:07:DA:76        FireFly-DA76

In this case, FireFly-DA76 is the name of the RN-41 on-board the SWA and 00:06:66:07:DA:76 is it's address. Naturally, your values will be different. Copy the address, you will need it below.


Now type something like:

 sudo rfcomm connect rfcomm0 <RN-41 address> 1

Make sure to replace <RN-41 address> with the address you copied from above.


If a serial connection is successfully made you should see:

 Connected /dev/rfcomm0 to <RN-41 address> on channel 1
 Press CTRL-C for hangup

Also, you should see D1 (Green LED) and D2 (Yellow LED) come on constantly the SWA are constantly on.


You will now be able to connect to the Sanguinololu with the host software of your choice. Be sure to specify the connection port as /dev/rfcomm0 or whatever you used above.


GUI

If you would like to use a GUI the default one is not recommended. Instead, use Blueman Device Manager. If you don't have it. Type the following in a terminal:

 sudo apt-get install blueman

You may need to start it manually the first time after installing. If you can't find it, restart. It should appear on your panel (as a second bluetooth icon). After you have it up and running do the following:

click 'Search'
'Firefly-XXXX' should be listed as a device
Right click on 'Firefly-XXXX' and select 'Pair'
Type '1234' in the input dialog that appears then 'OK'
Right click again and select 'Setup...'
Select 'Serial Port' and click 'Forward'

You should see a message in the top right of your screen. It's important that you notice this and the port location (which is typically '/dev/rfcomm0') You should see that D1 (Green LED) and D2 (Yellow LED) are now constantly on. You will now be able to connect to the Sanguinololu with the host software of your choice. Be sure to specify the connection port as /dev/rfcomm0 or whatever you saw above. Note, it may be buggy if you lose the connection or disconnect and try to reconnect immediately afterwards.


Windows 7

A successful pairing has been made with the RN-41 on-board the SWA, but no further testing has been done.

Android

A successful pairing has been made with the RN-41 on-board the SWA using a Pantech Pocket, but no further testing has been done.