Emisar D4V2 Flash Kit Instructions (Official How To)

142 posts / 0 new
Last post
wkweksl
Offline
Last seen: 18 hours 31 min ago
Joined: 04/01/2011 - 07:07
Posts: 58
Location: SG

brewster wrote:
Does anyone know the minimum version of Avrdude that is needed to flash the t1634 chip in the D4V2? The reason for asking is that I may have a simpler installation for Mac OSX than that shown in Reply #34. It is also a much smaller download. But my method only installs version 6.0.1 not version 6.3 as that method does.

Both the OP and Reply #5 suggest that Avrdude version 6.0.1 is sufficient, but I’m unsure if this is actually tested on the D4V2.


You could try executing “avrdude -p t1634 -c usbasp -n” on 6.0.1 to check if it indeed supports t1634. I went with avrdudess as it was a smaller zip extract instead of the file supplied by Hank.
brewster
Offline
Last seen: 1 hour 5 min ago
Joined: 07/19/2019 - 23:29
Posts: 24
Location: Australia
wkweksl wrote:
You could try executing “avrdude -p t1634 -c usbasp -n” on 6.0.1 to check if it indeed supports t1634.

Thanks. Good point about the check. It confirms that Avrdude 6.0.1 does recognise the t1634. What’s more, if I specify something meaningless (like t1635 for instance) Avrdude responds with a list of the devices that are supported, which includes the t1634.

I’ll write some notes on my simpler (and smaller) Mac OSX installation.

And my offer to help with flashing of a faulty D4V2 stands (when I get my pogo adapter).

brewster
Offline
Last seen: 1 hour 5 min ago
Joined: 07/19/2019 - 23:29
Posts: 24
Location: Australia

Here is an alternative to Reply #34 for installing and using Avrdude on a Mac with OSX (See below for my setup. YMMV.)

This method may be simpler for some users, because it is closer to a regular Mac installation. It is certainly quicker, because the download is 42.7MB instead of the 6.1GB or so of the other package (that is less than 1% of the download).

1. Log in as administrator.
2. Go to this page and follow the instructions down to the paragraph Option 1. AvrMacPack. Ignore the rest of the page from the heading Option 2. OSX-AVR to the end of the page (that is most of the page you will ignore). Hint: You can also find the Terminal app using the Launchpad (where it may be in a folder called Utilities or Other).
3. Do as instructed in Option 1, which tells you to go to this page.
4. Download the latest version of the .dmg file at the top of the list (it is from 2103). That gives you a disk image containing a regular Mac installer. Double click the downloaded disk image file and follow the usual Mac installation.
5. Download the appropriate hex file with Anduril as described in the OP paragraph Downloading Flash Files.
6. You need to relocate this hex file to where the Avrdude program can find it. I found it easiest to put it in my ‘home’ directory. It has a path like “Macintosh HD\Users\yourname”, where “yourname” is your login name. It is the folder that contains folders like Documents and Downloads that are put there by the Mac system.
7. Follow the rest of the OP instructions from Testing The AVRDUDE Installation to the end.

My setup: MacBook Pro early 2013 with OSX 10.13.6.

xenotar80
Offline
Last seen: 23 hours 8 min ago
Joined: 03/16/2019 - 00:58
Posts: 66

Just leaving some feedback. Flashed four d4v2 on a mac OS without any issues with the instructions from f0xx. didn’t see this comment from brewster until now.

Everything worked perfectly.

thanks!!

BabyDoc
BabyDoc's picture
Offline
Last seen: 8 hours 21 min ago
Joined: 05/29/2019 - 09:37
Posts: 139
Location: Beachwood, Ohio

I just flashed my 2 D4v2s using my Note8. My only trouble was finding the correct placement of the pogo pins with my 76 year old eyes. I kept getting error messages until I put on a binocular jewelers magnifier. If I can do it, probably anybody else can, too, thanks to Hank and ZozzV6.

Terry Oregon
Terry Oregon's picture
Online
Last seen: 4 min 10 sec ago
Joined: 10/21/2017 - 17:03
Posts: 486
Location: Beaverton Oregon

Received my flash kit.  Soldering on the pins is very clean. Reflashed one of my D4V2 (no problems). Macro photography lighting courtesy of my D4V2.

 

 

 

 

