DFRobotshop + bluetooth

Hi everybody !

I recently bought a DFRobotshop (naked), and it works well ! It’s my first robot and I really think it’s a perfect product to learn ! I succed adding different sensors and it always worked :=) !
Now, I want to control it by the air, so i bought the DFRobot Bluetouch (robotshop.com/dfrobot-serial-bluetooth-module-1.html) and the USB dongle but i can’t make the robot and my computer communicate…

Here is what i did :

1 ) I use the sample program (with a,q,s,… key control), i just replace the Serial.begin(9600) by Serial.begin(115200);
2 ) I upload it to my DFRoboshop by USB.
3 ) I install BlueSoleil and I appair my DFRobotshop (seen as Bluetooth_v3) with my computer (with default pwd 1234)
4) I use the function ‘connect with port COM8’ from BlueSoleil
5) I use teraterm, on port COM8 and i tried to send data (with baudrate to 115200)

But nothing append… :frowning: I add some trace to my code (Serial.println(…) ) but i can’t see them.
I saw data going out from my conputer (with right/click properties in BlueSoleil), but nothing is going from the robot to my computer.

Can someone help me ? :slight_smile:

Thanks !

PS : there are two switch button on my usb module and i don’t know what it is… can someone explain it to me ? Thx !

Hi PMCbenson,

Thanks for you’re answer. I change my baud rate to 9600 and it’s working now ! I also notice my battery was down… shame on me :stuck_out_tongue: !

Everything is working well now, thanks you !

Next step : talking with my phone :slight_smile: !

++ !

Hi robootvince,

We are happy to hear you are picking up Arduino quickly and are having fun with it. We hope you might post some videos showing your project here.

Sincerely,

Hi robootvince,

Welcome to the RobotShop Forum. It sounds like you are doing (almost) everything correctly - the two areas which peaks my interest are “teraterm” and “115200 baud”. If you look at the newest bluetooth manual, you can see they changed the default serial baud rate to 9600 (not sure why they did this, so it’s always important to read the manual). You can also see the other settings as well: 9600/N/8/1. Your issue is likely the settings in Teraterm (protocol; Xon / Xoff etc.). Just in case, try Hyperterminal. You don’t need to change either of the switches on the Bluetooth module.

Hope this helps,

Hi,

Since everything works through USB, the issue must be with the BT module or the software. You indicate that you use 9600 Baud to control the robot via USB (as outlined in the user guide and video), though it’s important to note that the default Baud setting for the BT module is 115200 (see user guide).

Bleusoleil’s function is to connect your computer to other BT devices - you must still use Hyperterminal and the included USB BT device (unless your computer already has Bluetooth functionality). Use Bleusoleil to pick up and establish a connection to the Rover, then use Hyperterminal to send commands.

Hope this helps,

Hi Ivan,

Bleusoleil is just one of many programs which can be used to pair Bluetooth devices, before proceeding to purchase a complete version, try out one or two others. It’s good to know the Rover works via USB, and that you can connect devices to each other, except for the important one of BT Rover to computer. The pairing code is 0000 and the default setting is 115200 / N / 8 / 1. You should be able to follow the procedure outlined in the BT user guide to get started.

We await your reply,

Hi ivangarcia44,

There could really onyl be three sources of error: the code, the power and the module itself. If you have loaded the sample code and have been able to operate the rover via USB using the LiPo battery pack, that basically eliminates the code and the power as the possible sources of error. It does not happen much, but the BT module may be defective. Please contact us via the Support Center and provide your invoice number and we wil take care of you from there.

Hope this helps,

Ivan, the error you describe are likely to be caused by the baudrate. Please make sure the baudrate is the same for the Bluetooth device, the DFRobotShop Rover and your computer program sending data.

As for the tablet, it is possible that the Galaxy Tablet is not able to recognize serial Bluetooth modules. You will need to check the compatibility specifications for the tablet and check if it is possible to upgrade it to the latest Android version (Ice cream Sandwich)

The last source of error that we can think of is that 115200 is too fast and is causing data transmission errors. Try a slower speed (ensure the code uploaded to the DFRobotShop Rover also has the correct Baud) and ramp up until you start getting errors again. Even if serial interfaces are rated at certain speeds, they are usually more prone to errors at higher speeds due to noise and other actors.

Hi,

I have a DFRobotShop rover with the Bluetooth kit. I am trying to connect it also to my phone, but first to the computer!

Everything is working through USB. After controling it with the keyboard. I disconnect the USB, without turning off the robot’s switch to avoid losing the program loaded. Then I connect the Bluetooth module to the PCB as the manual say.

