Page 1 of 2

How to get the Bluetooth module working (JYMCU...)?

Posted: Sun Nov 30, 2014 1:05 am
by rankor
Anyone using the JYMCU bluetooth module?
How did you get going?

I can't find any instructions for Micropython for it. I connected it to Y9/19 and VCC and GND.
Can I communicate with it via UART just to see if I get contact so it is correctly mounted?

I have an Android phone and a PC to pair with later. What do I need to do to initialize the device? Should another bluetooth device find it if it is powered so they can pair? Or do I have to do something more first?

Re: How to get the Bluetooth module working (JYMCU...)?

Posted: Sun Nov 30, 2014 5:22 pm
by dhylands
My understanding of how its supposed to work is that once its paired with a host, you should get a serial port showing up on the host, and data written to the serial port on the host shows up on Tx line on the bluetooth module. And any UART data written to the Bluetooth module will show up on the host.

You'll need to connect the TX line on the bluetooth module to an RX line of a UART on the pyboard, and the RX line of the bluetooth module to a TX line of a UART on the pyboard.

Re: How to get the Bluetooth module working (JYMCU...)?

Posted: Sun Nov 30, 2014 7:06 pm
by Turbinenreiter

Re: How to get the Bluetooth module working (JYMCU...)?

Posted: Mon Dec 01, 2014 5:23 am
by gcarver
I got this working quite easily. I wrote a small wrapper for it to automate the AT commands for setting some properties such as baud rate and name. It's located here; https://github.com/GuyCarver/MicroPytho ... b/JYMCU.py

Re: How to get the Bluetooth module working (JYMCU...)?

Posted: Tue Dec 02, 2014 11:07 pm
by rankor
I cannot use those commands. I can only use send and recv.

I try to do:

uart=UART(3,9600) #Y9,Y10 => uart3
uart.send("AT")
no response
uart.send("AT+PIN5678")
no change of pin, can still pair with old.

So I can pair my android with the device and it blinks red but I cannot send commands successfully to it.

Re: How to get the Bluetooth module working (JYMCU...)?

Posted: Wed Dec 03, 2014 7:15 pm
by gcarver
I found responses to AT command for my module to be fickle. I find the best way to get it to respond to AT commands is to connect my computer to it, then disconnect. The connection LED must be flashing in order to accept AT commands so you must disconnect.

Re: How to get the Bluetooth module working (JYMCU...)?

Posted: Thu Dec 04, 2014 9:15 pm
by rankor
OK and how did you thn proceed to make the actual Bluetooth communication work?

I have an Android phone and a PC with Ubuntu. I can pair my Android phone to the JYMCU but have not managed to get around how to work with Bluetooth on Ubuntu.


So what is the best approach to get Bluetooth working? After pairing, what is the easiest way to send some data back and forth? I have to create some sort of application level protocol right?
Is there some simple way to just send data?

Re: How to get the Bluetooth module working (JYMCU...)?

Posted: Fri Dec 05, 2014 7:54 pm
by gcarver
Sorry, I cannot help you. I am on a PC. I use Putty to open a serial connection on the com port windows assigned to the bluetooth connection.

Re: How to get the Bluetooth module working (JYMCU...)?

Posted: Fri Dec 05, 2014 8:47 pm
by Turbinenreiter
Have you tried clicking my link and reading it?

http://wiki.micropython.org/official-ac ... odule-HC05

Re: How to get the Bluetooth module working (JYMCU...)?

Posted: Fri Dec 05, 2014 10:04 pm
by rankor
Yes, I cannot get Bluetooth to work on Ubuntu. I know I have the hardware because I had Windows before and that worked fine.

hcitool scan gives me:
No such device.