Pages: [1]   Go Down
Author Topic: Arduibo Mega 2560 with RN-41-SM Bluetooth  (Read 1116 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi all,

I am new to the Arduino world...
Recently, I got the mega 2560 and I am working on it for my graduation project.

Currently I am trying to interface the RN-41-SM bluetooth module with it. I am connecting it to TX1/RX1, 3.3 VCC and ground.
I am not sure about some stuff.
I am using header A since I did not know how to remove some resistors to switch to header B of the RN-41-SM.

What I have done so far is establishing the connection between the PC BT dongle and the RN-41-SM, and it created two different virtual com ports.

As far as I know, the virtual com ports make the bluetooth communication as if there is simply a wire instead. so I thought I would be easily able to communicate between the microcontroller and the PC through the bluetooth module; but apparently I have a problem in communication between the MC and the Bluetooth. I am not sure how to test if they are communicating or not.

Did any of you guys tried this or something similar before? I would REALLY appreciate any help!

Thanks in Advance =)
Logged

Dee Why NSW
Offline Offline
Full Member
***
Karma: 5
Posts: 206
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You wrote
Quote
but apparently I have a problem in communication between the MC and the Bluetooth. I am not sure how to test if they are communicating or not.

I have only yesterday succeeded in getting some joy with Bluetooth.

I am not familiar with yours but I assume it is similar and they all work much the same way.

It seems that there isn't much to do between the Arduino and the bluetooth module. It is either connected properly or it isn't, and you will be amazed how often the latter is the problem.  So check yours, twice.

There is no way of using the debug monitor to check that data is being sent via bluetooth. I understand Arduino doesn't distinguish between bluetooth and the serial monitor.

Seeing a flashing LED does not guarantee that it is ready for communication. It can do that with the Rx/Tx wires the wrong way round. 

Similarly, having the PC discover the bluetooth is no guarantee of communication. It simply means the power is connected, something you probably already know. I guess it also means it will communicate - eventually.

I was close to giving up but it turned out that all the work was at the PC end, and I just needed a bit of close dedication.  I use RealTerm set at 9600 8N1.  You can use a desktop icon that runs a comprehensive command line so that it will work the same way every time.

For test purposes, I simply used a clock that normally printed to the monitor - no changes needed.

I don't know anything about two-way comms, but RealTerm can do it. I imagine that once you can receive, sending will be easy. Bluetooth has now become a mainstay for my projects, It is simple cheap and good for the occasional short dense bursts of data logging.

Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey, thanks for your valuable input, I have done some troubleshooting and finally I got it working fine  smiley-lol , now my problem is that data can be sent from arduino to PC via bluetooth, but for some reason the PC bluetooth cannot send data to the Bluetooth module, or the bluetooth cannot translate it to the Arduino. I am stuck with only receiving from the Board, which is partially satisfying, but I really need to send Data to the MC through bluetooth, any idea? Could it be that I have to connect RTS or CTS of the bluetooth somewhere or something like that?

Thanks  smiley
Logged

Pages: [1]   Go Up
Jump to: