Go Down

Topic: JDY-08 Bluetooth LE Module - Datasheet, Fritzing part (Read 29127 times) previous topic - next topic

androidfanboy

I have this JDY-08/10 module and it doesn't work! I simply can't get it to respond to AT commands... I am using 115200 baud with 3.3V and with PWRC pin connected to GND. I spent the whole day trying to get it to work. Any ideas?

snoopy20

They use different chipsets.

My JDY-08 says +ERR to every command I send. The JDY-10 mostly worked command wise (could save name etc) but I could not get it into "data" mode. Some say it's automatic once connected but mine wasn't.

androidfanboy

I thought they both use CC2541. Did you mean different "firmware"? Try the following:

- "AT+BOUD1" to set baud rate to 57600
- "mySerial.begin(57600);" to initialize at that baud rate
- "AT+HOSTEN0" to enable master/slave

snoopy20

No, JDY-10 is much newer. You can find the chip by a Chinese company online but it's not well documented (surprise surprise).

I was sending end terminations to JDY-08 and that was giving the ERR. That's another plus for JDY-10. I've resolved that and some commands work. Most don't, for example;

AT+NAME => +ERR:1002

While

AT+VER => +JDY-08-V3.3843


My LE Scan on PC isn't finding it, AT+HOSTEN0 didn't return anything over UART. Probably it will be yet another fake/crap/POS destined to join the rest.

More JDY-10's on order, I could discover that one but could never make it send data.

Andrew

snoopy20

#19
Oct 31, 2017, 10:48 pm Last Edit: Oct 31, 2017, 11:01 pm by snoopy20
Figured it, here's a better manual which shows which functions work in which mode.

To set it to slave use AT+HOSTEN3. AT+NAME etc now work.

It should now be discoverable I think... but it isn't.

snoopy20

Now it is, my laptop BLE card had an issue. I've connected and discovered several characteristics. At this point my knowledge falls short.

I assume given there's no official protocol that if I'm in "transparent" mode (is that still AT+HOSTEN3?) then writing a character will change one of these characteristics and another characteristic will act as a flag which the master will poll and then know when to pull a value. Is that right?

If so what's the best way of going about working it out, writing a char to UART and checking each one?


androidfanboy

#21
Nov 01, 2017, 02:33 am Last Edit: Nov 01, 2017, 02:39 am by androidfanboy
I just used the HM-10 service and char UUID's:

service UUID: 0000ffe0-0000-1000-8000-00805f9b34fb
RX characteristic UUID: 0000ffe1-0000-1000-8000-00805f9b34fb
TX characteristic UUID: 0000ffe1-0000-1000-8000-00805f9b34fb

snoopy20

So the characteristic is set to NULL to indicate it's been read? How large is the RX/TX characteristic?

androidfanboy

I honestly don't know, I used an app to communicate.

snoopy20

Are you sure you used 0000ffe0-0000-1000-8000-00805f9b34fb?

I have this service but it has no characteristics.

I also have two others for Generic Access and Generic Attribute but as the name implies I believe these are Generic (one contains the device name for example).

Maybe 0000ffe0-0000-1000-8000-00805f9b34fb is correct but the characteristics are not exposed until the device is switched into pass-through...?

Andrew

androidfanboy

Yup I used "0000ffe0-0000-1000-8000-00805f9b34fb" for the service UUID and "0000ffe1-0000-1000-8000-00805f9b34fb" for both RX and TX characteristic UUID. I used "AT+HOSTEN0"

snoopy20

I've got JDY-10 wired up and commands are working. There are three services;

Code: [Select]

attr handle: 0x0001, end grp handle: 0x0007 uuid: 00001800-0000-1000-8000-00805f9b34fb
attr handle: 0x0008, end grp handle: 0x0010 uuid: 0000ffe0-0000-1000-8000-00805f9b34fb
attr handle: 0x0011, end grp handle: 0x001b uuid: 0000fee7-0000-1000-8000-00805f9b34fb


