Anduril 2 feature change suggestions

Thank you to everyone who’s pitched in, I’ll see if I can get this cracked this weekend. If the Pi won’t oblige I can fall back on the Ubuntu VM.

2 Thanks

fwiw, these are all the eeprom options changes I made to my D3AA:


Im not asking for firmware that changes those eeprom options settings that I can change

the only Anduril hex changes Im asking for, are things for which there are no user options:

  1. eliminate 5C momentary
  2. eliminate blinks at top of ramp
  3. eliminate 2 decimal voltage

ps, I just tried to backup my D3AA and this script does not work:

pymcuprog read -m all -f ~/Desktop/D3AA.hex -t uart -u /dev/tty.wchusbserial1430 -d AVR32DD20

even though that script does work for my TS10, with two changes (in bold):

pymcuprog read -f ~/Desktop/ts10.hex -t uart -u /dev/tty.wchusbserial1430 -d attiny1616

any help with the command line would be welcome

Right, I’ve compiled and tested a D3AA hex with the following:

  • no 5c momentary
  • no blink at top of ramp
  • no two decimal voltage
  • power-off voltage check seconds set to 0

@jon_slider how do I get this to you?

2 Thanks

you can upload .hex to the forum like you would a picture

2 Thanks

EDIT: Too late, @Chris100575 already did his work…

Leaving here for posterity.


Quite a few of your desired settings can be put as the default value in a custom hex if one is being built anyway.

Various default settings can be found in ui/anduril/config-default.h in the code repository - here.

For example, see:

  • RAMP_STYLE to set the default ramping style (smooth or stepped)
  • DEFAULT_2C_STYLE for configuring turbo style,
  • DEFAULT_SMOOTH_STEPS_STYLE for setting the smooth steps on or off by default
  • etc.

The comments in the file describe what’s what pretty well. If you want to change one, it can be overridden in your custom anduril.h.

Other values from the light’s anduril.h can also be changed to achieve your custom settings, e.g.

  • RAMP_SMOOTH_FLOOR and RAMP_SMOOTH_CEIL for smooth ramping
  • RAMP_DISCRETE_FLOOR, RAMP_DISCRETE_CEIL and RAMP_DISCRETE_STEPS for stepped ramping
  • INDICATOR_LED_DEFAULT_MODE for the default AUX LED level
  • etc.
3 Thanks

Custom D3AA hex

anduril.hank-emisar-d3aa.hex (30.8 KB)

1 Thank

Thank you, I’m just starting out with this so this is useful stuff!

1 Thank

If you have an Android phone, then I’d highly recommend you use the ZFLasher AVR app instead of the CLI on your PC. It makes the process so much easier.

1 Thank

…then studying config-default.h and a few different lights’ anduril.h will get you a very long way :smiley:

2 Thanks

thank you, downloaded and saved until I figure out how to load it…

I do not have the skills to compile hex files for myself, and atm I also am unable to backup the firmware in my D3AA

I dont have an android

I only have command line pymcuprog and its not working, not sure why…

1 Thank

I’ve only used avrdude.

1 Thank

GUI on Android, (no android here)

or command line, in which case may I see the commands you use? Im trying to debug why my pymcuprog commands dont work atm… I do have command line avrdude loaded… though I prefer pymcuprog…

Avrdudess is a GUI for Averdude. It works great for me from a PC. Quite simple to use and lightweight. Doesn’t even require installation. Put the directory on a thumb drive and it is portable. There are limitations for backing up and flashing options, but if all you want to do is flash new firmware to your light, it works fine. May be worth a try.

I like it much better than using a phone app.

did you replace attiny1616 with avr32dd20 in the command ?

ls -la /dev/tty.usbserial* (lists usb serial adaptors)

avrdude -p avr32dd20 -c serialupdi -P /dev/tty.usbserial-110 -n (tests connection)

avrdude -p avr32dd20 -c serialupdi -P /dev/tty.usbserial-110 -u -Uflash:w:[path to hex file] (flashes)

Note that you will likely need to change the number at the end of tty.usbserial-110 to match the one listed.

