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

Bluetooth RN42 module enters Command mode - deaf afterwards

Discussion in 'Radio and Communications' started by atferrari, Jan 17, 2016.

  1. atferrari

    atferrari Well-Known Member

    Joined:
    Oct 8, 2003
    Messages:
    2,812
    Likes:
    121
    Location:
    Buenos Aires - Argentina
    PIC micro 18F452 to control an RN42 module. PSU for the module, level converter (5 <>3V3) and USART, all previously tested, working OK. Module's CTS kept low since the start.

    Within the first 60 seconds after power up, the RN42 recognizes the $$$ command, returning CMD with GPIO5 starting to blink a LED at 10 HZ, all as expected.

    Whatever I send after, whether a correct command of any type, garbage or just --- to exit, the RN42 does not react. The module's TX pin shows no activity at all.

    There is hope because the 1st command being recognized, but then...what am I doing wrong?
     
  2. Les Jones

    Les Jones Well-Known Member

    Joined:
    May 15, 2015
    Messages:
    1,446
    Likes:
    187
    Location:
    Lancashire UK
    I have not used the RN42 module but I found that the HC06 module needs the command string sent quickly. Typing it in from a keyboard did not work. Could the RN42 be behaving in the same way ? I got round the problem by typing the command into notepad etc then copy and paste it into the terminal program. The HC05 module does not seem to give this problem.

    Les
     
  3. atferrari

    atferrari Well-Known Member

    Joined:
    Oct 8, 2003
    Messages:
    2,812
    Likes:
    121
    Location:
    Buenos Aires - Argentina
    Oh thanks! First comment I hear about and there is no explicit warning in the user's guide.

    My commands are assigned one per button of a 4x4 keypad.

    I will assign $$$ plus --- in sequence to one key with no additional delay.

    Famous words that almost nobody seems to do after: I will post the outcome. o_O
     
  4. dave

    Dave New Member

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


     
  5. atferrari

    atferrari Well-Known Member

    Joined:
    Oct 8, 2003
    Messages:
    2,812
    Likes:
    121
    Location:
    Buenos Aires - Argentina

    Hola Les,

    From the user's guide: using a micro, the command $$$ must be sent alone.

    As per a suggestion in another forum, I verified that the rest must be sent with a trailing <CR>. It works OK and timing in between commands does not matter.

    Now, off to plan the application code with minimal intervention from my side (if at all) during execution.
     

Share This Page