Bluesmirf insanity

I have tried what seems like everything. I can not get my bluesmirf silver to connect. I am trying to follow the setup tutorial verbatim but its not working. I have it wired correctly and when I try to type $$$ nothing happens. Any recommendations? I have already tried re-setting it.

Fran

For “what seems like everything” your post seems awfully short. You’ll have to be more descriptive with code examples, statement of which microcontroller and which setup it is in, schematics/wiring diagram, photos etc. This does not give us (m)any leads to go on.

I apologize, I can usually figure these things out by myself but I am hitting a wall. Ultimately I am trying to upload values and/or graphs from a few sensors to an android device. I started by following everything on the setup page verbatim. I have never used bluetooth connectivity before hands on, however, I have read quite a bit. So far, I have tried the example instructions and code:

#include <SoftwareSerial.h>

int bluetoothTx = 2; // TX-O pin of bluetooth mate, Arduino D2

int bluetoothRx = 3; // RX-I pin of bluetooth mate, Arduino D3

SoftwareSerial bluetooth(bluetoothTx, bluetoothRx);

void setup()

{

Serial.begin(9600); // Begin the serial monitor at 9600bps

bluetooth.begin(115200); // The Bluetooth Mate defaults to 115200bps

bluetooth.print(“$”); // Print three times individually

bluetooth.print(“$”);

bluetooth.print(“$”); // Enter command mode

delay(100); // Short delay, wait for the Mate to send back CMD

bluetooth.println(“U,9600,N”); // Temporarily Change the baudrate to 9600, no parity

// 115200 can be too fast at times for NewSoftSerial to relay the data reliably

bluetooth.begin(9600); // Start bluetooth serial at 9600

}

void loop()

{

if(bluetooth.available()) // If the bluetooth sent any characters

{

// Send any characters the bluetooth prints to the serial monitor

Serial.print((char)bluetooth.read());

}

if(Serial.available()) // If stuff was typed in the serial monitor

{

// Send any characters the Serial monitor prints to the bluetooth

bluetooth.print((char)Serial.read());

}

// and loop forever and ever!

}

Here I have My BlueSmirf Silver RN42-I/RM

Here is my wiring schematic

smirf vcc to arduino 5v

smirf GND to arduino GND

smirf TX-0 to arduino D2

smirf RX-1 to arduino D3

The problem is when I try to enter command mode by entering “$$$” nothing happens. The light appears to be blinking around 2 blinks a second, but I thought it was only supposed to do that for 60s and it has never changed except for when I reset it.

Cheers,

Fran

Have you payed attention to how you should deal with line endings in the serial monitor?

p.s. What’s up with the coil of white wires around the bluesmirf?

Hookup guide:

Using the Passthrough Sketch

With the code uploaded, and everything hooked up accordingly, open up the Serial Monitor. Make sure the baud rate is set to 9600. Throughout this process you’ll have to fudge around with the dropdown menu to the left of the baud rate selection. It should initially be set to “No line ending”.

First, let’s enter command mode by typing $$$, and click “Send”. You should see the Bluetooth modem respond with CMD, and you’ll notice the red Stat LED blinking much faster, this all indicates that the device is in command mode.

Once you’re in command mode, you’ll need to change the line ending dropdown to “Newline”. The basis of all this is that the RN-42 module expects a newline character after every command except for the command mode string. Annoying, but we’ll deal.

Yes, that is exactly where I got stuck! The smirf doesn’t reply with CMD. It is set to “No line ending” and 9600 baud rate. I even tried baud rate of 115200 just for kicks.

Appreciate the help!

Fran

You probably missed my question about the coil of white wires around the BlueSmirf. What’s going on there. Any chance it’s wires make contact with the TX and RX wires? Do those solderjoints make proper electrical contact with the pcb traces?

Right, the extra wire were just because there were the extra CTS-1 & RTS-0 terminals. and I had the stuff out to solder them. They are just wrapped up to be out of the way. I think the solder joints are firm, I didn’t have any problems. How do they look?

I added a touch of solder in hopes it was because I may have skimped a little. Now they look picture perfect. Minus the picture. I did find a small scratch on the surface of the board crossing over the connection to the RX line. How deep do the lines/connections on the circuit board go? If they are paper thin it is toast but any deeper and I’m in the clear. From my understanding, the connections are in the center of the circuit board sandwich? I have never had to worry about it. :shifty:

fran151:
I did find a small scratch on the surface of the board crossing over the connection to the RX line. How deep do the lines/connections on the circuit board go? If they are paper thin it is toast but any deeper and I’m in the clear. From my understanding, the connections are in the center of the circuit board sandwich? I have never had to worry about it. :shifty:

Read the next sentence slowly…

Get out your meter and test for continuity at the two points connecting the trace with the scratch in it.

Wel,l it was indeed the problem! I was able to solder in a bridge and it worked great! Now I am struggling with the greater dilemma. I would like to output a sensor to a live plotting graph. I have found examples referring to other bluetooth connection boards but not the bluesmirf. I am not quite experienced enough to modify the code properly. Could anyone teach me how to change the following to work with the bluesmirf?

This code pairs with an app that allows for live data plotting form: https://www.youtube.com/watch?v=WzhA__nYiTw

#define sensorPin A0

void setup() {

Serial.begin(9600);

}

void loop() {

if(Serial.available()>0){

char re = Serial.read();

switch(re){

case ‘E’:

start();

break;

}

}

}

void start(){

while(1){

Serial.print(‘s’);

Serial.print(floatMap(analogRead(sensorPin),0,1023,0,5),2);

delay(10);

if(Serial.available()>0){

if (Serial.read()==‘Q’) return;

}

}

}

float floatMap(float x, float inMin, float inMax, float outMin, float outMax){

return (x-inMin)*(outMax-outMin)/(inMax-inMin)+outMin;

}

Other than matching the contents of the setup function with your first program, I don’t see what is specifically required to change to make it work with the Bluesmirf. Note how the first program differentiates between the internal serial port connected to the USB port, and a software-serialport named bluetooth. The second code assumes the bluetooth module is connected directly to pin D0 and D1 (the hardware serial port). Try to use a serial monitor like program on your android first. See what kind of data is sent across the bluetooth link, and whether it is actually arriving on your phone/tablet. That is paramount! Take it in easy steps first and try to understand what is going on under the hood. Only then would I worry about making a graphing app for a Android device.

I have no knowledge of what is required to make that Bluetooth/android app working. And I am too lazy to watch those dozen of episodes of the tutorial video. Sorry, don’t have the time, can’t help with that. But if you are running into specific code problems on the Arduino, or error messages then feel free to post about it.