1 Thank

thanks, have not tried… I do want to be able to backup

btw new issue w my D3AA, preflash…

when I turn on the light at the memorized level of 10 lumens, there is a bright preflash.

I changed the jump start setting to 1, but it made no difference

wondering whether it is possible to control in a custom hex… the eeprom setting to use a low jump start does not work

You can backup and it is exactly the same as using Avrdude. It is simply a front end for Avrdude that has canned command line options behind a GUI.

It just requires that you save the flash and eeprom values separately.

If you just want to get the modified firmware on to you light, it should do it.

yes I modified the script I use for my TS10, which does work to backup and to load hex files:

pymcuprog read -m all -f ~/Desktop/ts10.hex -t uart -u /dev/tty.wchusbserial1430 -d attiny1616

I tried to backup my D3AA with this script:

pymcuprog read -m all -f ~/Desktop/D3AA.hex -t uart -u /dev/tty.wchusbserial1430 -d avr32dd20

but it does not work… I get a long series of comments from the Terminal window:

Jonathans-iMac:~ jonathan$ pymcuprog read -m all -f ~/Desktop/D3AA.hex -t uart -u /dev/tty.wchusbserial1430 -d avr32dd20
pymcuprog.serialupdi.link - WARNING - Check failed
pymcuprog.serialupdi.link - WARNING - Check failed
Traceback (most recent call last):
File “/Library/Frameworks/Python.framework/Versions/3.10/bin/pymcuprog”, line 8, in
sys.exit(main())
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pymcuprog/pymcuprog.py”, line 285, in main
return pymcuprog_main.pymcuprog(arguments)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pymcuprog/pymcuprog_main.py”, line 80, in pymcuprog
status = _start_session(backend, device_selected, args)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pymcuprog/pymcuprog_main.py”, line 549, in _start_session
backend.start_session(sessionconfig)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pymcuprog/backend.py”, line 363, in start_session
self.programmer.setup_device(
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pymcuprog/programmer.py”, line 78, in setup_device
self.device_model = get_nvm_access_provider(self.transport,
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pymcuprog/nvm.py”, line 42, in get_nvm_access_provider
accessprovider = NvmAccessProviderSerial(transport, device_info, baud=frequency, options=options)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pymcuprog/nvmserialupdi.py”, line 51, in init
self.avr = UpdiApplication(port, baud, self.dut)
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pymcuprog/serialupdi/application.py”, line 81, in init
datalink.init_datalink()
File “/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pymcuprog/serialupdi/link.py”, line 45, in init_datalink
raise PymcuprogError(“UPDI initialisation failed”)
pymcuprog.pymcuprog_errors.PymcuprogError: UPDI initialisation failed
Jonathans-iMac:~ jonathan$

Forgive me if you’ve spotted this, but I’ve never used pymcuprog. I did notice though that your first command starts pymcuprog read -f, and the second one that doesn’t work starts pymcuprog read -m all -f.

Does the second command work if you amend the syntax to match the first one?

oops… I mispasted the first (TS10) command, omitting the
-m all
but it is required
I just backed up my TS10 using this command line:

pymcuprog read -m all -f ~/Desktop/ts10.hex -t uart -u /dev/tty.wchusbserial1430 -d attiny1616
and it does work

I really appreciate you taking the time

since you mentioned avrdude, I tried that too
this is the script I use for my emisar D2 (to backup just the eeprom):

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

I tried that for the D3AA after changing the chip name and programmer name (but it is not working… error says the programmer cant be found):

avrdude -p avr32dd20 -c /dev/tty.wchusbserial1430 -U eeprom:r:desktop/D3aaeeprom-backup.hex:i

do you see anything wrong about how the programmer port is being called? (the usbasp is a programmer from Hank, for my D2, with 6 pins)

I use an early gchart 3 pin programmer for my TS10, and for the attempts with the D3AA. Maybe the programmer I use for TS10 is not compatible with D3AA? Maybe I should order a new 3 pin programmer?

can you share the syntax you use for writing new firmware to your D3AA in avrdude? (if you use command line interface). And for backing up the eeprom?