Emisar D4V2 Flash Kit Instructions (Official How To)

I guess that could have been a lot shorter… Basically, there were no major bugs in 0-8-15’s code; I’m just a picky bastard and kind of a terrible maintainer. So if anyone’s going to complain, they should complain about me instead of the awesome people who reached out to help. :slight_smile:

Yeah, sorry about the “major” bugs. But there were noticeable issues like delayed measurements. Btw, haven’t heard from 0-8-15-user since he finished his code…

TK, Sammy, the problem was (for me) an apparently wrong voltage reading after the light was switched off. Basically, it showed the blue aux for a couple of seconds even on low voltage. Wasn’t really a problem, but I updated to enojoy the new aux mode for voltage indication.

I’m very happy about the 0-8-15-inspired thermal management/regulation code! :+1:

Interesting. Usually when it’s off, it does the opposite… it’ll show low voltage for a few seconds after shutoff, then recover to a more accurate reading. That happens due to the measurement happening about half a second earlier while the battery is still under load, and then it waits a few seconds after shutoff before checking again.

Measuring high then adjusting down is odd.

So I ordered the brass D4v2 with the E21A and wanted to flash it to the latest version. Do I go with the Nichia or non-Nichia hex file?

Also, I noticed that if I were to set the moonlight mode to 1 click (lowest), when I would turn it on, it fades on. Pretty neat! BUT, when I step up in brightness and then back down to moonlight, the emitters no longer shine. It would take a couple seconds before it fades back on but sometimes it’s just not lit and I’d have to turn it off and back on again. Is this normal?

Is there a way to tell what version of Anduril is installed?

15 clicks from off. It should then blink out the date of the version installed (if new enough) - Year, month, day

That depends on where you got it. If ordered directly from Hank (intl-outdoor.com), it will have the latest version. If not, it's anyone's guess.

As for which file to load - - when you ordered it from Hank (if you did), you would have selected Nichia - or not. Which makes me think you got it somewhere else?

The correct firmware should be D4V2.5.nofet.hex for E21A emitters.

I went with the D4V2.5.nofet.hex and it works well too.

It’s a D4v2 with KR4 driver in nofet configuration (because of E21A). So you want the d4v2.5-nofet firmware.

That’s normal, and is part of the reason why the default floor level is set to 3/150 instead of 1/150. The bottom two levels aren’t stable on that driver.

The circuit inside is a KR4 driver, not a D4v2 driver. It should use the “d4v2.5-nofet” firmware, or if you’re making a fresh build, use the kr4-nofet build target. The “d4v2.5” thing was poorly named, and was a one-time build at Hank’s request. For updates, it should use kr4-nofet instead.

If you use the FET with E21A LEDs, it’ll burn itself out in just a few seconds. So whatever you do, make sure to use a “nofet” version of the firmware.

I just bought a D4V2 and had a KR2 driver installed in it. I’d update the KR2, correct?

The nonfet version is very likely to kill the E21A LED in the long term use.

Thanks for the info, in this case which stable version should be flashed?

I got a bit confused with the D4v2.5 hex file = when should this be used?

(one of the above message mentioned the "D4v2.5" version should be used for D4v2 with KR4 driver -- how do I find out if a D4v2 uses the KR4 driver?

Eg. if it's a D4v2 with EA21 LED, then which should be used: KR4-nofet.hex (older date) or the D4v2.5-nofet.hex (newer date) ?

(in the repository, the D4v2.5 hex files' most recent version is dated 2020-07-08
whereas the KR4 hex files most recent is 2020-04-27 ; so the D4v2.5 is "newer")


If it's a new D4v2 (how do I find out if it uses KR4 driver?) with XPL-Hi LED, shall I use the D4v2.5.hex file?

older D4v2 (definitely not KR4 driver) with SST20 LED = D4v2.5.hex or D4v2.5-219.hex?

older D4v2 (not KR4 driver) with Nichia 219C LED = use D4v2.5-219.hex or D4v2-219.hex?

KR4 with EA21 LED = use KR4-nofet.hex (older date) or D4v2.5-nofet.hex (newer date) ?

It is obsolete and with the latest version of Anduril it got merged into KR4.

E21A needs it. For other LEDs you have to order it explicitly AFAIK. Maybe the driver also looks different from the spring side (vias, color).

Yes, they were built at different time. But both are outdated now. This is about Anduril 2 and much has changed.

Probably old driver. You want the D4v2.hex file.

Definitely D4v2.hex.

Definitely D4v2-219.hex

It’s a KR4, use KR4-nofet.

Thanks for the quick reply, SammysHP.

One more question, how about the KR1 - which hex file does it use — the KR4 or KR4-nofet hex file? Assuming KR1 with W1 or KR1 with XPL-Hi LED.

K1 Osram & SBT90.2 = do they use the same K1 hex file?
K1 XHP35-Hi = I believe this uses the K1-12v

cfg-noctigon-kr4-nofet.h

BTW, TK added a list of models with their respective firmwares here: ~toykeeper/flashlight-firmware/trunk : contents of PRODUCTS at revision 250

Just for the record, the easiest way to build-and-flash might be to simply get a Raspberry Pi. Raspbian is close enough to Ubuntu that ToyKeeper's instructions work without modification, and a Pi 3B+ is probably cheaper than any flashlight you'd want to flash. The "Emisar D4V2 / D4SV2 / KR4 reflashing kit" just plugs into a USB port (though those smarter than I am could probably use its GPIO pins).

Building anduril2 and flashing is as simple as:

  • sudo apt-get install flex byacc bison gcc libusb-dev libc6-dev gcc-avr avr-libc binutils-avr avrdude avrdude-doc bzr

  • bzr branch lp:~toykeeper/flashlight-firmware/anduril2
  • cd anduril2/ToyKeeper/spaghetti-monster/anduril/
  • ./build-all.sh
  • ../../../bin/flash-tiny1634.sh anduril.noctigon-kr4-nofet.hex

(Of course, use the .hex appropriate to the your flashlight.)

So am I getting it right, if I have d4v2 with kr4 cc driver with FET I should use kr4 hex without -nofet option?

Yes, unless you have a Nichia 219 LED.