Jump to content


RichC

Member Since 06 Jun 2014
Offline Last Active Jun 12 2014 01:22 AM
-----

Posts I've Made

In Topic: Bluetooth HC-05 - drop incoming TX voltage level?

10 June 2014 - 09:31 AM

Hi Nathan,

 

An update on the two way capabilities of slave configured HC-06 modules.

 

Yes, I can confirm that these can & will send messages back in addition to the expected module's AT commands.

 

In Android's case:

Establishing the initial bluetooth connection from Android to the HC-06 is a little tricky since if the HC-06 is not powered up and blinking red, the Android app can crash even though the absence of an available device is handled in a number of try-catch statements, but once it is connected, setting Serial.begin to the correct Baud rate of the unit and writing Serial.println('xyz'); will send that string. For Android, a separate thread needs to be set up using an instance of Handler in the onCreate method which receives incoming bytes and appends them to a string. Each of the inoming bytes are checked for end of line chars ("\r\n") and if not EOL, appended to the msg string until EOL at which point, the msg gets written to Android's display.

 

Cheers,

 

Rich.


In Topic: Bluetooth HC-05 - drop incoming TX voltage level?

06 June 2014 - 10:48 PM

Awesome! - thanks again for the info and clarifying the operation of these BT devices.

 

If I do need the master version, I'd still keep the HC-06's - it's great that you're willing to accept a return of these, but in this case, I think my misunderstanding is on me :)

 

I have these units working successfully to receive incoming data from Android, so I'll continue to work on having bi-directional communications with the HC-06, if not, hey, not the end of the world right! lol.

 

Have a good weekend.

 

Rich.


In Topic: Bluetooth HC-05 - drop incoming TX voltage level?

06 June 2014 - 07:58 PM

Hi Nathan.

 

Thanks for the offer of level shifters and free postage- I'll have a think about what I'm going to do as I made a little error:

 

These are HC-06 slave modules. The difference between the HC-06 and HC-05 modules is that the HC-05's can be configured as master (almost never needed) or slave via the AT commands, while the HC-06 comes preconfigured as master or slave from the factory and can't be changed.

 

 

I must have made a mistake and not read the product description carefully - I'd been specifically looking to buy HC-05 modules as I thought that these ones were the only ones that could send (via arduino code/sketch etc) back to the phone or Macbook etc. Maybe I confused this line on the ebay description?

and you can send and receive data wirelessly!

 

 

If so, not a problem, I'll use them at some point :)

Or is there a way to send a short string back from the arduino? - I mean it's already sending back acknowlegement bits. Please excuse my newbie status when using Bluetooth.

Another option is to flash new HC-05 firmware onto the CSR chip - it sounds fairly straight forward on here:

 

http://byron76.blogs...oth-module.html

 

One way or another, I'll figure it out!

 

Thanks,

 

Rich


In Topic: Bluetooth HC-05 - drop incoming TX voltage level?

06 June 2014 - 05:28 PM

Hi Nathan,

 

Awesome information thank you!

I'll look into the level shifter option, rather than the voltage divider, because with the signal distortion potentially introducing artifacts into the messages, it will complicate an already complex project.

 

I just started trying out some Android development using the SDK for Eclipse to have my phone send messages to a ATMEGA running the Arduino environment & that was a bit of a learning curve, so anything that will help keep unexpected behavior out of the mix is very welcome!

 

My next step is to try two way comms, hence the HC-05's - it'll be cool to have the chip respond with data back to the phone. I think the AT command set up is a little more involved than with the HC-06 Linvor modules, but shouldn't be too hard with a bit of tinkering with CoolTerm.

 

Cheers!

 

Rich.