1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

JDY-10 Bluetooth BLE Uart Transceiver Module

Discussion in 'Microcontrollers' started by ACharnley, Oct 13, 2017.

  1. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    I couldn't find anything on Google so to save others the time required to find out anything decent about this small module I'm creating this thread which will be indexed by Google.

    STATUS: THIS MODULE IS USELESS

    The JDY-10 uses the TLSR8266 chip which has an impressive specification and low power requirements. It's currently the cheapest BLE module on Aliexpress. As with all these various modules, key lies in the quality of the firmware.

    Eventually I found a Chinese datasheet which I've attached. Google will do a pretty good translate of it. You can use the URL to find a store which reveals the company name and then google that for the company URL. The price/unit is $0.99 direct.

    The chip runs at a default baud of 115,200. There is an AT+BAUD command to change it but it doesn't work - you're stuck at 115,200 baud.

    You can change the BLE exposed name but the last character is always missed off, so add a random character.

    Much of the time the module fails to start. You'll know when it does by the terminal output "Star...".

    Finally, to enter pass-through mode the pin B0 (according to the datasheet) must be toggled to ground. Well here's the thing - it doesn't work!

    I had the key parts related to pin B0 translated and I've included them below.

    µÍµçÆœ AT ģʜ,ĬÈÏžßµçÆœ
    AT mode of Low level is default high level

    ŽËÒýœÅÔÚÒÑÁ¬œÓÇé¿öϲ»ÐèÒª·¢ AT ÖžÁîµÄ»°, ¿ÉÒÔ²»
    ÓùÜ,Ðü¿ÕŸÍÐÐ
    The pins can be ignored and suspended if there is no required to send the AT command under the connected condition.

    µ±ÒªÇóÔÚÁ¬œÓµÄ׎̬·¢ AT ÖžÁîʱ,ŸÍœ« B0 ÒýœÅ±£³Ö
    µÍµçÆœ,ŸÍœøÈë AT ģʜ,Óû§ŽËʱŸÍ¿ÉÒÔ·¢ËÍ AT Öž
    Áî,Òª·¢ÍžŽ«ÊýŸÝʱŸÍœ« B0 ±£³ÖžßµçÆœ,ŸÍÁ¢ŒŽœøÈë
    ÍžŽ«Ä£Êœ
    When it require sending the AT command in the state of the connection,
    then just keep low level for the B0 pin, it enters the AT mode,and the users can send AT command at this time.
    When it require to send passthrough data,then keep the B0 maintain a high level,
    then it will immediately into passthrough mode.


    ÊÇ·ñÔÚÎŽÁ¬œÓµÄÇé¿öÏ·¢ AT ÖžÁîÐèÒªœ« B0 ±£³ÖµÍµç
    Ɯ ?
    Does it need to keep the BO low level if we want to send the AT command at the state of unconnected?


    Žð:²»ÐèÒª,Ä£¿éÔÚÎŽÁ¬œÓµÄ׎̬ÏŸÍÊÇ AT ģʜ,ÓÃ
    »§²»ÐèÔÚÒÑÁ¬œÓÇé¿öÏ·¢ËÍ AT ÖžÁî ,B0 ÒýœÅ¿ÉÒÔÐü
    ¿Õ

    Answer: no, the module is AT mode in an unconnected state.
    B0 pins can be suspended if the user does not need to send the AT instruction under the connected condition.

    ATÖžÁî¿ØÖÆÒýœÅ
    Á¬œÓ׎̬Ï£ºµÍµçÆœATģʜ
    ÍžŽ«Ê±£ºÐèÒªÀžß
    ŽËÒýœÅÈçÓò»ÉÏ£¬¿ÉÐü¿Õ

    AT command control the pins
    Under connected condition:low level AT mode
    Passthough condition:need draw high
    The pins can be suspended if it do not be used.
     

    Attached Files:

    Last edited: Oct 13, 2017
    • Thanks Thanks x 1
  2. eternity

    eternity New Member

    Joined:
    Monday
    Messages:
    2
    Likes:
    0
    Hi, thanks for the info. I bought a module like this. It reports its Bluetooth name as JDY-10-V2.4 on my Android device. I tried to pair with it but it will not pair. I read that giving it an AT command of AT+TYPE3, or something like that it was, and rebooting it will make it able to pair with Android. I am having trouble getting a terminal session running with it. Can you confirm the procedure to get a terminal session running with it ? I have a USB to Serial adapter connected to the RX and TX pins of the module. I tried the screen terminal under linux, and the Arduino serial terminals to communicate with it but get no response. Could you confirm the baud rate line endings, caps no caps etc... and anything I might be missing ?
     
  3. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    I made mine work and I wish I'd wrote it down as I'll have to repeat it at some stage. The pdf I attached previously was wrong so I've attached the correct one.

    Make sure the red +V from your serial adapter is not connected, usually they are 5v and will fry the chip.

    As I recall (and don't quote me) the B0 pin must be pulled low (or high?) to enter AT mode otherwise none of the commands will work. AT+TYPE is only for the JDY-08 which supports master. The JDY-10 is slave only.

    First you have to understand how BLE works, it doesn't pair automatically like normal bluetooth but is done by an App. This is because BLE doesn't have any protocols so is OS useless.

    Instead there are ID's and best practices of which corresponds to services;

    https://www.bluetooth.com/specifications/gatt/services

    A service has characteristics and these can be shared between services.

    https://www.bluetooth.com/specifications/gatt/characteristics

    Try using Linux and hcitool/gattool to connect that way. There is a characteristic which references the data connection and it's half duplex which is where the fun of writing your own protocol begins. This is where my knowledge is fuzzy but I recall using gattool to read the ID. There's some sort of read/push feature which automatically prints incoming data to the terminal, this is what you want.

    https://www.jaredwolff.com/blog/get-started-with-bluetooth-low-energy/

    I also used cutecom for the modem terminal. Use 115200 and find your adapter under /dev/ttyUSBx. You need to configure it to send CR+LF characters upon <enter>. This is much better than JDY-08's stupid delay=send. Sometimes with the USB adapters can't tell which is RX or TX. RX has to go to TX on the BLE module.

    Using these two I managed to get data going between the two. I think it can only send one character/byte at a time but I honestly can't remember and might be making that up. At the point at which I knew I could get data going between them I committed to using it in my PCB. That's how much hassle I had with other units and how desperate I'd become.

    BTW look at the B0 pin. By default the unit is in transparent mode (or not?) and it works to disable all the AT commands. The only one I needed was AT+NAME and I got it working. Note it has a stupid bug, the last character is omitted so to change the name to "Dog" you need to do AT+NAME=Dogx (maybe the = is not required I can't remember). I've connected this pin to my MCU so I'm pretty sure it's critical.

    I'll be knee deep in JDY-10 in a few weeks time as my prototypes are back from the fab then and the programming fun begins.
     

    Attached Files:

    Last edited: Dec 11, 2017 at 8:51 AM
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. eternity

    eternity New Member

    Joined:
    Monday
    Messages:
    2
    Likes:
    0

    Thanks for your helpful response.

    Looks like my initial setup was actually correct. Problem was this module does not respond to AT with OK. It just does not respond... It will respond with OK to other things like setting the name which is done with AT+NAME YourName. Or give version info AT+VER etc. This is the first time I work with any modem or any at command mode device which does not respond to AT or AT+ with OK so I thought my setup was wrong. FIY I can confirm that this module will accept ( in the unconnected state ) AT commands regardless of the state of B0. Looks like, according to the datasheet, the state of B0 is only relevant when in the connected state. Low to accept AT commands. Which would explain why you have it brought in your design...

    BTW My module did not cut off the last letter of the name when setting it. It just works as expected. V2.4.
     
  6. ACharnley

    ACharnley Member

    Joined:
    Oct 25, 2015
    Messages:
    228
    Likes:
    1
    Probably there's two V2.4 versions, it's Chinese after all. :)

    Most AT commands don't work, it's much simpler than JDY-08 due to lack of master mode. It sounds like once you make it connect you should be able to get some data flow going.
     

Share This Page