I read the characteristics from the second service which the manual says is the "transparent transmission service";

Code: [Select]

handle: 0x0009, char properties: 0x14, char value handle: 0x000a, uuid: 0000ffe1-0000-1000-8000-00805f9b34fb
handle: 0x000d, char properties: 0x14, char value handle: 0x000e, uuid: 0000ffe2-0000-1000-8000-00805f9b34fb



I assume these map to RX/TX. The manual says ffe1 is the "pass-through characterised ID"

Neither of this characteristics have any value.

Unlike JDY-08 there's no master/slave mode, so the question now is now to get data from UART in/out of these characteristics.

According to text regarding pin B0, the device enters transparent mode when a bluetooth connection is established, but can be overridden by this pin. Since I've left it floating I would expect the AT commands to cease operating upon connection, yet they don't.

Both these characteristics have a descriptor;

Code: [Select]

[A4:C1:38:77:28:E6][LE]> char-desc 0x0009 0x0009
handle: 0x0009, uuid: 00002803-0000-1000-8000-00805f9b34fb
[A4:C1:38:77:28:E6][LE]> char-desc 0x000d 0x000d
handle: 0x000d, uuid: 00002803-0000-1000-8000-00805f9b34fb
[A4:C1:38:77:28:E6][LE]> char-read-uuid 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0002 value: 12 03 00 00 2a
handle: 0x0004 value: 02 05 00 01 2a
handle: 0x0006 value: 02 07 00 04 2a


Which I figure with the char-properties bitmask value 0x14 sets read/write/notification etc. Unsure at this point though.


If I attempt a write;


Code: [Select]

[A4:C1:38:77:28:E6][LE]> char-write-cmd 0x000e 0x01
[A4:C1:38:77:28:E6][LE]> char-read-hnd 0x000e
Characteristic value/descriptor:
[A4:C1:38:77:28:E6][LE]> char-write-cmd 0x000a 0x01
[A4:C1:38:77:28:E6][LE]> char-read-hnd 0x000a
Characteristic value/descriptor:



No value for either, nothing in UART.

Unsure where to head next.



snoopy20

Some progress, I found a Chinese app for the JDY-08 and the two UUID's of interest are;

00002902-0000-1000-8000-00805f9b34fb (notificiation)
0000ffe1-0000-1000-8000-00805f9b34fb (tx/rx - looks like half duplex?)


Setting notifications to "1" puts the device into transparent mode

Code: [Select]

[A4:C1:38:77:28:E6][LE]> char-read-uuid 00002902-0000-1000-8000-00805f9b34fb
handle: 0x000b value: 00 00
[A4:C1:38:77:28:E6][LE]> char-write-cmd 0x000b 01 00


Now UART text comes through;

Code: [Select]

Notification handle = 0x000a value: 41 54 2b 4e 41 4d 45 0d 0a
Notification handle = 0x000a value: 41 54 2b 4e 41 4d 45 0d 0a
Notification handle = 0x000a value: 41 54 2b 42 41 55 44 0d 0a
Notification handle = 0x000a value: 31 30 0d 0a
Notification handle = 0x000a value: 31 0d 0a



However checking 0000ffe1-0000-1000-8000-00805f9b34fb offers no value, so perhaps this is a FIFO buffer.

Anyhow, doing a write to this char pumps it through to UART;

Code: [Select]

[A4:C1:38:77:28:E6][LE]> char-write-req 0x000a 01105D3A
Characteristic value was written successfully


So mission complete.  :)  Use the DISC pin to force a disconnect, or for a pre-configure prior to allowing a connection to go through.

verge2050

see this video
https://www.youtube.com/watch?v=6LFKlrigP7I
I have completed the communication between two jdy-08-ble modules.
for further information connect me on youtube. I will help you.

verge2050

See this video
https://www.youtube.com/watch?v=6LFKlrigP7I
Here you will see my project that I have completed the communication between two jdy-08-ble modules.
for any issue regarding to this module contact me on youtube via comment your problem in my video.
Verge2050.

Go Up