My reviews: , My personal collection of lights LINK,  J5 Tactical V1 Pro review LINK,  Thirteen Optical Sensors review LINKZebralight SC700d review LINK,  Ray-O-Vac Super Power Sportsman review LINK,  Convoy S2+ color combos LINK,  How To flash D4V2 LINK.

Geuzzz
Geuzzz's picture
Offline
Last seen: 1 week 1 day ago
Joined: 10/25/2015 - 10:27
Posts: 1114
Location: Netherlands

Thanks, great thread! Super easy following the instructions, especially using an android phone.

fluke
Offline
Last seen: 4 hours 11 min ago
Joined: 04/20/2018 - 13:58
Posts: 425
Location: London United Kingdom

I used the AVRDUDE method, only problem I had was I selected the wrong MCU from dropdown.

 

liquidrazer
liquidrazer's picture
Offline
Last seen: 6 days 9 hours ago
Joined: 07/16/2019 - 13:08
Posts: 7
Location: New Jersey

just waiting on my kit to fix my bugged D4V2! i dont use muggle mode, but damn its a great idea!

Man Without Shadow
Man Without Shadow's picture
Online
Last seen: 10 min 51 sec ago
Joined: 02/20/2017 - 18:17
Posts: 446
Location: Wisconsin

Got my flash kit today. Flashed 8/5/2019 hex in a few seconds using the Android phone app. Works great and the phone app really made it easier than using AVRdude (which isn’t that hard anyway). Thanks for the Android method! I hope any future Emisar lights use the same pad/via configuration for updating firmware.

When I'm spending mony foolishly, I like to do it wi$ely...

I have all the flashlights I need, but not as many as I want...

 

bansuri
Offline
Last seen: 59 min 39 sec ago
Joined: 01/30/2017 - 23:43
Posts: 441
Location: Land of Lincoln

My kit arrived today. USB recognized but avrdude wouldn’t communicate with light. Inspection of pogo pin soldering revealed that there were some sections with solder bridging the traces.
Simply dragging a thin X-acto between the pins along the board surface a couple times cleared it out. Flashed and good to go!

shinysideup
Offline
Last seen: 3 months 1 week ago
Joined: 09/24/2017 - 00:42
Posts: 23
Location: Calgary, AB

I received my flashing kit. Using the posts above, I was able to easily get everything working on MacOS, and now my D4V2 is updated. Thanks for taking the time to create these easy to follow posts!

trailhunter
Offline
Last seen: 4 hours 24 min ago
Joined: 12/23/2015 - 17:56
Posts: 677
Location: Mars

hey all… im currently updating the firmware on my d4v2, im getting a mismatch on byte, anyone have an idea why this is the case? heres the output

Quote:

  1. CHECK CONNECTIVITY
    C:\Users\user\Desktop>avrdude -p t1634 -c usbasp -n

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0×1e9412

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

avrdude done. Thank you.

  1. FIRMWARE UPDATE
    C:\Users\user\Desktop>avrdude -p t1634 -c usbasp -Uflash:w:anduril.2019-08-05.emisar-d4v2-219.hex

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0×1e9412
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: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file “anduril.2019-08-05.emisar-d4v2-219.hex”
avrdude: input file anduril.2019-08-05.emisar-d4v2-219.hex auto detected as Intel Hex
avrdude: writing flash (9122 bytes):

Writing | ################################################## | 100% 7.08s

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

Reading | ################################################## | 100% 5.24s

avrdude: verifying …
avrdude: verification error, first mismatch at byte 0×0020 0xff != 0×0c
avrdude: verification error; content mismatch

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

avrdude done. Thank you.

Terry Oregon
Terry Oregon's picture
Online
Last seen: 4 min 10 sec ago
Joined: 10/21/2017 - 17:03
Posts: 486
Location: Beaverton Oregon

Try a couple more times, making sure you're holding the pins steady. I ran into this problem as well. What I did - was flashed the other hex file (non Nichia version), and it worked.  Then I went back and flashed the correct hex file for my light (Nichea version), and it also worked. Not sure what causes this error. 

My reviews: , My personal collection of lights LINK,  J5 Tactical V1 Pro review LINK,  Thirteen Optical Sensors review LINKZebralight SC700d review LINK,  Ray-O-Vac Super Power Sportsman review LINK,  Convoy S2+ color combos LINK,  How To flash D4V2 LINK.

trailhunter
Offline
Last seen: 4 hours 24 min ago
Joined: 12/23/2015 - 17:56
Posts: 677
Location: Mars
Terry Oregon wrote:

Try a couple more times, making sure you’re holding the pins steady. I ran into this problem as well. What I did – was flashed the other hex file, and it worked.  Then I went back and flashed the correct hex file for my light, and it also worked. Not sure what causes this error. 

okay will continue trying, do you recall if you got the same error as below?

Quote:
avrdude: verification error, first mismatch at byte 0×0080 0xff != 0×00
Terry Oregon
Terry Oregon's picture
Online
Last seen: 4 min 10 sec ago
Joined: 10/21/2017 - 17:03
Posts: 486
Location: Beaverton Oregon

trailhunter wrote:
Terry Oregon wrote:

Try a couple more times, making sure you're holding the pins steady. I ran into this problem as well. What I did - was flashed the other hex file, and it worked.  Then I went back and flashed the correct hex file for my light, and it also worked. Not sure what causes this error. 

okay will continue trying, do you recall if you got the same error as below?
Quote:
avrdude: verification error, first mismatch at byte 0x0080 0xff != 0x00

I posted an example of the "verification error" on the instructions.  It was slightly different.

My reviews: , My personal collection of lights LINK,  J5 Tactical V1 Pro review LINK,  Thirteen Optical Sensors review LINKZebralight SC700d review LINK,  Ray-O-Vac Super Power Sportsman review LINK,  Convoy S2+ color combos LINK,  How To flash D4V2 LINK.

trailhunter
Offline
Last seen: 4 hours 24 min ago
Joined: 12/23/2015 - 17:56
Posts: 677
Location: Mars

hmm yeah, i went to the older version and i get the same error… thinking…hmmmm

trailhunter
Offline
Last seen: 4 hours 24 min ago
Joined: 12/23/2015 - 17:56
Posts: 677
Location: Mars

oh the usbasp, do i have to change the jp2 jumper? I have it all the way on the right (right being closest to usb port)

Terry Oregon
Terry Oregon's picture
Online
Last seen: 4 min 10 sec ago
Joined: 10/21/2017 - 17:03
Posts: 486
Location: Beaverton Oregon

Note the jumper location, exactly as I got it from Hank.

My reviews: , My personal collection of lights LINK,  J5 Tactical V1 Pro review LINK,  Thirteen Optical Sensors review LINKZebralight SC700d review LINK,  Ray-O-Vac Super Power Sportsman review LINK,  Convoy S2+ color combos LINK,  How To flash D4V2 LINK.

Terry Oregon
Terry Oregon's picture
Online
Last seen: 4 min 10 sec ago
Joined: 10/21/2017 - 17:03
Posts: 486
Location: Beaverton Oregon

trailhunter;

You're using the flash kit from Hank?

My reviews: , My personal collection of lights LINK,  J5 Tactical V1 Pro review LINK,  Thirteen Optical Sensors review LINKZebralight SC700d review LINK,  Ray-O-Vac Super Power Sportsman review LINK,  Convoy S2+ color combos LINK,  How To flash D4V2 LINK.

trailhunter
Offline
Last seen: 4 hours 24 min ago
Joined: 12/23/2015 - 17:56
Posts: 677
Location: Mars
Terry Oregon wrote:

trailhunter;


Your using the flash kit from Hank?

Nah, I built my own https://imgur.com/a/p2KgwEu

Terry Oregon
Terry Oregon's picture
Online
Last seen: 4 min 10 sec ago
Joined: 10/21/2017 - 17:03
Posts: 486
Location: Beaverton Oregon

 

"Nah, I built my own https://imgur.com/a/p2KgwEu"

 

That shouldn't be a problem, but where did the USBasp board come from?

My reviews: , My personal collection of lights LINK,  J5 Tactical V1 Pro review LINK,  Thirteen Optical Sensors review LINKZebralight SC700d review LINK,  Ray-O-Vac Super Power Sportsman review LINK,  Convoy S2+ color combos LINK,  How To flash D4V2 LINK.

trailhunter
Offline
Last seen: 4 hours 24 min ago
Joined: 12/23/2015 - 17:56
Posts: 677
Location: Mars

Terry Oregon wrote:

 


“Nah, I built my own USBasp board come from?

[/quote]

amazon, ive been using it to flash fw3’s no problem. let me double check all the wiring one more time. im surprised the first check in passing.

trailhunter
Offline
Last seen: 4 hours 24 min ago
Joined: 12/23/2015 - 17:56
Posts: 677
Location: Mars

Terry, I found the problem. So thinking this through and looking at my setup, I noticed that my wire leads may be a bit too long at 3v on the usbasp. So what I did is move the pin from 3v to 5v and guess what? That fixed my issue above. So basically, if you run longer leads, you’ll want to bump the voltage up to compensate for that voltage drop Big Smile

Quote:

C:\Users\user\Desktop>avrdude -p t1634 -c usbasp -Uflash:w:anduril.2019-08-05.emisar-d4v2-219.hex

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0×1e9412
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: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file “anduril.2019-08-05.emisar-d4v2-219.hex”
avrdude: input file anduril.2019-08-05.emisar-d4v2-219.hex auto detected as Intel Hex
avrdude: writing flash (9122 bytes):

Writing | ################################################## | 100% 8.35s

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

Reading | ################################################## | 100% 5.24s

avrdude: verifying …
avrdude: 9122 bytes of flash verified

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

avrdude done. Thank you.

As you can see here, it updated just fine now.

Terry Oregon
Terry Oregon's picture
Online
Last seen: 4 min 10 sec ago
Joined: 10/21/2017 - 17:03
Posts: 486
Location: Beaverton Oregon

Quote:
As you can see here, it updated just fine now

Congrats.

My reviews: , My personal collection of lights LINK,  J5 Tactical V1 Pro review LINK,  Thirteen Optical Sensors review LINKZebralight SC700d review LINK,  Ray-O-Vac Super Power Sportsman review LINK,  Convoy S2+ color combos LINK,  How To flash D4V2 LINK.

Valynor
Offline
Last seen: 2 hours 55 min ago
Joined: 07/13/2019 - 17:13
Posts: 56
Location: Germany

@Terry Oregon  Huge thanks to you for making the instructions for the community. 

 

Everything worked right at the 1st attempt: 

 

avrdude -c usbasp -p t1634 -u -Uflash:w:anduril.2019-08-05.emisar-d4v2.hex

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
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: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: reading input file "anduril.2019-08-05.emisar-d4v2.hex"
avrdude: input file anduril.2019-08-05.emisar-d4v2.hex auto detected as Intel Hex
avrdude: writing flash (9122 bytes):

Writing | ################################################## | 100% 9.20s

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

Reading | ################################################## | 100% 4.86s

avrdude: verifying ...
avrdude: 9122 bytes of flash verified

avrdude done. Thank you.

 

 

I did the reset afterwards (hold 3 seconds when tightening battery cap) and also tried the other way ("13H") for curiosities sake but I found it next to impossible to get the timing right. 

 

azhu
azhu's picture
Offline
Last seen: 12 hours 41 min ago
Joined: 09/24/2015 - 06:48
Posts: 193
Location: Los Angeles, CA

Received my kit yesterday. Reflashed my D4v2 via the Android and OTG method. Couldn’t be easier!

Now what else can I do with this kit? Smile

Need Nichia 219b r9080 Emitters? (。◕‿◕。)

“The Light shines in the darkness, and the darkness did not comprehend it.” John 1:5

Unheard
Offline
Last seen: 11 hours 26 min ago
Joined: 01/16/2019 - 11:38
Posts: 304
Location: Germany

Done.

If I can do it (my old eyes needed a magnifying glass), everyone can. Thanks to TK & Hank for resolving the issue.

Now comes the really difficult part … getting my old preferences back into the light.

brewster
Offline
Last seen: 1 hour 5 min ago
Joined: 07/19/2019 - 23:29
Posts: 24
Location: Australia

Kit arrived yesterday and update done to my D4V2 the same day from MacOS. As other oldies have noted, the hardest part is seeing close up to ensure the tiny pins are in place on the pads.

It might help to have a second via cut in the board to position the pins better. That could be done in future without affecting backwards compatability.

The quick reset now in Anduril is great, too. The reset cleaned up a small issue seen after flashing a Q8, where I presume some old configuration data wasn’t cleaned out by flashing.

Thanks to Hank and TK for sorting this – and incidentally for the great leap forward in firmware flashing.

middle age man
Offline
Last seen: 27 min 38 sec ago
Joined: 03/26/2019 - 18:38
Posts: 86

I flashed my two D4v2s this morning without problem; the pogos neutralized my tremor. Thanks Terry for your clear instructions. Thanks TK and Hank for addressing the problem promptly and efficiently.

Pages