Then through the hypertermina I create a 9600/N/1/ON/OFF connection (as indicated in manual and youtube video). I tried both COM8 and COM9,
which the device manager indicates that are bluetooth serial ports. I installed a tryout version of the Bluesoleil driver. I do not have a program, at least visible through start, to use the ‘connect with port COM8’ with Bluesoleil. Although this is not mentioned in the manual.

I have never seen the LINK light in the Bluetooth module turn on.

Do you know what could be wrong?

If you think it is the driver, do you have a recomended free Bluetooth driver/software to make this work?

I contacted RobotShop a month ago about a problem making the USB connection work. And the problem was the USB driver.

Thanks,
Ivan

Hi,

Thanks for the response.

I downloaded a free version of Bluesoleil software (I am buying it now to see if it works better :neutral_face:). But what I have so far with it is that it sees all Bluetooth devices around except the rover.

The cell phone does sees the rover (Bluetooth_V3 I think), but can not connect with it.

I can connect my phone to the PC Bluetooth dongle. Prior making the connection, a pop up appears in the computer asking me for a password, and the same appears in the phone. I type the same number and they get connected.

It seems that the dongle is working. I am not sure if some password procedure has to be done, like between PC and phone.

I will try connecting with the bought version of Bluesoleil and see if I can stablish link with the rover. I will post again what I find.

Please let me know if you have any suggestions.

Thank you,
Ivan

I tried again loading this time the sample program from the Bluetooth manual, that uses the 115200 baud rate. According to the manual, I should see the EPBX-COM device, and use the 0000 pass code to pair with it.

It seems that the problem is that the Bluetooth device is not being found.

Bluesoleil can find my cell phone, and a couple of devices that are not in my house, but can not detect the rover (EPBX-COM). My Android cell phone is able to see a “Bluetooth_V3” device, which is not able to connect to. It might not be the rover because it should be EPBX-COM.

I know that the Bluetooth code was loaded because the Arduino IDE indicated that it was successful. I always take out the Bluetooth module when loading a program. Once the program was loaded, I connected the Bluetooth device. I tried doing this both disconnecting the USB cable first, and not disconnecting it; the same result in both cases.

There are two ways of connecting the Bluetooth. I have always connected it facing to the front of the PCB, where the pin labels are aligned (e.g., GND->GND, 5V->VCC, TX->RX, RX->TX). If I connect it the other way around the pins would be inverted.

The configurable pins I believe are in the default state from manufacturing: Connected LS, LM35, LED.

I do not understand well the purpose of the “AT Mode” and “LED Off” switches in the Bluetooth. I had tried all their combinations, but none result in Bluesoleil finding the device.

I have never seen the LINK LED turn on.

I guess that once I can see the device in Bluesoleil, I connect it, and then I would be able to control the rover through Bluetooth. The rest would be straight foward.

Do you know what could be happening?

Hi,

I called support and they told me that the bluetooth device was defective. I bought a new one but I am still having some problems connecting it.

The DF-Bluetooth Module Manual says that the device that should appear on BlueSoleil is “EPBMX-COM”, but I see “Bluetooth_V3” instead. It makes sense because the bluetooth device has a label “DF-BluetoothV3” on top.

I paired the BT V3 device on BlueSoleil, then connected with the hyperterminal. I tried to programs: 1) to receive data from the robot 2) to control the robot.

For the first one, instead of receiving a message, I receive a square root symbol. For the second one, the robot was not able to recognize the four control characters. I thought that communication might be crooked, so I modified the program to move the robot on any character received. And this worked, the robot moved for the first character received.

So there is communication of characters between the computer and the robot. But the characters are not being sent/received correctly. I am using 115200 baud rate on both the PC and robot.

Do you know what could be causing incorrect communication of characters?

Also in my Android Galaxy phone (where I want to control the robot from eventually) I am not able to see neither the “Bluetooth_V3” or “EPBMX-COM” devices. The Android can see the computer and pair with it.

Do you know why this could be happening?

Thanks,
Ivan

Carlos Asmat,

I am using the code below on the arduino. I fed back the character read to the PC. The program is using 115200. I am using the Hyperterminal to connect with the Bluetooth. The configuration is 115200 baud rate, 8 data bits, parity none, 1 stop bit, flow control Xon/Xoff.

When I run the program. I type any key on the keyboard, and the hyperterminal screen shows the cursor moving three blank characters moving to the right.

I am basically trying to send four charactes for control, but if all characters are the same (blank spaces) I can only have one type of action instead of four.

Do you know what could be happening here?

void setup() { Serial.begin(115200); //Set serial baud rate to 115200 } void loop() { char val = Serial.read(); Serial.print(val); //print out hello string delay(1000); //1 second delay }

Hi Carlos,

I changed the baud rate from 115200 to 9600 in both hyperterminal and Aldruino program, and now it works perfectly.

Thanks!
Ivan