Hacking Question How to put back the Switch into shipping mode?

igoticecream

Well-Known Member
OP
Newcomer
Joined
Jul 6, 2018
Messages
55
Trophies
0
Age
36
XP
369
Country
Spain
Ok so turns out the switch still consume battery even if it's off. I'd like to store my backup vulnerable switch and preserve battery life.

I was digging in the forum and turns out that in order to put it back into shipping mode, one have to turn off BATFET. There's a function in CTCaer's hekate that can archive this (github[.]com/CTCaer/hekate/blob/master/ipl/bq24193.c#L149) and the code in the main that calls this is commented with a nasty warning that one could end up pluging back the battery manually (github[.]com/CTCaer/hekate/blob/master/ipl/main.c#L2331)

Is this the code that I'm looking for? Does anyone have successfully turned off BATFET with that piece of code and can confirm that plugging the adapter back connects the battery?
 

mariogamer

Well-Known Member
Member
Joined
Aug 12, 2015
Messages
1,256
Trophies
0
Age
28
XP
790
Country
Canada
Ok so turns out the switch still consume battery even if it's off. I'd like to store my backup vulnerable switch and preserve battery life.

I was digging in the forum and turns out that in order to put it back into shipping mode, one have to turn off BATFET. There's a function in CTCaer's hekate that can archive this (github[.]com/CTCaer/hekate/blob/master/ipl/bq24193.c#L149) and the code in the main that calls this is commented with a nasty warning that one could end up pluging back the battery manually (github[.]com/CTCaer/hekate/blob/master/ipl/main.c#L2331)

Is this the code that I'm looking for? Does anyone have successfully turned off BATFET with that piece of code and can confirm that plugging the adapter back connects the battery?
It's simpler than that. Turn it off using Hekate's Power off function. This turn off the SoC completely.

The BATFET thingy was a fix to the battery desync, by completely reseting the battery config, until natinusala&perillamint found out only a single value needed to be changed.
 
Last edited by mariogamer,

igoticecream

Well-Known Member
OP
Newcomer
Joined
Jul 6, 2018
Messages
55
Trophies
0
Age
36
XP
369
Country
Spain
The code of the hekate's Power off function doesnt seem to disconnect the battery, just a regular turn off like the physical button does
 

mariogamer

Well-Known Member
Member
Joined
Aug 12, 2015
Messages
1,256
Trophies
0
Age
28
XP
790
Country
Canada
The code of the function doesnt seem to disconnect the battery, just a regular turn off like the physical button does
Nvm actually, shipping mode is the BATFET thingy, sorry.

However the hekate power off doesn't power off like a normal one. It does power off more stuff.

And I can confirm too.
 
Last edited by mariogamer,

CTCaer

Developer
Developer
Joined
Mar 22, 2008
Messages
1,154
Trophies
0
XP
3,008
Country
Greece
@mariogamer
He asks for shipping mode.
The power off does not disable fuel gauge, battery charger and pmic completely.

The commented code with the BATFET disconnection is exactly what OP wants (shipping mode).
And to disable shipping mode you just connect the switch wall charger (although 2-3 users had problem with this).

The storage usage of this, should be like this:
Disable AutoRCM if on.
Charge to 3.75V.
Disconnect USB.
Run it. It will force shutoff.

To reenable:
Connect wall adapter.
If the voltage is lower than 3.2V, it will not turn on right away.

Edit:
The 3.75V is among the best storage voltages for 3.7V li-on batteries.
 
Last edited by CTCaer,

mariogamer

Well-Known Member
Member
Joined
Aug 12, 2015
Messages
1,256
Trophies
0
Age
28
XP
790
Country
Canada
@mariogamer
He asks for shipping mode.
The power off does not disable fuel gauge, battery charger and pmic completely.

The commented code with the BATFET disconnection is exactly what OP wants (shipping mode).
And to disable shipping mode you just connect the switch wall charger (although 2-3 users had problem with this).

The storage usage of this, should be like this:
Disable AutoRCM if on.
Charge to 3.75V.
Disconnect USB.
Run it. It will force shutoff.

To reenable:
Connect wall adapter.
If the voltage is lower than 3.2V, it will not turn on right away.
Yeah I edited my post already, sorry.
 

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    AncientBoi @ AncientBoi: All right! Who stole my right sock? :angry: