Flashlight Firmware Repository

2320 posts / 0 new
Last post
Getkong
Offline
Last seen: 7 hours 34 min ago
Joined: 09/01/2020 - 22:50
Posts: 7

I have a fork of Anduril 2 with a simple bash script i wrote to make it easy to flash emisar/noctigon lights.

I tried to do feature changes in Pull Requests, so if you only want specific changes, you can look through those to find what to change.

I also have the open source anduril 2 hex files for easy flashing.
https://github.com/mkong1/anduril

Wieselflinkpro
Wieselflinkpro's picture
Offline
Last seen: 2 weeks 3 days ago
Joined: 05/21/2015 - 04:34
Posts: 980
Location: Germany - TLF

Hello,

can someone help me?
I have an older (2 years) anduril hex file from Lexel for his Skilhunt H03 or Utorch C8F driver. I wanted to flash it to a Nangj 105c with Attiny 85 and tripple Channel Setup.
Can someone say me the pinout of this Anduril from Lexel? Is it dual channel or trippel channel? On which pin can I connect which output.
For test I have already disconnected the AMCs of the 105c on pin 6.
I have made several test but the flashlight works very unnormal, sometimes dark, sometimes with wrong order of channels.

Second Question:
Whats an easy driver mod? Using a A17DD (Astrolux S41) Driver, flashing Narsil and put the switch on the place of the OTC?

Here you can the the Corui D01 with SBT90.2, I am working on: https://www.taschenlampen-forum.de/threads/courui-d01-big-head-thrower.4...

Tom E
Tom E's picture
Offline
Last seen: 9 hours 22 min ago
Joined: 08/19/2012 - 08:23
Posts: 14626
Location: LI NY

A Nangj 105c w/85 and triple channels? Really? A 105c is a ATTiny13a single channel, so how was this accomplished?

You have to go apples-apples: the .HEX file must match the exact pinout configuration of the driver, for one thing. There are a few possible I/O pin assignments for triples - I've probably configured them all, even modded Anduril and Anduril2 to support them. So we need far more details.

You got 5 I/O pins available:

  • pin #2 - usually switch
  • pin #3 - usually the aux/switch LED but also can be a FET channel
  • pin #5 - can be the single 7135 or bank
  • pin #6 - can be the single 7135 or bank
  • pin #7 - can be the voltage divider, or aux/switch LED, or a channel

What I/O pin config was the .HEX file built for, and what is the I/O pin config of the modded Nangj?

 

The A17DD with the ATtiny25 cannot run Narsil - you need a 85, plus another mod of adding the 4.7 ohm resistor on V+ input, least that's the mod I would do.

Wieselflinkpro
Wieselflinkpro's picture
Offline
Last seen: 2 weeks 3 days ago
Joined: 05/21/2015 - 04:34
Posts: 980
Location: Germany - TLF

Thank you for answering.

Tom E wrote:

A Nangj 105c w/85 and triple channels? Really? A 105c is a ATTiny13a single channel, so how was this accomplished?


I used a 3535 MCPCB for the FET and the single 7135.

Tom E wrote:

What I/O pin config was the .HEX file built for, and what is the I/O pin config of the modded Nangj?


I dont Know. I am not able to build Anduril Hex files. For easy drivers I did it with STAR_momentary.
Lexel is cast away and does not answer. He built the Hex-File for his drivers (C8F or Skilhunt H03).
Thats the Problem.

For the 105c, I probably have to change some resistors too. But Pin #7 is the voltage divider on the 105c. But Lexels driver has 4 Outputs, the 3 channels and the switch-LED. I know this, because my C8F blinks out the channel with one, two or three blinks, after setting a brightness.
The 105c is not modded yet, I only connected the stars to the switch and new channels (FET and 7135). And I disconnedted the 7135 bank on pin #6 to test this pin with the FET.

Tom E
Tom E's picture
Offline
Last seen: 9 hours 22 min ago
Joined: 08/19/2012 - 08:23
Posts: 14626
Location: LI NY

Ok, think I mis-understood. I'm not familiar with his C8F and H03 drivers. I would convert to a simple FET+1 and use a D4 .hex file. I think the std FET+1 is the 7135 on Pin #5 and FET on pin #6. Don't need the voltage dividers because Anduril uses the internal method, usually that is.

jon_slider
jon_slider's picture
Offline
Last seen: 6 hours 2 min ago
Joined: 09/08/2015 - 12:20
Posts: 4950
Location: Central North America

I have a FWAA and have a couple of changes I would like to make to the default UI configurations.

for example
1. Turn OFF the double blink in the ramp

2. make 1H ramp up, AND down consistently (it already does that, but only for 2 seconds, after that 1H goes UP again).

3. I do not want to use 2H to ramp down, as that is the command for Turbo from Off.. I want consistency so 2H also gives Turbo from On

where do I find the FWAA file, so I can learn where to make those changes?

d_t_a
Offline
Last seen: 23 hours 43 min ago
Joined: 08/04/2017 - 23:58
Posts: 2519
Location: Manila, Philippines

jon_slider wrote:
I have a FWAA and have a couple of changes I would like to make to the default UI configurations.

for example
1. Turn OFF the double blink in the ramp

2. make 1H ramp up, AND down consistently (it already does that, but only for 2 seconds, after that 1H goes UP again).

3. I do not want to use 2H to ramp down, as that is the command for Turbo from Off.. I want consistency so 2H also gives Turbo from On

where do I find the FWAA file, so I can learn where to make those changes?

I’m not really well-versed in the Anduril programming files, but based on the version check for the FWAA (I got the Nichia 219C and SST20 versions only; I’m unable to chance upon the always-out-of-stock XP-G3 version of FWAA) — the Anduril 2 version check will blink out firmware version 2020-09-27 model code ‘312’, which when cross-referencing to the “MODELS” file in Toykeeper’s Anduril 2 repository, this is the “FW3A-219” variant of Anduril 2.

I suppose that means going to the Anduril program code repository, and find the configuration file for “FW3A-219” and maybe tweak that? (sorry, I’m also unfamiliar with these code, I’ve not tried to compile .hex files yet…)

jon_slider
jon_slider's picture
Offline
Last seen: 6 hours 2 min ago
Joined: 09/08/2015 - 12:20
Posts: 4950
Location: Central North America

d_t_a wrote:
FW3A-219

very helpful, thanks!

so I find the file here

None of the features I want to change are on that page, so, now what? Grad

Tom E
Tom E's picture
Offline
Last seen: 9 hours 22 min ago
Joined: 08/19/2012 - 08:23
Posts: 14626
Location: LI NY

jon_slider wrote:
I have a FWAA and have a couple of changes I would like to make to the default UI configurations. for example 1. Turn OFF the double blink in the ramp 2. make 1H ramp up, AND down consistently (it already does that, but only for 2 seconds, after that 1H goes UP again). 3. I do not want to use 2H to ramp down, as that is the command for Turbo from Off.. I want consistency so 2H also gives Turbo from On where do I find the FWAA file, so I can learn where to make those changes?

I could probably do all this, but not enough spare time unfortunately, and to do it right, it should all be at least configurable at compile time, UI config settings preferred. Then it should be updated in a master repository which I'm still not familiar enough with the rep tools TK uses, but other BLF members are.

These changes though all sound good to me. 1. is already configurable, and 2./3. are actually the same software change.

Not sure how familiar you are with re-building Anduril but all the latest source can be found publicly posted. I've been using Gabe's (gchart) latest as the master. Links for TK's latest is in the OP in TK's sig.

thefreeman
thefreeman's picture
Online
Last seen: 4 min 43 sec ago
Joined: 01/06/2020 - 09:56
Posts: 769
Location: France

If it did blink the FW3A-219 model number it’s because they put its model number by mistake in their cfg-fwaa.h, as mentioned in pm the FWAA IFAIK has only 2 PWM channels (FET+1) instead of 3 for the FW3A, and the former doesn’t have the 66% FET limit of the FW3A-219.
so you would use a FET+1 cfg as model, like the D4 one for example.

Aside from that, I believe point 2. and 3. would require changes in Anduril code, not just cfg.

jon_slider
jon_slider's picture
Offline
Last seen: 6 hours 2 min ago
Joined: 09/08/2015 - 12:20
Posts: 4950
Location: Central North America

Tom E wrote:
1. (Turn OFF the double blink in the ramp) is already configurable

configurable, as in, I have a menu option in my FWAA that I can change?

or as in, something needs to be edited and reflashed?

thefreeman wrote:
I believe point 2. and 3. would require changes in Anduril code, not just cfg.

thanks.. I honestly do not know what hardware the FWAA uses, nor how many 7135..

where do I see Anduril code?

I have no experience, and most of what you say is outside my comprehension.. I can follow directions, but have none of the hardwared needed to connect to a FWAA for reflash..

so forgive if Im not qualified to have an intelligent conversation. I feel like I just walked into a University level Class, and have not met the prerequisites. So if you decide its all too complicated to explain, I will not be offended that you dont have time to hold my hand and walk me through the entire process.

I can live with my FWAA the way it is.. not perfect, but parts of it are excellent Wink

thefreeman
thefreeman's picture
Online
Last seen: 4 min 43 sec ago
Joined: 01/06/2020 - 09:56
Posts: 769
Location: France

jon_slider wrote:
Tom E wrote:
1. (Turn OFF the double blink in the ramp) is already configurable
configurable, as in, I have a menu option in my FWAA that I can change? or as in, something needs to be edited and reflashed?

You would put that in your cfg to disable the blink :

#ifdef BLINK_AT_RAMP_MIDDLE
#undef BLINK_AT_RAMP_MIDDLE
#endif

The default settings are in config-default.h so if you want to disable something in there you can do this for any of those.

 

 

Tom E
Tom E's picture
Offline
Last seen: 9 hours 22 min ago
Joined: 08/19/2012 - 08:23
Posts: 14626
Location: LI NY

Ahh, ok. Yes - agree, probably best someone else do this for you. Sounds like a very steep learning curve.

 

For issue 1., it's configurable by editing and flashing.

jon_slider
jon_slider's picture
Offline
Last seen: 6 hours 2 min ago
Joined: 09/08/2015 - 12:20
Posts: 4950
Location: Central North America

thefreeman wrote:
The default settings are in config-default.h so if you want to disable something in there you can do this for any of those.
thanks for the education Thumbs Up

.

Tom E wrote:
probably best someone else do this for you
thanks for the reality check
meanwhile, I just use stepped mode, it has no double blink Wink
Wieselflinkpro
Wieselflinkpro's picture
Offline
Last seen: 2 weeks 3 days ago
Joined: 05/21/2015 - 04:34
Posts: 980
Location: Germany - TLF
Tom E wrote:

Ok, think I mis-understood. I’m not familiar with his C8F and H03 drivers. I would convert to a simple FET+1 and use a D4 .hex file. I think the std FET+1 is the 7135 on Pin #5 and FET on pin #6. Don’t need the voltage dividers because Anduril uses the internal method, usually that is.

OK, I will try.
D4 has Pin #2 for Switch. And the old D4v1 has no Aux/Switch-LED, I think.
And it works with the A17DD Driver with the changes you wrote?

Is the Layout of the BLF Q8 the same as the D4 with aditional Aux-LED on Pin #3?

Where do I find the latest Hex-Files with Anduril or Anduril2? I found the following.
https://github.com/mkong1/anduril/tree/master/hex_files
https://github.com/mkong1/anduril/tree/master/open_source_hex_files

On the older Donwload-Place I found no Anduril-Hex-files:
https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/trunk/files/...

Tom E
Tom E's picture
Offline
Last seen: 9 hours 22 min ago
Joined: 08/19/2012 - 08:23
Posts: 14626
Location: LI NY

You can find the standard/stock basic FET+1 schematic here in DEL's driver thread: https://budgetlightforum.com/comment/1077137#comment-1077137

It shows the 7135 on pin #5, FET on pin#6. Pin #2 is the switch, pin #3 is the switch/AUX LED, and pin #7 is the voltage divider (not really needed w/Anduril).

Yes - Q8 is same as D4 but with the add switch LED on pin #3.

Not sure about the latest .HEX files.

 DEL has the parts list (BOM) in his OSHPark listings, like here: https://oshpark.com/shared_projects/qsbLVgh0 or here: https://oshpark.com/shared_projects/pYGsJoAx

DEL developed the first stable, proper designed driver for the ATTiny85. He designed the Q8 driver. Everyone thereafter copied his design, or I passed along the info to them.

 

d_t_a
Offline
Last seen: 23 hours 43 min ago
Joined: 08/04/2017 - 23:58
Posts: 2519
Location: Manila, Philippines

thefreeman wrote:
If it did blink the FW3A-219 model number it’s because they put its model number by mistake in their cfg-fwaa.h, as mentioned in pm the FWAA IFAIK has only 2 PWM channels (FET+1) instead of 3 for the FW3A, and the former doesn’t have the 66% FET limit of the FW3A-219.
so you would use a FET+1 cfg as model, like the D4 one for example.

Aside from that, I believe point 2. and 3. would require changes in Anduril code, not just cfg.

Thanks for the clarification…

Is it possible that Lumintop flashed the wrong firmware (FW3A-219 instead of FWAA) on their FWAA, or just that the model code has a mistake in the cfg-fwaa.h, as you mentioned?

How to check if that is indeed the case? (3-channel program code on a 2-channel physical driver = what kind of issues will happen?)

SammysHP
SammysHP's picture
Online
Last seen: 7 min 11 sec ago
Joined: 06/25/2019 - 14:35
Posts: 957
Location: Germany

d_t_a wrote:

How to check if that is indeed the case? (3-channel program code on a 2-channel physical driver = what kind of issues will happen?)

Does it ramp up and down normally on all 150 levels? Then everything is alright. Wrong channel configuration would result in nonlinear ramp, no turbo, no moon or whatever.
Thujone
Offline
Last seen: 3 days 11 hours ago
Joined: 03/26/2020 - 13:43
Posts: 30
Location: PNW

I hope this is an OK place to ask for help. I just updated my KR4 and D4V2 lights to the latest Anduril. However I had the following issue on my K9.3, and after I have not been able to reflash (Or use).

Failed attempt:

Quote:
C:\Program Files (x86)\MHV AVR Tools\bin>avrdude -c usbasp -p t1634 -u -Uflash:w:anduril.2021-08-31.noctigon-k9.3.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.02s

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.2021-08-31.noctigon-k9.3.hex”
avrdude: input file anduril.2021-08-31.noctigon-k9.3.hex auto detected as Intel Hex
avrdude: writing flash (10270 bytes):

Writing | ################################################## | 100% 7.38s

avrdude: 10270 bytes of flash written
avrdude: verifying flash memory against anduril.2021-08-31.noctigon-k9.3.hex:
avrdude: load data flash data from input file anduril.2021-08-31.noctigon-k9.3.hex:
avrdude: input file anduril.2021-08-31.noctigon-k9.3.hex auto detected as Intel Hex
avrdude: input file anduril.2021-08-31.noctigon-k9.3.hex contains 10270 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 7.01s

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

Every try since:

Quote:
C:\Program Files (x86)\MHV AVR Tools\bin>avrdude -c usbasp -p t1634 -u -Uflash:w:anduril.2021-08-31.noctigon-k9.3.hex

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn’t answer. 1
avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.

avrdude done. Thank you.

I should add that I have tried -F as well

Quote:
C:\Program Files (x86)\MHV AVR Tools\bin>avrdude -c usbasp -p t1634 -u -F -Uflash:w:anduril.2021-08-31.noctigon-k9.3.hex

avrdude: warning: cannot set sck period. please check for usbasp firmware update.
avrdude: error: programm enable: target doesn’t answer. 1
avrdude: initialization failed, rc=-1
avrdude: AVR device initialized and ready to accept instructions
avrdude: Device signature = 0×756372
avrdude: Expected signature for ATtiny1634 is 1E 94 12
avrdude: NOTE: “flash” memory has been specified, an erase cycle will be performed To disable this feature, specify the -D option.

avrdude done. Thank you.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 1 hour 2 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3

Thujone wrote:
I just updated my KR4 and D4V2 lights to the latest Anduril. However I had the following issue on my K9.3, and after I have not been able to reflash (Or use)…

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

avrdude: error: programm enable: target doesn’t answer. 1
avrdude: initialization failed, rc=-1 Double check connections and try again, or use -F to override this check.

Usually this means it is not physically connected… like the connector slipped during a reflash. Keep trying, and it should work eventually.

It can help to use good lighting and a magnifier or reading glasses to see better, to make sure the pins are making contact. It can also sometimes help to unplug and replug the USB adapter, because some USB adapters are unreliable after one use of avrdude. Also, sometimes it helps to change the angle of the pogo pins against the pads.

Thujone
Offline
Last seen: 3 days 11 hours ago
Joined: 03/26/2020 - 13:43
Posts: 30
Location: PNW

Toykeeper,

Thank you so much for your time. Unfortunately I do not believe that is what I have going on here. I have a steady hand and good eyes with plenty of quality light. I have been able to update other lights since, and have attempted this one over 30 times with the same result. I had previously used multiple versions on the 9.3, however as soon as that failed upload occurred there have been no signs of life.

Update:

Have rebooted my pc, and left the adapter unplugged for half an hour. Reflashed a D4V2 first try. Then attempted 20 additional times, carefully repositioning and verifying connection each time with no success. Then to verify the adapter status I reflashed the D4V2 again in 1 try.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 1 hour 2 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3
Thujone wrote:
Unfortunately I do not believe that is what I have going on here. … have attempted this one over 30 times with the same result. I had previously used multiple versions on the 9.3, however as soon as that failed upload occurred there have been no signs of life.

That is unfortunate. I have a couple lights which are extremely difficult to flash, so I don’t do it very often because each time takes dozens of attempts. In one case, I had to try over 200 times before it finally worked. I never did figure out why exactly it has issues while others don’t, though.

It’s also possible that the flash could have sent exactly the wrong data, causing it to underclock itself or something at boot time, which would make reflashing fail. But in several years of reflashing chips rather a lot, I haven’t seen that happen.

OTOH, I have an old FW3A dev host here which was fine for years, and worked fine last time I reflashed it… it even boots up and runs Anduril normally. But I can’t get it to flash any more. It acts like it’s not connected. I haven’t tried cleaning it yet though; it could just have dirty contacts.

Thujone
Offline
Last seen: 3 days 11 hours ago
Joined: 03/26/2020 - 13:43
Posts: 30
Location: PNW

I suppose I will give it some more attempts each day until I break down and order a replacement. Wife is not enthused that I broke “her torch”.

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 1 hour 2 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3
Thujone wrote:
I suppose I will give it some more attempts each day until I break down and order a replacement. Wife is not enthused that I broke “her torch”.

My sympathies. If I ever find a practical way to revive it, I’ll let you know… but so far, the only method I’m aware of is to unsolder the MCU and use a high-voltage programmer on it. Or just keep retrying and hope. Sad

It might help to twiddle the 3.3V/5V jumper, but it’s kind of a long shot.

Forsythe P. Jones
Online
Last seen: 5 min 48 sec ago
Joined: 08/15/2021 - 00:40
Posts: 298
Location: California

Thujone, I have a spare D4V2 driver board that I can sell you for what I paid for it ($12 I think). But, I am told that replacing it is difficult because of having to solder a lot of wires in a small space. ToyKeeper’s idea of unsoldering the MCU to do the HV (high voltage = 12V) reflash method might be easier. I have never done this and don’t know whether you’d really have to unsolder the entire MCU or just the relevant pin. It’s disappointing to hear that this can’t be done through the 6 pin interface without removing the MCU from the board. What a pain.

