JY-MCU HC-06 Bluetooth Module

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

JY-MCU HC-06 Bluetooth Module

#1 Post by dynamicdave » 30 Jan 2019, 14:48

I'm trying to get a Wemos D1 Mini (flashed with the latest ESP Easy release) to talk to a JY-MCU bluetooth module.

I assume I should use the "Communication Serial Server", but what value do I put in for the "PORT" ?

I can pair to the module from my mobile phone and send data, but nothing appears at the Wemos end.

If any one has got the serial communication to work, could they share the basics with me.

Kind regards from David.

User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: JY-MCU HC-06 Bluetooth Module

#2 Post by dynamicdave » 31 Jan 2019, 19:52

I've got my mobile phone (acting as a terminal) talking via bluetooth to the HC-05 bluetooth module that links to my Wemos D1 Mini.

I can send data to the Wemos and using a rule get it published via MQTT to Node-RED.

Also if I reboot the Wemos I can see all the boot-up messages on my phone.

So all of this seems to indicate I have some sort of basic communication between my phone and the WeMos.

Two questions...
(1) How can I extract or find the data that was sent to the Wemos ??
(2) How can I "publish" serial data from the Wemos to my phone ??

Any help or guidance would be appreciated.

User avatar
dynamicdave
Normal user
Posts: 257
Joined: 30 Jan 2017, 20:25
Location: Hampshire, UK

Re: JY-MCU HC-06 Bluetooth Module

#3 Post by dynamicdave » 02 Feb 2019, 12:13

Hi to one and all,
I'm still trying to get the serial port working on a Wemos D1 Mini.

This is what my basic rule looks like...

on !Serial#* do
publish david,%eventvalue%
serial "fred was here"
endon

I get this MQTT message returned to Node-RED when I send red from my terminal (phone)... " david : msg.payload : string[11] "!Serial#red"


Two questions...
(1) How can I extract or find the data that was sent to the Wemos ??
i.e. %eventvalue% gives !Serial#red" - I was hpoing it would give "red"

(2) How can I "publish" serial data from the Wemos to my phone ??
i.e. What's the correct command as "serial" doesn't seem to work?

Any help or guidance would be appreciated.
Attachments
ScreenShot014.png
ScreenShot014.png (16.1 KiB) Viewed 2482 times

Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests