Sofirn SC21 mini

353 posts / 0 new
Last post
SammysHP
SammysHP's picture
Offline
Last seen: 1 hour 52 min ago
Joined: 06/25/2019 - 14:35
Posts: 1714
Location: Germany

But which firmware? Some say Anduril 1, some say 2. I doubt that they created their own ATtiny1616 Anduril 1 port. Maybe two different drivers from different batches?

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

gchart wrote:
I can always rig something up if I need to for flashing.
Since the SC21 Pro ship w Anduril 1, it would be great if it could be reflashed to Anduril 2.
DarkShot
DarkShot's picture
Offline
Last seen: 22 hours 22 min ago
Joined: 02/11/2019 - 16:15
Posts: 127
Location: Canada
gchart wrote:
Now that’s interesting! I had heard that they were planning on using the attiny1616 for the SC21 Pro, but then Barry seemed to go quiet so I never ended up hearing for sure. Did you / could you grab pics of the driver? I can’t believe they didn’t use the same flashing pad layout that I had provided. At least there are pads, I suppose. I can always rig something up if I need to for flashing.

This was the best I got at the time, just taken with a phone. The “1616” can be barely made out, it’s a 20pin SOC and looks to be the appropriate size just by eyeballing it.

Also interestingly, the driver was keyed to the head so it wouldn’t rotate if it became loose and muck with the USB port position. Not sure if this is a standard thing with Sofirn on-board rechargeable lights.

Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30

I just got my SC21 Pro in today and can confirm that it’s using the attiny1616 since I was able to successfully ping, read, and write with pymcuprog.

Does anyone have any ideas about what firmware might work on it? Maybe the SP36-1616 build?

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

Adair21 wrote:
I was able to successfully ping, read, and write with pymcuprog
Yay!

I look forward to your Anduril 2 installation success.

SammysHP
SammysHP's picture
Offline
Last seen: 1 hour 52 min ago
Joined: 06/25/2019 - 14:35
Posts: 1714
Location: Germany

jon_slider wrote:
I look forward to your Anduril 2 installation success.

Anduril 1 was never ported to the 1616 officially, so I wonder which firmware they use.
Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30

Okay guys, I’ve tried the 1616 builds for the following all without success:

Sp36: light will turn on but ramping is extremely slow

Q8: light will turn on but flashes between turbo and different levels while ramping.

Sp10: light comes on immediately after connecting battery. Button won’t work

Any ideas?

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

thanks for being the Lead Scout.

Adair21 wrote:
Any ideas?
does an SP10 Pro driver work in the SC21 Pro? Innocent
SammysHP
SammysHP's picture
Offline
Last seen: 1 hour 52 min ago
Joined: 06/25/2019 - 14:35
Posts: 1714
Location: Germany

Adair21 wrote:
Okay guys, I’ve tried the 1616 builds for the following all without success:

Sp36: light will turn on but ramping is extremely slow

Q8: light will turn on but flashes between turbo and different levels while ramping.

Sp10: light comes on immediately after connecting battery. Button won’t work

Any ideas?


Can you share the original firmware dump that you hopefully made before messing with the driver? We need the build ID to know what was used. Have you checked the version information before updating it?
gchart
gchart's picture
Offline
Last seen: 10 hours 16 min ago
Joined: 03/19/2016 - 11:57
Posts: 3333
Location: Central IL

Adair21 wrote:
Okay guys, I’ve tried the 1616 builds for the following all without success:

Sp36: light will turn on but ramping is extremely slow

Q8: light will turn on but flashes between turbo and different levels while ramping.

Sp10: light comes on immediately after connecting battery. Button won’t work

Any ideas?

I thought it should be the SP36 firmware, but I could be wrong.

Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30

Here’s the hex file the I dumped. The version readout was 20210113.

It’s possible it’s using the sp36 firmware. Are fuse values still a thing on the attiny1616? Maybe something like CKDIV8 is making the ramp slow. I’ve had that issue with Lume1 drivers in the past. Any tips on changing fuse values using pymcuprog?

Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30

Okay, I figured out how to read fuses and this is what’s currently on the light:

Quote:

0×001280: 00

0×001281: 00

0×001282: 02

0×001283: FF

0×001284: 00

0×001285: F6

0×001286: 07

0×001287: 00

0×001288: 00

0×001289: FF

Can anyone read the fuses from their sp36-1616 to compare? I only own the t85 version

SammysHP
SammysHP's picture
Offline
Last seen: 1 hour 52 min ago
Joined: 06/25/2019 - 14:35
Posts: 1714
Location: Germany

Adair21 wrote:
Here’s the hex file the I dumped. The version readout was 20210113.

Thank you. -This is already Anduril 2 as far as I can see from disassembling and analyzing the file. But it’s a very early build. I guess it’s a development build from gchart with a SP36-like configuration as the tinyavr port was merged much later.

Actually I’m mostly sure it is a build based on this revision: https://bazaar.launchpad.net/~toykeeper/flashlight-firmware/anduril2/fil...

Maybe not, see below.

Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30
SammysHP wrote:
This is already Anduril 2 as far as I can see from disassembling and analyzing the file.

Very interesting. It acts so much like Anduril 1. No simple mode and 4C from on goes into ramp config. Is this consistent with early builds of Anduril 2?

SammysHP
SammysHP's picture
Offline
Last seen: 1 hour 52 min ago
Joined: 06/25/2019 - 14:35
Posts: 1714
Location: Germany
Adair21 wrote:
SammysHP wrote:
This is already Anduril 2 as far as I can see from disassembling and analyzing the file.

Very interesting. It acts so much like Anduril 1. No simple mode and 4C from on goes into ramp config. Is this consistent with early builds of Anduril 2?


No, Anduril 2 had simple UI from the beginning. Very strange.
Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30

This entire time I’ve been trying anduril.2021-12-13.sofirn-sp36-t1616.hex and getting the slow ramping, but I just tried anduril.2021-08-31.sofirn-sp36-t1616.hex and it works!!

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

Adair21 wrote:
I just tried anduril.2021-08-31.sofirn-sp36-t1616.hex and it works!!
APPLAUSE!!!

Looking forward to learning how to do that for mine.

question
does that build have the double flash midramp.. cause if it does, Im out

SammysHP
SammysHP's picture
Offline
Last seen: 1 hour 52 min ago
Joined: 06/25/2019 - 14:35
Posts: 1714
Location: Germany

Now I’ve checked the complete callgraph and it appears to be Anduril 1, indeed. Weird.

Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30

The real question is who made an Anduril 1 build for the SP36-1616 and why did Sofirn use that on this light

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

The real question is

Can I replace Anduril 1 w Anduril 2 on my SC21 Pro, Without getting a double flash midramp?

Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30

jon_slider wrote:
The real question is

Can I replace Anduril 1 w Anduril 2 on my SC21 Pro, Without getting a double flash midramp?

The SP36 build from 8/31 doesn’t have the flash mid-ramp.

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

Im IN!

Congrats and thanks of placing the anchor bolts on the route

Im ready to learn to climb Reflash Mountain

I have the pogo adapter from gchart, and all the software he helped me load.. what do I do now? Grad

Firelight2
Firelight2's picture
Offline
Last seen: 4 hours 52 min ago
Joined: 04/08/2011 - 15:17
Posts: 5091
Location: California

Adair21 wrote:
jon_slider wrote:
The real question is

Can I replace Anduril 1 w Anduril 2 on my SC21 Pro, Without getting a double flash midramp?

The SP36 build from 8/31 doesn’t have the flash mid-ramp.


Also, I recall the mid-ramp flash was intentionally programmed in. It is intended to alert the user when switching channels.

If you are comfortable with coding and compiling, you can probably edit the flash or flashes in the ramp out of any version of Anduril 1 or 2.

Personally, I agree that a smooth ramp without any flashes is best. The only point of knowing when you’re switching channels would be to get an idea of when efficiency drops as you go to FET. With that knowledge you could fine-tune your output to stop just before you hit that point. However, in practice this does not work as the default ramp speed of 2 seconds is far too fast to provide any meaningful fine-tuning around channel switches.

Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30

jon_slider wrote:
Im IN!

Congrats and thanks of placing the anchor bolts on the route

Im ready to learn to climb Reflash Mountain

I have the pogo adapter from gchart, and all the software he helped me load.. what do I do now? Grad

Do you have a USB ttl UPDI programmer?
Like these from Amazon

Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30

Another update: I’ve been specifying “-m flash” when erasing the MCU before writing and I thing this caused some settings from Anduril 1 to be saved in eeprom or something like that.

I flashed anduril.2021-12-13.sofirn-sp36-t1616.hex again and then immediately did a factory reset and now everything works as expected.

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

Firelight2 wrote:
the default ramp speed of 2 seconds is far too fast to provide any meaningful fine-tuning around channel switches.
I feel you understand deeply.

I have zero clue how to code, compile, and reflash.. Im sure I could learn.. given sufficient coaching

Adair21 wrote:
Do you have a USB ttl UPDI programmer?
thanks for the link..

I have this programmer from gchart, for the SP10.. but I sold the light before I got the programmer, so I have not used it. (I may get another SP10, but meanwhile I got the SC21.. )

I do think I have all the software.. gchart spent a lot of time coaching me and linking me to all the stuff with unfamiliar names like Python, Pip and PymCuProg… And I learned to use the Terminal in my iMac.. Im expanding my vocabulary, but have not tried to connect the programmer to any flashlight yet..

I think my first question is where do I put the pins
but Im sure there are other considerations Im too ignorant to ask about.. lol

Im willing to follow directions, if I may impose on your time Wink

Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30

If you already have everything installed, then it’s not overly difficult. However, the pogo dongle for the SP10 Pro will not work on this light since it uses a different layout. You will either need to make your own dongle or solder wires directly to the board. But that programmer will work just fine

Here’s the gist of it:

1. wire up the programmer to the light: pin2 => GND pin6 => VCC pin1 => TX/RX (depending on the programmer, you might need a 1kOhm resistor between TX and pin1)

2. figure out what your programmer is called on your system

  • mine was /dev/tty.usbserial-1420 but yours might be different

3. try to ping the light

  • pymcuprog ping -t uart -u /dev/tty.usbserial-1420 -d attiny1616

4. make a backup of the existing hex

  • pymcuprog read -m flash -f ~/Desktop/sc21.hex -t uart -u /dev/tty.usbserial-1420 -d attiny1616

5. erase the mcu

  • pymcuprog erase -m flash -t uart -u /dev/tty.usbserial-1420 -d attiny1616

6. write the new firmware

  • pymcuprog write -f ~/Downloads/anduril.2021-12-13.sofirn-sp36-t1616.hex -t uart -u /dev/tty.usbserial-1420 -d attiny1616

7. Do a factory reset on the light just because lol

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

Thank you for my homework reading list.. much appreciated.

Sari33
Offline
Last seen: 1 week 15 hours ago
Joined: 07/17/2019 - 05:43
Posts: 576
Location: EU

How much is the driver size?
I would try upgrade on sc31pro host

Adair21
Offline
Last seen: 2 months 4 days ago
Joined: 06/28/2020 - 21:58
Posts: 30
Sari33 wrote:
How much is the driver size? I would try upgrade on sc31pro host

The driver is 19mm, but I don’t see the point in swapping the driver when it can be flashed to Anduril 2.

Pages