Emisar D4V2 Flash Kit Instructions (Official How To)

Thanks Tim, I do follow the SC31 Pro thread now.

I'v seen this very successful achievement by SammysHP, but this is not within the newbie's reach.

So unless a dedicated easy-to-use flashing kit becomes available, I'll be waiting for a future version of the SC31 Pro, more upgrade-friendly as I suggested in a PM to Barry.

Hey guys, I have a D4V2 with the KR4 driver i bought straight from hank. I was wondering if you guys knew what settings i needed for a PC based update… and if an update came out in the last year? Do we still use the same drivers/software outlined in this thread?

Which LED option is installed on your D4v2 with KR4 driver?

Xp-l hi v3 I believe

So your D4v2 has XPL-Hi LED and the KR4 driver (5A CC constant-current + FET).

I believe the correct .hex file is either the

anduril.2020-07-08.emisar-d4v2.5.hex 2020-07-08 21:55 26K
or
anduril.2020-04-27.noctigon-kr4.hex 2020-04-27 19:21 26K

in the TK Anduril 1 firmware repository (URL: Index of /torches/fsm )

I think I’ve encountered an issue (strobes issue?) with the “2020-07-08.emisar-d4v2.5” so I used the “2020-04-27.noctigon-kr4” instead

Or use

anduril.2021-01-25.noctigon-kr4.hex 2021-01-25 00:06 26K

if Anduril 2 ( URL: Index of /torches/fsm/anduril2 )

How do I figure out the correct one between the two? I know it has the KR4 driver but is the D4V2ti. I’m assuming it goes by driver and not flashlight model?

D4v2 with XPL-Hi LED can use the FET version (ie. not the NoFET version).

The firmware goes by the driver, not exactly the flashlight model.

I think there was some previous discussion regarding the difference between D4v2.5 and KR4, which I can’t exactly remember (will need to search previous posts or other message threads here in BLF). Both mentioned hex files would be usable on the D4v2 with the KR4 driver… but one may have a few issues (can’t remember exactly though… should be minor issue only)

Hi all
I flashed anduril.2021-01-25.noctigon-kr4.hex on my D4V2 with XP-L HI V3 3A, 5000K, so I believe I do have KR4 driver.
But I cannot configure AUX leds, going into advanced mode does nothing. Not sure if that’s correct then. Any help please ?

Just to retrace the steps from the start (Anduril 2):

  1. do a factory reset first (hold down button while tightening the tailcap until the “exploding” animatino)
  2. switch to Advanced UI: from OFF, do 10H (10 clicks but the 10th click is a “hold”)
  3. configure Aux-LED:
    from OFF: do 7 clicks to change the Aux-LED mode (Low -> High -> Blinking -> Off)
    or from OFF: do 7H (7 clicks but the 7th click is a “hold”: continue holding will cycle each color / disco / rainbow / voltage)

I have come up with a much simpler way of doing a Mac install on Big Sur that does not need Xcode installed and is much simpler.

These are very minimal and simple instructions.

Open up a terminal window and type the following:

Confirm the installation of the Xcode tools

Let the home-brew system install - this may ask for your password

This will install the avrdude utility

This should have installed everything you need to flash your flashlights. To test that avrdude is installed and running type the following on the terminal window:

avrdude should return a version number.

From here you can install the new version of Anduril on your light following the Windows instructions from the step titled “Testing Communication To The D4V2”

For me this was a as simple as downloading the latest file and running this command line:

I hope someone finds this useful.

I think I bricked my D4V2 Sand with XPL-HI emitters while flashing Anduril 2.

sudo avrdude -c usbasp -p t1634 -u -Uflash:w:anduril.emisar-d4v2.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9412 (probably t1634)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "anduril.emisar-d4v2.hex"
avrdude: input file anduril.emisar-d4v2.hex auto detected as Intel Hex
avrdude: writing flash (7926 bytes):

Writing | ################################################## | 100% 3.30s

avrdude: 7926 bytes of flash written
avrdude: verifying flash memory against anduril.emisar-d4v2.hex:
avrdude: load data flash data from input file anduril.emisar-d4v2.hex:
avrdude: input file anduril.emisar-d4v2.hex auto detected as Intel Hex
avrdude: input file anduril.emisar-d4v2.hex contains 7926 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 1.99s

avrdude: verifying …
avrdude: verification error, first mismatch at byte 0x0000
0x00 != 0x0c
avrdude: verification error; content mismatch

avrdude done. Thank you.

I tried flashing it again with Anduril 2 and Anduril 1 but I get:

sudo avrdude -c usbasp -p t1634 -u -Uflash:w:anduril.emisar-d4v2.hex 

avrdude: error: program enable: target doesn't answer. 1
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude done. Thank you.

I'm using the flashkit from intl-outdoor. I also tried using another USBasp and cable. I was able to flash my D4V2 Ti using Ubuntu with avrdude 6.3 and Zflasher on Android but not my D4V2 Sand.

sudo avrdude -c usbasp -p t1634 -n

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e9412 (probably t1634)

avrdude: safemode: Fuses OK (E:FF, H:DE, L:E2)

avrdude done. Thank you.

I also checked continuity with a DMM between the USBasp board and pogo adapter board, and between pogo adapter and pogo pins.

Has anyone managed to brick a D4V2 before?

Would I need to remove the at1634 and try to clear it?

It's possible that I slipped with the pogo pins by ~1mm and touched the wrong pads while flashing.

I’ve only ever bricked an ATTiny from flashing fuses when it wasn’t necessary. It doesn’t look like you did that.

TBH I think this is all bad connections.

I hope so… My D4V2 Sand no longer responds. I was able to flash it multiple times.

Holding it like this:

The connection to my D4V2 Ti works and I can flash it.

The pads on the D4V2 Sand look ok. I wiped them with some isopropyl alcohol yesterday but it still won’t respond:

Is there a second source for the pogo pin adapter? Emisar D4V2 / D4SV2 / KR4 reflashing kit seems like you can only pay with an actual Paypal account (as opposed to just via credit card thru paypal) and i don’t have a Paypal acct.

I just got a d4v2 and I’m so happy the driver has the AVR programming pins brought out to the back. I spent so much time writing code and flashing for the old attiny nanjg and similar driver boards for older generation lights and it was such a pain always having to take apart the head to reflash. So I’m looking forward to messing with Anduril without all the pain!

Could you build one?

- Get USBASP V2.0 Programmer

- Get an adapter board for the pogo pins (or use hot glue?)

- Get pogo pins

- Get a cable, jumper wires, or just solder wires between the USBASP and the adapter board

  • Solder pogo pins to a board

ProgKey v1.14 adapter board (is the pinout compatible?)

https://oshpark.com/shared_projects/orhYWEK3

Get pogo pins (100Pcs/Bag Spring Test Probe Pogo Pin P50-B1 Dia 0.5mm Length 16.35mm):
AliExpress

Solder pogo pins to the adapter board:

Hot glue and heat shrink approach:

sure. I’m just thinking assembling something that holds the pogo pins perfectly in position and at the correct spacing would be a real challenge, at least for me. I’m fine with circuit design and engineering and i have a bunch of avr programmers, but as soon as it gets a little mechanical I’m uselesss… And using pogo probes that aren’t just right is really frustrating. Thanks for the links tho - good stuff.

Currently reflashing my D4V2 Brass with E21A with what I believe is the KR4 board (it’s white). I wanted to apply some click menu changes to so I tried to rebuild and flash using revision 247 with cfg-noctigon-kr4-nofet.h. Everything built without an issue and loaded to the flashlight except the button no longer lights up either along with the RGB brightness or tracking with the ramp. I assume that’s because the KR4 doesn’t have a lighted button. On a lark I added:

#define USE_BUTTON_LED
#define USE_INDICATOR_LED_WHILE_RAMPING

to the top of the cfg-noctigon-kr4-nofet.h but that just gives me errors that BUTTON_LED_DDR, _PIN, _PUE and _PORT are not set when I try to build.

Is there some happy combo of kr4-nofet and d4v2-nofet that’ll restore the backlit button functionality? I didn’t want to try d4v2-nofet without asking because it has a different set of PWM1 levels and a higher discrete floor than has been discussed here in this thread.

The same changes work without issue on my aluminum D4V2 with no backlit button using the cfg-emisar-d4v2.h.

Solution: I figured out that it was version 487 under the fsm branch that had all the necessary code. Running “bzr branch lp:~toykeeper/flashlight-firmware/fsm” caught everything up. Everything works great now. Leaving this in for anyone else who might need the info.

Ok…. so.

First time updating my D4V2 (I actually believe it’s a D4V2.5 since it’s got the D4V2 with KR4 driver). I see there’s an AVRdude 6.3 out, but can’t get that to run. I also see there’s ZADIG 2.5, is that correct? Lastly, where is the latest version of firmware stored? All I see for my light is D4V2-219. Is this correct? This is the light i have: Emisar D4V2 Ti Quad 18650 High Power LED Flashlight . Once i run it once I’ll be self sufficient but i need a bit of help right now. I do have the flash kit.

Which emitters does your D4V2 Ti with KR4 driver have? Is it a KR4 nofet? If you install the wrong firmware, you could burn out the emitters.

I made some notes, based on oweban’s Mac instructions, for installing avrdude under Ubuntu 18.04 and flashing Anduril 1 on my D4V2 Ti KR4 nofet with E21A emitters: