Emisar D2 first impressions

I just received this D2, my first regulated Anduril light. Im really happy with it. It has NO PWM… yay! :heart_eyes: :+1: :+1:
Imgur

I also bought the flashing adapter, have not figured out how to use it yet… atm the stock firmware is 2021 12 13 0135

Opple 3 flicker test on lowest mode of 0.2 lumens:
Imgur

and at 59.2 lumens
Imgur

a pic of all the personal settings I changed: (flowchart is for a later firmware version, that I have not installed yet, main difference is channel switching uses 3H instead of 3C)
Imgur

album with more pics:

6 Thanks

Nice, Jon. Looking forward to a full review sometime in the future.

I have so many “L” flashlights that I’ve not been able to convince myself to get one of these yet. My latest from Hank is the Noctigon DM1.12. And I absolutely love it. So cool having very distinct independent throw and flood capabilities in one flashlight that actually does both well.

1 Thank

that looks like a really cool Dual Channel light too, congrats

the D2 is my first Hank light, I was really impressed with the ordering process and fast delivery. Tremendous value for a custom light.

also my first regulated Anduril light… really happy about that feature set

My only right angle headlamp so far is a Sofirn HS10. Easy to mod, but high parasitic drain, requires physical lockout

The D2 has Much lower standby drain rate (avoiding bright aux), than the HS10, and better output regulation than a Zebra, so I just ordered the Spicy3D D2 headband for my D2.

2 Thanks

Nice one for a 1st choice Hank light. The D2 is very unusual. Did you get the RGB switch LED? What 2 emitters did you choose? There’s so many ways to go. I think I might go with 519A 5700k dedomed for spill and W1 for throw. The W1 provides a terrific pencil beam throw, while being more efficient than W2 and SFT-40.

My first one was the Emisar D1 in cyan. I kind of wish I’d gotten serious about buying one 4 months later, as the D1K came finally came out (21700 vs. 18650). The SFT-40 is a terrific thrower LED and the D1 reflector provides some decent spill for it. Anyway, it’s a fun small form factor thrower.

No, I did not know that was an option. The side aux are RGB though…

take a look at this Album, Ive added comments to describe the LEDs and optics I chose.

I think a W1 could be fun, never tried one… I agree a Dedomed 5700K 519a is also a great option.

1 Thank

Modified Emisar D2 to work with USB rechargeable Lumintop 14500 button top.

O ring under tailcap almost completely hidden:
Imgur

USB battery means no need to carry a separate charger when traveling w a D2:
Imgur

3 Thanks

Another milestone, for me, I have succeeded in installing avrdude on my 2015 iMac that runs OSX Sierra

and have learned the correct syntax to create a backup of the D2 hex file and eeprom.

I followed, and modified command line instructions from here.

Using the programmer I bought from Hank,
Imgur
I tested the ping and backup commands and they work!

ping:

avrdude -p t1634 -c usbasp -n

backup eeprom:

avrdude -p t1634 -c usbasp -U eeprom:r:desktop/eeprom-backup.hex:i

backup D2 stock hex:

avrdude -p t1634 -c usbasp -U flash:r:desktop/oldD2-firmware.hex:i

write new firmware:

avrdude -p t1634 -c usbasp -U flash:w:desktop/anduril.2023-08-07.emisar-2ch.hex

figured out the syntax to save the backup file to Desktop… a small step for mankind, a giant step for me… lol

3 Thanks

I wonder if it’s possible to rename the executable to something simpler, like a 2 letter name (e.g. avrdude → ad), to simplify typing out commands.

I dont type into terminal,

I save the command line sequence to a text file.

when I need to reflash

I copy the command line sequence from the text file, and paste it into terminal…

1 Thank

Ah, that makes sense. Thanks.

1 Thank

Achievement unlocked: You learned how to Unix!

But seriously, you just explained a bunch of core unix commands…

  • list files: ls
  • change directory: cd
  • copy: cp
  • move: mv
  • remove: rm
  • start a shell: sh
  • switch user / superuser: su
  • edit a file: ed
  • visually edit a file: vi
  • get a word count: wc
  • archive files: ar
  • run a command at a certain time: at
  • put a task into the background or foreground: bg / fg
  • how much disk is free? df
  • how much disk am I using? du
  • what processes are running? ps
  • show my identity info: id
  • C compiler: cc

… and so on.

If you want any custom abbreviations, those are easy. Just drop something like alias ad=avrdude into your shell config. I think the default place for that is ~/.bashrc.

Why .bashrc? Because “bash” is the default shell on most systems, and “rc” is the runtime config. And traditionally, config files start with a dot and are called “dotfiles”. Oh, and ~ is shorthand for “my home directory”.

Why bash? Because the original default shell, sh, was made by a guy named Bourne. So it’s called the Bourne shell. But it was eventually replaced by a more powerful rewrite, called the “Bourne Again Shell”… or “bash” for short. Unix people like funny names.

Also because it makes the “shebang” line sound more like a 1960s Batman fight scene. The first line of most scripts is the “shebang”, which tells the system where to find an interpreter for the script. For bash, that line looks like:

#!/bin/bash

… which is pronounced: Hash Bang Slash Bin Slash Bash!

It’s called a shebang because it starts with “hash bang”.

That’s a great way to remember things like this. And you’ve already done most of the work for making a script. Set the executable bit on the file, and then it should be able to run without having to copy/paste. I don’t know how to do that in a GUI though… I just use commands for that sort of thing. Like, save the commands you want to run to ~/bin/af (for Anduril Flash) and then, in a terminal:

chmod +x bin/af

Now you have an “af” command to flash Anduril. The “chmod” tells it to change the mode, “+x” tells it to add the executable flag, and the “bin/af” tells it which file to change. Putting the file in ~/bin/ puts it into your personal search path. Anything in there becomes part of your shell’s vocabulary, basically… so you can put all sorts of verbs in there for commands you want to remember and run again.

You could also make an “ab” script to go with “af” – Anduril Build, and Anduril Flash.

ab:

cd ~/src/flashlight-firmware/ToyKeeper/spaghetti-monster/anduril/
./build.sh emisar-2ch

af:

cd ~/src/flashlight-firmware/ToyKeeper/spaghetti-monster/anduril/
avrdude -p t1634 -c usbasp -U flash:w:anduril.emisar-2ch.hex

Something like that, anyway. It’s also recommended to add a little more info, to make it explicit what script language it’s written in and add notes for human use. So it might be more like this in practice:

~/bin/ab:

#!/bin/sh
# ab: Anduril Build script

# exit if any errors happen
set -e

# go to where the source code is
cd ~/src/flashlight-firmware/ToyKeeper/spaghetti-monster/anduril/

# build the versions I have hardware for
./build.sh emisar-2ch
./build.sh ts10

As for “bin”, that name also exists mostly for historical reasons. Programs are traditionally written in source code and then compiled to “binaries”, so “bin” was used as the place to store binaries. It’s where the shell looks for commands to run. But scripts can go there too.

… and scripts can be literally anything. Make up your own custom vocabulary if you want, and then talk to your computer in that language. The whole thing is designed to make it easy for people to customize and automate anything they need, and reduce the amount of typing necessary.

Or to just play with. That’s pretty straightforward too. Like, here’s a session showing a tiny script I made a long time ago…

> Do the Hokey Pokey!
Okay, I did the Hokey Pokey!

> Do it faster!
Okay, I did it faster!

> Do it right this time.
Okay, I did it right this time.

> which Do
/home/selene/bin/Do

> cat $(which Do)
#!/bin/sh
echo "Okay, I did $*"

> _

It’s a simple 1-line script. It just prints out the parameters you pass to it (the $* part), but it puts an “Okay I did” in front.

Because you never know when you might need to tell your computer to Do six impossible things before breakfast.

Or, like, flash new firmware without typing a long command again.

2 Thanks

As an aside to that aside, you now know more Unix than like 95% of the population. Go, you!

Most of it is literally just a bunch of verbs that you pass nouns to. It’s all “verb noun noun noun” commands.

… and that’s how most other stuff in computing works too. They mostly just have different verbs, and different nouns, and different punctuation. Sometimes different ordering too.

  • sh: verb noun noun
  • Assembly: verb noun, noun
  • Python: verb(noun, noun)
  • C: verb(noun, noun);
  • COBOL: VERB noun noun.
  • PHP: verb($noun, $noun);
  • Java: noun.verb(noun);
  • Lisp: (verb noun noun)
  • Forth: noun noun verb
  • Perl: $@#~=/^!*&>%!</;

Okay, that may be a bit unfair to Perl. But still, the following is an actual Perl program which is not only valid, but even won an award:

#  ^ 
#,_:@ 
BEGIN{$l="ub";$_='KN($){$d=$_[0]}KL(){$B[$R][$C]}KM{$a=@{$B[$R]};
$d==0&&($C++,$C>=$a&&($C=0));$d==2&&($C||($C=$a),$C--);
$d==3&&($R++,$R>=@B&&($R=0));$d==1&&($R||($R=@B),$R--);}
KP($){push@S,shift}KJ(){pop@S||0}KX(){@S[-1,-2]=@S[-2,-1]}KR() 
{push@S,$S[-1]}KW($$){"Z".$_[0]."Z,K{".$_[1]."},"}KG($){($_)=($a)=@_;
y/\`/>/;W$a," X;P(J$_ J)"}KD($){($a)=@_;W$a,ZP Z.$a}KE($){($_)=($a)
=@_;y/0123/>^<v/;W $_,"N $a"}';y/Z/\'/;s/K/s$l /g;my($R,$C,@S);
eval$_;}$_=$x=W '_','N(J?2:0)';y/_02/|31/;$x.=$_ 
#r^>\"J eg"1+T,,,,l# 
; $u=W '"','@T[0,1]=@T[1,0]';$_=$x.$u.W('!','P!J').W('?','P int 
rand(4)').W(':','R').W('\\\\','X').W("\$",'J').W(' ',"").W('#','M')
.W('.',"pIJ,chr(32)").W(',',"pIchr J").W('@',"pI'\n';exit").W('g','X 
;P ord$B[J][J]').W('p','X;$a=\\$B[J][J];$$a =chr J;');s/I/rint /g;@T=eval 
join"\n",'({',(map{D$_}(0..9)),(map{E$_}(0..3)) 
,(map{G$_}split//,'+-*%/`'),$_,'},{',$u,'})';for(@B=<>){$_= 
[split/\n*/]}while(1){$_=L;$_=" "if!defined$_;~y/\s/ /;exists$T[0]{$_}?$T[0]
{$_}->():P ord$_;M;} 

Meanwhile, here’s that same program in Bourne shell: echo "The Perl Journal"

2 Thanks

LOL! you Go, Wonder Woman!
fwiw, theres no GUI in my avrdude, its all text in Terminal…

If theres an avrdude GUI for me to use on my 2015 iMac running Sierra OSX, please tell me where it is :wink:

as far as executing a script, no clue here… but no worries… my Hank firmware is working great!

My only reason for learning to reflash, was so I can reload my eeprom preferences if I ever need to do a factory reset to my D2,

or if I want to load my saved settings to another D2… like, if Hank ever makes one in Titanium! :wink:

I think this is the part @ToyKeeper was referring to (rather than a GUI for avrdude), this command makes the change via terminal but you can’t do so from (e.g.) the default GUI MacOS file browser.

Not recommending this specifically, but it might be possible for some enterprising developer to write a program in Python to call out to avrdude (such as this old project for example: GitHub - killian441/avr_multiloader: Python wrapper for uploading hex files to multiple avr devices). Python is known for good interoperability with C and that would open the door to building a GUI using Python’s rich ecosystem.

Terminal is good too though!

Loving my new Spicy3d headlamp holder for the D2! Highly recommended. :+1:

Imgur

really handy for my home repair tasks

1 Thank

Ah, you are too kind, ToyKeeper. Thank you!

I am begrudgingly admitting that… I used to work on a Sun SPARCstation 2. And yeah, I was slinging Unix commands back then. Man pages was my friend. I’d crafted all sorts of custom shortcut documents and printed them out, laminated, then taped to the side of my monitor for quick reference. I have forgotten so much, but much of it started bubbling back when I saw your commands list.

Alias! Yes. So handy.

I had known of the Bash editor/shell, but I was woefully ignorant on how it got the name. Bourne Again Shell? Brilliant! It’s too bad Jason Bourne didn’t have a scene where you see him typing Linux on a computer.

I had installed Mint, a flavor of Linux (as you know) some time back on an old computer, fiddled with it, but then got busy with other things and let that project go.

Do you know of a Linux emulator that can run concurrently in a Windows 11 Pro instance? If so, I’d be up for installing that. Or, I might just go the virtual machine route. I think that would be easier than dual boot.

Cheers,
~Gary

I have no experience with it, but from what I’ve read the Windows Subsystem for Linux (WSL) is very well done and easy to use, and officially integrated and supported to boot (pun not intended).

2 Thanks

I used to program in Fortran, VS COBOL II, C++, JavaScript, and a little Java. But the last 3 were more for my own amusement, not for work.

I loved programming. I hated dealing with other people’s spaghetti code! So many people were churning out such trash code. And program managers I dealt with were aware, but so overburdened with tight deadlines. I had just ONE dev manager who actually had code review sessions. I was in SQA at the time and wow, it really made a difference. Less buggy code, for sure. It was a wise investment that the VP of dev didn’t care about very much, so it didn’t last in the long run.

1 Thank

Hah, fantastic sb. I ended up with Windows 11 Pro by chance. I’d bought a lightly used ZBook and it happened to come with 11 Pro. So cool to know there’s a Linux (WSL) subsystem in there, waiting to be utilized. Did I get that right? Or is it the reverse? Windows 11 Pro supported on Linux?

1 Thank

I guess it has to be installed with a simple command, but yeah, still basically an official Windows component.

2 Thanks