this post was submitted on 12 Aug 2023
24 points (96.2% liked)
flashlight
2944 readers
5 users here now
Portable illumination
Rules:
- Be excellent to each other
- Don't be the reason we need to make more rules
Related:
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Were you able to update the firmware?
thanks for following up ;-)
No, I do not yet know the correct command line syntax
I would welcome any help.. here is the backstory:
I bought Hank’s programmer and am trying to learn how to ping the D2…
I dont have an Android phone, and cannot use avrdude on my iMac. I use pymcuprog and issue commands through Terminal in my iMac, to reflash Anduril on my Wurkkos TS10 successfuly.
when I use the gchart programmers for my TS10, I use this command line, that works very well:
pymcuprog ping -t uart -u /dev/tty.wchusbserial1430 -d attiny1616
Im trying to figure out what command line to use for the Emisar D2? I think it uses a 1634 chip? I believe I need this info to edit the command line where it says attiny1616. Is that true, or does the D2 use attiny1616?
when I plug the Hank programmer into my iMac, with the pogo pins connected to the head of my D2, and I run this command in Terminal:
** ls /dev/{tty,cu}.***
the response is
** tty.Bluetooth-Incoming-Port**
I believe I need that info to tell pymcuprog to use the Hank programmer..
so I took a couple of guesses and modified the command line to ping the D2 like this:
pymcuprog ping -t uart -u /dev/tty.Bluetooth-Incoming-Port -d attiny1634
but that command line does not work in Terminal (yet), I get this response in Terminal:
Unable to setup stack for device attiny1634 Currently supported devices (in ‘devices’ folder): atmega1608, atmega1609, atmega3208, atmega3209, atmega328p, atmega4808, atmega4809, atmega808, atmega809, atsamd21e18a, atsamd21g18a, attiny1604, attiny1606, attiny1607, attiny1614, attiny1616, attiny1617, attiny1624, attiny1626, attiny1627, attiny202, attiny204, attiny212, attiny214, attiny3216, attiny3217, attiny3224, attiny3226, attiny3227, attiny402, attiny404, attiny406, attiny412, attiny414, attiny416, attiny417, attiny424, attiny426, attiny427, attiny804, attiny806, attiny807, attiny814, attiny816, attiny817, attiny824, attiny826, attiny827, attiny84a, avr128da28, avr128da32, avr128da48, avr128da64, avr128db28, avr128db32, avr128db48, avr128db64, avr16dd14, avr16dd20, avr16dd28, avr16dd32, avr16ea28, avr16ea32, avr16ea48, avr32da28, avr32da32, avr32da48, avr32db28, avr32db32, avr32db48, avr32dd14, avr32dd20, avr32dd28, avr32dd32, avr32ea28, avr32ea32, avr32ea48, avr64da28, avr64da32, avr64da48, avr64da64, avr64db28, avr64db32, avr64db48, avr64db64, avr64dd14, avr64dd20, avr64dd28, avr64dd32, avr64ea28, avr64ea32, avr64ea48, avr8ea28, avr8ea32, pic16f15244, pic16f15276, pic16f15376, pic16f17146, pic16f1768, pic16f1769, pic16f1779, pic16f18146, pic16f18446, pic16f18456, pic16lf18456, pic18f16q40, pic18f16q41, pic18f47k40, pic18f47k42, pic18f47q10, pic18f47q43, pic18f57q43, pic18f57q84, pic24fj128ga705, pic24fj64gu205, uc3a3256
(apparently my pymcuprog install does not include attiny1634)
Do you have any suggestions what the correct command line would be, to ping my Emisar D2?
Once I get that sorted, I will have the Option to also reflash to newer firmware, but that is not my priority. I just want to backup my existing firmware with my eeprom settings.
I dont really want to update to newer D2 firmware, that uses 3C for channel switching. I can switch channels on my D2 using 3H, and I like it that way.
It means I dont have to relearn a different command for my D2, when I want to switch from smooth to stepped ramping. This keeps 3C consistent with my other Anduril lights.
I don't have a D2, but I assume that it uses a T1634 just like a D4V2. I believe that pymcuprog is for UDPI programmers, and your Hank programmer is USBasp which requires avrdude for programming. I realize that this post is for Windows, but it covers command-line usage of avrdude. It might help. I'm kind of shocked that I don't already have this documented somewhere, but I've been using zFlasher on Android for quite a while. It can handle UDPI and USBasp programmers.
As a side note, I believe that Hank uses a custom version of Anduril 2 for his lights. For example, I think that he exposes more of the "advanced" features in the Simple UI than ToyKeeper does. Of course, that's the beauty of open-source software. You can customize it. In any case, my point is that you can keep current with Anduril 2 while also customizing it for your preferences if you're willing to learn to modify the code. I've gotten to the point where I just stick with stock Anduril 2 in most cases.
thanks for the education, that is very helpful
Im technologically challenged atm.. my iMac wont run avrdude, and I dont have an android phone to run zflasher
the apps needed to do that, dont run on my iMac, and Im not motivated to modify code
I feel the same way… unless there is a hex file available that offers a feature I value, for example, I reflash the SC21 Pro, to add the lower lows available in later firmware
but I have not heard of a reason to reflash my D2.. the stock firmware works fine for me, so far
much appreciate your help understanding my options, and limitations
enjoy your weekend ;-)
It looks like you can install avrdude on a Mac via Mac Ports.
That worked! thanks ;-)
no clue yet what command line to use to save a backup of my D2 hex file.. suggestions welcome
this is the 3rd time Ive tried to reply.. lemmy keeps losing my posts.. hmmm
As a D2 owner, to confirm a couple of things: My D2 originally shipped with Anduril version number
2021-12-13-0135
as well. Model number0135
was originally namedemisar-d4sv2-tintramp
, and is now namedemisar-2ch
, cf. https://toykeeper.net/torches/fsm/anduril2/MODELS. Over there, it is also specified asattiny1634
.Scrolling down https://toykeeper.net/torches/fsm/anduril2/, you will find the latest
emisar-2ch
version at the bottom, currently indeedanduril.2023-08-07.emisar-2ch.hex
. Over there, you will also still findanduril.2021-12-13.emisar-d4sv2-tintramp.hex
.For instructions specifically for backing up, cf. for example https://anduril.click/flashing/avrdude.html#backing-up.
Usually, I am using ZFlasher AVR via mobile phone (Android), which is very straightforward, but I just checked with avrdude (on Linux), and I had no difficulties with pinging the device, backing up, and updating, while using the instructions over at https://anduril.click/flashing/avrdude.html.
Finally, cf. https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/multi-channel/view/head:/ToyKeeper/spaghetti-monster/anduril/hank-cfg.h to see which modifications Hank lights have from stock Anduril 2. Recently, a couple of functions were allowed in Simple UI, namely ramping toggle as well as aux config and strobe modes.
SOLVED!
Thank you very much!
I was able to successfully ping and backup eeprom and hex file from my D2 with the following commands:
ping:
avrdude -p t1634 -c usbasp -n
backup eeprom:
avrdude -p t1634 -c usbasp -U eeprom:r:desktop/D2eeprom-backup.hex:i
backup D2 stock hex:
avrdude -p t1634 -c usbasp -U flash:r:desktop/oldD2-firmware.hex:i
Thanks!
Great! Those commands are looking just fine. Good to hear that you got this sorted.
Super grateful! Enjoy your weekend ;-)
That's an awesome reference website! Thanks for sharing.
Sure thing!