• AVR Freaks

Hot!RN4871 UART Sends but does not receive?

Author
Pete@1229
New Member
  • Total Posts : 4
  • Reward points : 0
  • Joined: 2020/05/04 14:10:42
  • Location: 0
  • Status: offline
2020/06/19 12:32:31 (permalink)
0

RN4871 UART Sends but does not receive?

Bringing up my board with the RN4871 on board after having worked through examples and my code with the PicTail board.
 
It seems like the RN4781 UART transmits but does not receive.  Baud rates are set correctly.  After powerup i get:
%REBOOT%
Followed by:
%CONNECT,1,7A87757C3343%%DISCONNECT%
When i connect and disconnect with an iOS Bluetooth testing app.
This tells me the RN4781 is powered up and functioning, and the UART_TX line is working fine. 
But, it is unresponsive to commands issued on the UART_RX line. I have attempted to put it in CMD mode, but it doesn't respond... Sent the following: 
$$$
+
D
SS,C0
PZ
PS,FFE0
PC,FFE1,16,02
IA,03,E0FF
Not seeing any response. 
 
Any suggestions would be appreciated. Thanks. 
 
Pete
  
 
#1

3 Replies Related Threads

    Pete@1229
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2020/05/04 14:10:42
    • Location: 0
    • Status: offline
    Re: RN4871 UART Sends but does not receive? 2020/06/29 11:52:29 (permalink)
    4 (1)
    No answers, but i figured t out and thought I'd pass my solution along. 
    Turns out I never got into command mode. Must have been sending $$$ too fast and following it with a <CR>.  Read thru the user guide again. 
    In the user guide I saw:
    To enter Command mode, type $$$ into the terminal emulator. Once RN4870/71
    enters Command mode, the string CMD> is sent by the module via the UART to indicate
    the start of Command mode session.
     
    Once in Command mode, valid ASCII commands are issued to control or configure the
    RN4870/71. All commands end with a carriage return <cr> and are always responded
    to by the RN4870/71. Any subsequent command must not be issued until a response
    is received for the previous command.
     
    I noticed they only say All commands end with a carriage return <cr> once you are in command mode, so I changed my function to just send the $$$. This worked fine.
     
    Device now responds to commands and can be configured. 
     
    Pete
     
     
    #2
    ric
    Super Member
    • Total Posts : 28004
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: online
    Re: RN4871 UART Sends but does not receive? 2020/06/29 17:38:52 (permalink)
    0
    The "$$$" itself can be fast, but there MUST be a pause in transmission immediately before and after it.
    Sending a CR straight after breaks that requirement.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #3
    Pete@1229
    New Member
    • Total Posts : 4
    • Reward points : 0
    • Joined: 2020/05/04 14:10:42
    • Location: 0
    • Status: offline
    Re: RN4871 UART Sends but does not receive? 2020/06/30 07:28:16 (permalink)
    0
    Thanks. That's what I figured. Was originally sending as a string with 0x0D as the last char, and as you say that broke the rule. Working great now. 
     
    Pete 
    #4
    Jump to:
    © 2020 APG vNext Commercial Version 4.5