I notice illumn.com has some D4V2 in stock in California if your wife doesn’t want to wait for a replacement to arrive from China. They ship pretty fast.

There are probably people on this board who can fix your light by unsoldering the MCU etc .if you’re not up for that yourself. It will definitely be quicker to get a new light, but if you fix the old one afterwards, then you have a spare. I’d offer to give it a try, but I don’t have the tools for it (SMT hot air rework gizmo).

ToyKeeper
ToyKeeper's picture
Offline
Last seen: 1 hour 2 min ago
Joined: 01/12/2013 - 14:40
Posts: 10725
Location: (469219) 2016 HO3
Thujone wrote:
I had the following issue on my K9.3
Forsythe P. Jones wrote:
I have a spare D4V2 driver board that I can sell you

That doesn’t help.

About the high-voltage thing, it’s almost certainly not an option. It requires special equipment to do the reflashing, and getting the MCU off/on is rather difficult due to its form factor. Even just getting the K9.3 driver out is difficult, since there is so much hardware packed into a tiny space.

If reflashing via pogo adapter fails to revive it, Thujone doesn’t have any good options.

Forsythe P. Jones
Online
Last seen: 5 min 48 sec ago
Joined: 08/15/2021 - 00:40
Posts: 298
Location: California

Ah whoops, somehow I got confused and forgot what model of light this was. It’s a real pain if the HV reflash can’t be done in-circuit. I guess the pogo pin programmer doesn’t have the 12 volt output anyway. Thujone, don’t throw out your light, it is likely repairable with some expense and hassle. Meanwhile though, yeah, it sounds like you better buy another one. Illumn does have some Noctigons in stock, and fwiw my D4v2 took only around 2 weeks to arrive from China, much faster than I expected.

thefreeman
thefreeman's picture
Online
Last seen: 4 min 43 sec ago
Joined: 01/06/2020 - 09:56
Posts: 769
Location: France

ToyKeeper wrote:
Even just getting the K9.3 driver out is difficult, since there is so much hardware packed into a tiny space.

If reflashing via pogo adapter fails to revive it, Thujone doesn’t have any good options.

I’d say the K9.3 is one of the less difficult Emisar/Noctigon to repair, driver cavity has a lot of depth (~10mm) compared to the ~2.5mm of the D4v2/D4Sv2/KRx, which allows to use longer wires, the solder pads on the MCPCB and AUX PCB being more spread out makes soldering the wires significantly easier than on a D4v2.
Still not exactly an easy job and it depends a lot on one’s skills.

Hank sells drivers as spare parts.

Skylight
Skylight's picture
Offline
Last seen: 11 hours 55 min ago
Joined: 10/01/2018 - 04:49
Posts: 1065
Location: Europe

I would need to reflash a driver to use only the FET. Is there any FET only Anduril HEX file? How would it be possible to compile one?

Tom E
Tom E's picture
Offline
Last seen: 9 hours 22 min ago
Joined: 08/19/2012 - 08:23
Posts: 14626
Location: LI NY

Skylight wrote:
I would need to reflash a driver to use only the FET. Is there any FET only Anduril HEX file? How would it be possible to compile one?

Hhmm, I think I did this a while back. Depends on your driver/hardware and what issue(s) you can live with, or not. If it's like a FET+1 but without the FET (i.e. direct drive FET), then at low PWM the smooth ramping is not so smooth, so if you could live with it being rough, or raise the low end of the ramping. I think even the lowest possible ramping level for a FET is still not that low. I don't know if TK's new "better low modes" changes could make this work better or not.

It's fairly easy to generate Anduril / Anduril 2 for 1 channel, and create a FET only ramping table - that's basically all you need to do. I don't have a working, tested version handy. Again, at a minimum, I/we would need specifics on the driver - I/O pin assignment for the FET channel, etc.

 

Pages