• AVR Freaks

Hot!Observations on updating RN4871 firmware with Update Tool

Author
tunelabguy
Super Member
  • Total Posts : 1713
  • Reward points : 0
  • Joined: 2005/04/03 08:30:19
  • Location: Hopkins, MN USA
  • Status: offline
2017/08/30 11:00:06 (permalink)
4.75 (4)

Observations on updating RN4871 firmware with Update Tool

Today I successfully brought a RN4871 back from the bricked state to normal functionality, so I thought I would summarize the procedure with some details I observed along the way.  Thanks to traversjames for your suggestions on going to page 43 of the PICtail manual.
 
First of all, the condition of my RN4871 had become totally non-responsive. (The hazards of the development process, I guess.)  Even with careful booting up with RX_IND held low and BT_RST brought high by my PIC, I verified with a scope that there was absolutely no activity on the serial TX pin from the RN4871, much less a full "%REBOOT%" message.  It was dead.  I had previously changed the baudrate to 2400 baud and for several days it worked fine at that baudrate.
 
From reading what others have posted here, I gathered that the critical pin for using the Update Tool is P2_0 (pin 16 on the RN4871).  This pin must be pulled low before power is applied, or at least before letting the RN4871 come out of reset, because it is only sampled at the time.  So I did that with a clip lead.
 
The Update Tool must also have control of the serial lines, RX and TX.  In my application circuit, RX and TX go directly to TX and RX on my PIC.  In order to avoid driving a line from two sources at once, I have a provision in my PIC program that will put both RX and TX in passive (input) mode when I power up with a certain jumper on my board.  This allows me to communicate with the RN4871 directly with a terminal.
 
If you haven't already made one, I highly recommend building a dedicated interface circuit to convert between a DB-9 standard RS-232 connector and four micro clip leads labelled GND, Vcc, TX, RX.  I use logic-level FETs to perform the necessary inversion and level shifting of RX and TX and a 9-volt battery to generate voltages sufficient for most RS-232 ports on computers.  Having a Vcc line into this box lets it work with both 5-volt and 3-volt circuits.  I use mine in practically every project that involves serial ports.
 
I downloaded RN487x Firmware Update Tool -IsUpdate.zip and RN487x Firmware v1.18.3 - Apr14.zip from Microchip.  I unzipped both packages into the same folder.  The first package contains only the isupdate.exe application.  The other package contains BT5505_BLEDK3_RELEASE_SHADOW.H00, BT5505_BLEDK3_RELEASE_SHADOW.H01, BT5505_BLEDK3_RELEASE_SHADOW.H02, BT5505_BLEDK3_RELEASE_SHADOW.H03, and a PDF file of release notes.
 
I have a USB to RS-232 converter plugged into my Windows computer.  When I run isupdate.exe, one of the choices for the Access Port is COM3, which is this serial port.  The baudrate is set to 115200, which caused me some concern, since I had changed the baudrate of my RN4871.  But it appears that when in the update mode (P2_0 pulled low) the RN4871 always goes to 115200 regardless of what was set in application mode, so that was a good thing.  Following the instructions on page 43 of the PICtail manual, I changed the memory type/subtype to "flash" and "Embedded flash".  Nothing else needed changing.
 
Then I powered up my application circuit, making sure that:
1. Jumper telling the PIC to "go passive" was in place.
2. P2_0 was pulled low.
3. RX, TX, Vcc, GND taps for my interface circuit were connected.
 
Then I clicked on "Connect."  Connection with the RN4871 succeeded and the other buttons in the Update Tool were no longer grayed out.
 
I clicked on the upper "Browse" button and selected all four of the .H0x files that had been unpacked earlier.  (I don't know if that was necessary.  Maybe the Update Tool would have found them on its own.)
 
I clicked on "Update", and then watched as the displayed filled out just as shown in the PICtail manual.  It took less than half a minute.  It ended with "End of Write Memory.".  Then I clicked on Disconnect and powered down the application circuit.
 
Then I removed the P2_0 jumper, ran a terminal program on my PC, and powered up the application circuit.  "%REBOOT%" appeared at 115200 baud, and response to "$$$" and commands was as expected.  Apparently updating the firmware also resets the application baud rate setting.
 
So that's it.  Everything is back to working as it was before the RN4871 was bricked.

Robert Scott
Hopkins, MN
 
#1

7 Replies Related Threads

    RISC
    Super Member
    • Total Posts : 5376
    • Reward points : 0
    • Status: offline
    Re: Observations on updating RN4871 firmware with Update Tool 2017/08/30 12:34:39 (permalink)
    3 (1)
    Thanks so much for sharing your experience
    The tool you used is actually normally used to update firmware and it "cleans up" the firmware inside the module.
    Can you please check what is the MAC address of your module by connecting to it ?
    (If I remember well it is also written on the label on top of the module case)
    Regards
     
    #2
    tunelabguy
    Super Member
    • Total Posts : 1713
    • Reward points : 0
    • Joined: 2005/04/03 08:30:19
    • Location: Hopkins, MN USA
    • Status: offline
    Re: Observations on updating RN4871 firmware with Update Tool 2017/08/30 17:42:28 (permalink)
    3 (1)
    Sure.  The MAC address of this RN4871 is D8:80:39:F4:18:B6.  I got this from a BLE scanner app and got the same thing by issuing the "D" command through the terminal.
     

    Robert Scott
    Hopkins, MN
     
    #3
    RISC
    Super Member
    • Total Posts : 5376
    • Reward points : 0
    • Status: offline
    Re: Observations on updating RN4871 firmware with Update Tool 2017/09/01 15:27:22 (permalink)
    3 (1)
    Hi,
    I thought (feared) that maybe the MAC address would be reset (erased) by updating the FLASH.
    But from what you say it is not the case ;=)
    Regards
    #4
    tunelabguy
    Super Member
    • Total Posts : 1713
    • Reward points : 0
    • Joined: 2005/04/03 08:30:19
    • Location: Hopkins, MN USA
    • Status: offline
    Re: Observations on updating RN4871 firmware with Update Tool 2017/09/01 15:52:45 (permalink)
    3 (1)
    RISC
    Hi,
    I thought (feared) that maybe the MAC address would be reset (erased) by updating the FLASH.
    But from what you say it is not the case ;=)
    Regards


    It wasn't the case with this chip, but it was the case for 2 other chips I also had to re-flash.  The MAC address showed as 000000000000.  I set the MAC address to a random address I made up using the command:
     
    S:,0000,665544332211
     
    However the device name, which used to be RN_BLE-xxxx where xxxx as the last 4 digits of the MAC is now just RN_BLE.  It does connect with my Android app and seems to work anyway.
     
    Actually, the destruction of the MAC address may not have been a result of the re-flashing but may have actually happened earlier in whatever event caused the chip to appear dead and need a flash update.
    post edited by tunelabguy - 2017/09/01 15:54:38

    Robert Scott
    Hopkins, MN
     
    #5
    kg_32
    New Member
    • Total Posts : 18
    • Reward points : 0
    • Joined: 2016/10/12 07:57:47
    • Location: 0
    • Status: offline
    Re: Observations on updating RN4871 firmware with Update Tool 2017/12/14 09:18:15 (permalink)
    0
    tunelabguy
    Even with careful booting up with RX_IND held low and BT_RST brought high by my PIC, 



    Hi Robert,
     
    I have similar issue, my RN4871 is stuck in non responsive state it does not reply to "$$$", I came across this post of yours.
    I couldn't find these pins 'RX_IND and BT_RST ' for RN4871, I am referring to RN4870/71 Datasheet (Oct 2017). This document mentions this pin UART_RX_IND as P3_3 but it is not available for RN4871 (It only available for RN4870 and RN4870U).
     
    Could you please help me Identifying this pins also please let me know where did you read this procedure for booting up the device with special pin configuration. I have only 2 documents Datasheet and User's guide is there any other document that I am missing out?
     
    Thanks
    Kuldeep
     
    #6
    joebankbandy
    New Member
    • Total Posts : 1
    • Reward points : 0
    • Joined: 2017/12/27 05:32:58
    • Location: 0
    • Status: offline
    Re: Observations on updating RN4871 firmware with Update Tool 2017/12/28 00:32:18 (permalink)
    0
    Hello,
    my problem is that its not possible to update the firmware fo my RN4871.
     
    I connect the BLE-modul via TTL-cabel (RX, TX, GND) to USB-port. Then I start update-tool und select the right properties for the access port. Now, when i try to connect the modul i got a message in the window "Connect failed".
    With my oscilloscope i can messure that i receive a signal on the RX-wire at the modul.
    Does anyone have an idea what could be the reason for this error?
     
    Thanks joe
     
    #7
    jijo.thomas@bytesandnibbles.com
    New Member
    • Total Posts : 7
    • Reward points : 0
    • Joined: 2019/06/24 02:21:40
    • Location: 0
    • Status: offline
    Re: Observations on updating RN4871 firmware with Update Tool 2019/07/07 01:14:28 (permalink)
    0
    Hello,
    I have a question on RN4871 sleep mode. I have the below scenario and could someone suggest me the solution please
     
    My RN4871 is connected to PIC24FJ and I want to enter sleep mode when there is no activity and wake up when user want to send data/command from his android phone. So what I need need is when user send data from mobile, my RN4871 shall wake up and then my PIC24FJ. Is this possible?
     
    I know the other way is possible to wake RN4871 up from microcontroller
     
    Regards,
    Jijo
    #8
    Jump to:
    © 2019 APG vNext Commercial Version 4.5