Tutorial  Updated

Pairing the joy-con on emunand and sysnand

Hello guys! I had the same issue of this thread:
Practically, my joy-con and pro controller weren't synched anymore between EMUnand and SYSnand because I connected them to another console... so when I was switching from SYSnand to EMUnand (and vice versa) I had to redo the controllers pairing

In that thread, that's a way to re-sync the joy-con but you have to transfer a file from EMUnand to SYSnand and for me it's not very safe... So I found a way to transfer that file from SYSnand to EMUnand and keep the SYSnand clean!

So here is the tutorial:


WARNING:

SOMETIMES THIS TUTORIAL CAN LEAD TO THE "RED FIRST SETUP SCREEN" BUT DON'T PANIC! YOUR GAMES AND SAVES ARE SAFE, JUST COMPLETE THE SETUP AND EVERYTHING SHOULD BE AS BEFORE

WE FIGURED OUT THAT SOMETIMES THE SCRIPTS DOESN'T WORK PROPERLY WITH THE NEW HORIZONTAL MODE IF YOU HAVE YOUR JOYCONS ATTACHED SO IS PREFERABLE TO REMOVE JOYCONS BEFORE USING THE SCRIPTS.
I THINK THAT'S A TEGRA EXPLORER BUG AND NOT OUR'S.

I DON'T ASSUME ANY RESPONSIBILITY IF SOMETHING GOES WRONG SO PLEASE FOLLOW THESE STEPS ONLY IF YOU KNOW WHAT YOU ARE DOING


Preparation:
Download the latest version of Tegra Explorer from here: https://github.com/suchmememanyskill/TegraExplorer/releases
Download the right script according to your emunand type from the attached files (and make sure you choose it right)


ATMOSPHERE:

MAKE SURE YOU ARE IN AIRPLANE MODE ON EITHER SYSNAND AND EMUNAND, THIS PROCESS CAN "BREAK" YOUR DNS BECAUSE AS I KNOW, THE 8000000000000050 FILE CONTAINS ALSO WIFI AND OTHER SETTINGS AND THIS CAN LEAD TO BAN.
IF YOU'RE USING INCOGNITO MODE, YOU DON'T NEED TO BE IN AIRPLANE MODE. (BUT IS RACCOMANDED TO DO THAT)



1. Launch TegraExplorer.bin trough whatever you want (RCM loader, TegraRCM ecc…)


2. Go to [SD:/] SD CARD -> tegraeplorer -> syncfix -> Syncfix.te -> Launch Script
and follow the script instructions!

3. DONE!


If you pair your joy-cons/controllers to another console or you format your NAND (SYS or EMU), you have to launch again Syncfix.te to fix the sync issue!



SX OS EMUNAND AS HIDDEN PARTITION:
IF YOU'RE USING SXOS STEALTH MODE OR INCOGNITO MODE, YOU DON'T NEED TO BE IN AIRPLANE MODE.
ON THE CONTRARY, IF YOU ARE NOT USING THOSE, YOU HAVE TO BE IN AIRPLANE ON EITHER SYSNAND AND EMUNAND BEFORE PROCEDING.



DON'T USE TEGRAEXPLORER V2 OR LATER, INSTEAD USE THIS VERSION: https://github.com/suchmememanyskill/TegraExplorer/releases/tag/2.0.5

1. Launch TegraExplorer.bin trough whatever you want (RCM loader, TegraRCM ecc…)

2. Go to
[SD:/] SD CARD -> tegraeplorer -> syncfix -> Preparation.te -> Launch Script
and follow the script instructions!

3. REBOOT TO TEGRA EXPLORER

4. Go to
[SD:/] SD CARD -> tegraeplorer -> syncfix -> Syncfix.te -> Launch Script -> Launch Script
and follow the script instructions!

5. DONE!


You have to launch Preparation.te only the first time you follow this tutorial.
(Obviously, if you delete the emuMMC folder, you have to launch Preparation.te again but… dunno why you should delete it)

This script will create the following path on your micro sd:
sd:/emuMMC/emummc.ini
sd:/emuMMC/ER00/raw_based

This script is necessary to let Tegra Explorer read/write on your emunand and won’t affect it nowise.
If you pair your joy-cons/controllers to another console or you format your NAND (SYS or EMU), you have to launch again ONLY Syncfix.te to fix the sync issue!



SX OS EMUNAND AS FILE
IF YOU'RE USING SXOS STEALTH MODE OR INCOGNITO MODE, YOU DON'T NEED TO BE IN AIRPLANE MODE.
ON THE CONTRARY, IF YOU ARE NOT USING THOSE, YOU HAVE TO BE IN AIRPLANE ON EITHER SYSNAND AND EMUNAND BEFORE PROCEDING.
THIS SCRIPT IS TESTED ONLY ON FAT32 FILE SYSTEM, SO I DON’T KNOW IF IT WORKS ALSO ON EXFAT, LET ME KNOW IF THE EMUNAND CONFIGURATION IS DIFFERENT FOR EXFAT


DON'T USE TEGRAEXPLORER V2 OR LATER, INSTEAD USE THIS VERSION: https://github.com/suchmememanyskill/TegraExplorer/releases/tag/2.0.5

1. Launch TegraExplorer.bin trough whatever you want (RCM loader, TegraRCM ecc…)

2. Go to
[SD:/] SD CARD -> tegraeplorer -> syncfix -> Preparation.te -> Launch Script
and follow the script instructions!

3. REBOOT TO TEGRA EXPLORER

4. Go to
[SD:/] SD CARD -> tegraeplorer -> syncfix -> Syncfix.te -> Launch Script
and follow the script instructions!

5. DONE!


You have to launch Preparation.te every time you follow this tutorial.

This script will create the following paths on your micro sd:

sd:/emuMMC/emummc.ini
sd:/emuMMC/EF00/file_based
sd:/emuMMC/EF00/eMMC

Then, the script will move and rename all your Sxos emunand files from sd:/sxos/emunand/ to sd:/emuMMC/EF00/eMMC like this:

sd:/sxos/emunand/full.00.bin -> sd:/emuMMC/EF00/eMMC/00
.
.
.
sd:/sxos/emunand/full.07.bin -> sd:/emuMMC/EF00/eMMC/07
sd:/sxos/emunand/boot0.bin -> sd:/emuMMC/EF00/eMMC/boot0
sd:/sxos/emunand/boot1.bin -> sd:/emuMMC/EF00/eMMC/boot1


As I said, if you’re using exfat as your file system, please let me know if you have seven “full.XX.bin” files or less (or even more)!

This script is necessary to let Tegra Explorer read/write on your emunand.
As you can imagine, after launching Preparation.te, you aren’t able to boot to Sxos emunand, SO DON’T DO IT, just REBOOT TO TEGRA EXPLORER and launch Syncfix.te.
In Syncfix.te there’s a part that will revert the process so you can boot to Sxos Emunand again!

If you pair your joy-cons/controllers to another console or you format your NAND (SYS or EMU), you have to launch again FIRST Preparation.te, REBOOT TO TEGRA EXPLORER and THEN Syncfix.te to fix the sync issue!


Unfortunately, the Sxos version is still not running on tegragraexplorer v2 or later... so please, if you want to run the script safely on sxos, use this version of tegraexplorer until i'll update it to a newer version: https://github.com/suchmememanyskill/TegraExplorer/releases/tag/2.0.5
 

Attachments

  • SyncfixSxosEmuAsPartition.zip
    5.4 KB · Views: 504
  • SyncfixSxosEmuAsFIle.zip
    5.6 KB · Views: 436
  • syncfix_v3 - Atmosphere.zip
    1.1 KB · Views: 255
Last edited by MezBar,

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,155
Country
United States
  • A feature was added to optionally mirror the bluetooth pairing database to the SD card (thanks @ndeadly).
    • This is opt-in, and can be controlled by setting atmosphere!enable_external_bluetooth_db = u8!0x1.
    • When enabled, the pairing database will be synchronized to /atmosphere/bluetooth_devices.db.
    • This allows paired devices to be automatically kept in-sync across sysmmc/all emummcs.
 
  • Like
Reactions: hippy dave

hippy dave

BBMB
Member
Joined
Apr 30, 2012
Messages
9,880
Trophies
2
XP
29,214
Country
United Kingdom
So "synchronised to" sounds like it's a two-way process, right? It doesn't just use the SD copy instead, but it copies any missing entries from HOS's own database to the one on SD and also vice-versa?
 

Kallim

Well-Known Member
Member
Joined
Jan 12, 2021
Messages
291
Trophies
0
Age
47
XP
662
Country
United Kingdom
So "synchronised to" sounds like it's a two-way process, right? It doesn't just use the SD copy instead, but it copies any missing entries from HOS's own database to the one on SD and also vice-versa?
I was wondering that myself. I was also wondering if working in reverse is risky and would it stay working when you boot ofw? I feel this needs testing tomorrow 😀😆.
Post automatically merged:

I was wondering that myself. I was also wondering if working in reverse is risky and would it stay working when you boot ofw? I feel this needs testing tomorrow 😀😆.
Oh no I think I read it wrong.
 

marhalloweenvt

Well-Known Member
Member
Joined
Oct 2, 2014
Messages
235
Trophies
0
Age
29
XP
922
Country
I have already enable in system_settings.ini: enable_external_bluetooth_db = u8!0x1 but still not able to connect with Pro Controller (which has been paired in OFW)
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,155
Country
United States
I have already enable in system_settings.ini: enable_external_bluetooth_db = u8!0x1 but still not able to connect with Pro Controller (which has been paired in OFW)
I think you would have to run CFW on both EmuNand and SysNand for this service to sync between *Nands.
 
  • Like
Reactions: josete2k

Kallim

Well-Known Member
Member
Joined
Jan 12, 2021
Messages
291
Trophies
0
Age
47
XP
662
Country
United Kingdom
I think you would have to run CFW on both EmuNand and SysNand for this service to sync between *Nands.
I've got 2 switches (one it's my daughter's). Do you think this is be able to copy the file over to the 2nd switch once synced?

I tried this with the syncfix app but it didn't like it.
 

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,155
Country
United States
I've got 2 switches (one it's my daughter's). Do you think this is be able to copy the file over to the 2nd switch once synced?

I tried this with the syncfix app but it didn't like it.


I haven’t looked into the file format yet so not sure if it’s tied to the Switch/Nand/etc.

Ig you could try to copy /atmosphere/bluetooth_devices.db between them.
 

marhalloweenvt

Well-Known Member
Member
Joined
Oct 2, 2014
Messages
235
Trophies
0
Age
29
XP
922
Country
I think you would have to run CFW on both EmuNand and SysNand for this service to sync between *Nands.
Still the same result Coach. I booted into CFW of SysNAND, paired every controllers I have, and then Power Off -> Booted into CFW EmuNand, and nor of my controllers recognized by EmuNand. That's weird. I also checked that there is no file such as bluetooth_devices.db in atmosphere folder.
 
Last edited by marhalloweenvt,

josete2k

Well-Known Member
Member
Joined
Apr 24, 2009
Messages
678
Trophies
1
Age
43
Location
Spain
XP
1,599
Country
Spain
I think you would have to run CFW on both EmuNand and SysNand for this service to sync between *Nands.


Yes.
Post automatically merged:

Still the same result Coach. I booted into CFW of SysNAND, paired every controllers I have, and then Power Off -> Booted into CFW EmuNand, and nor of my controllers recognized by EmuNand. That's weird. I also checked that there is no file such as bluetooth_devices.db in atmosphere folder.

Delete the devices Bluetooth file before booting on SYSCFW and you're done
 

Kallim

Well-Known Member
Member
Joined
Jan 12, 2021
Messages
291
Trophies
0
Age
47
XP
662
Country
United Kingdom
It should be located in your atmosphere folder.
/atmosphere/bluetooth_devices.db

I'd of thought this one?
Post automatically merged:

/atmosphere/bluetooth_devices.db

I'd of thought this one?
I've still not tried it. But I'm going to pair on the sysnand whilst running atmosphere. That way I know it'll stay on the sysnand if I don't run it reboot and then try it in emunand.

If it's not working also try booting fusee.bin to see if that makes a difference rather than chainloading. Youll need to disable emmc as temporary measure. After that I'm out of ideas for now.
 
  • Like
Reactions: binkinator

binkinator

Garfield’s Fitness Coach
Member
GBAtemp Patron
Joined
Mar 29, 2021
Messages
6,511
Trophies
2
XP
6,155
Country
United States
Still the same result Coach. I booted into CFW of SysNAND, paired every controllers I have, and then Power Off -> Booted into CFW EmuNand, and nor of my controllers recognized by EmuNand. That's weird. I also checked that there is no file such as bluetooth_devices.db in atmosphere folder.

Before doing this, please check your /atmosphere/exosphere.ini file to make sure you are blocking Prodinfo on both Emunand and Sysnand.

Assuming you have the BT config you want on Emunand, you would enable the opt-in BT feature, boot into Emunand, let it create the .DB file and then shut down. Next you would launch Sysnand w/ CFW and it should have the correct BT registration.

(reverse if Emunand has the correct config.)
 
  • Like
Reactions: josete2k

Kallim

Well-Known Member
Member
Joined
Jan 12, 2021
Messages
291
Trophies
0
Age
47
XP
662
Country
United Kingdom
Still the same result Coach. I booted into CFW of SysNAND, paired every controllers I have, and then Power Off -> Booted into CFW EmuNand, and nor of my controllers recognized by EmuNand. That's weird. I also checked that there is no file such as bluetooth_devices.db in atmosphere folder.
Can I just check double check your in the latest atmosphere?
 
Last edited by Kallim,
  • Like
Reactions: binkinator

Kallim

Well-Known Member
Member
Joined
Jan 12, 2021
Messages
291
Trophies
0
Age
47
XP
662
Country
United Kingdom
Already 1.5.0, but I think maybe pre-package hasn't included cause they are 3 weeks old, but opt-in Bluetooth Pairing (https://github.com/Atmosphere-NX/Atmosphere/pull/1787) is just merged into master branch 2 days ago.
Mine threw an error up so my command line was wrong somewhere (I think I know what I did).... but I read this post so I won't try it until Atmosphere is released properly.

Did you use a template for your system_settings.ini?

On command line 73 it says enable_external_bluetooth_db = u8!0x0. did you remove that line? If you just added the line I imagine your turning Bluetooth pairing on then off further down the in the file. You sound like you know what your doing so I'm guessing that's not the case.
 

ndeadly

Well-Known Member
Member
Joined
Nov 5, 2018
Messages
467
Trophies
0
Age
36
XP
2,607
Country
Australia
I wrote the PR for the atmosphere bluetooth synchronisation setting. Allow me to clarify a few things...

Firstly, this hasn't been released yet. It was merged into master a few days ago and the changelog was updated, but it's not present in the 1.5.0 prerelease. The only way to use it currently is to build atmosphere master for yourself.

So "synchronised to" sounds like it's a two-way process, right? It doesn't just use the SD copy instead, but it copies any missing entries from HOS's own database to the one on SD and also vice-versa?
That's more or less correct. Basically, it intercepts the calls that read or write the pairing database to the system save file, and stores a copy on the sd card. On first boot with the setting enabled, the bluetooth_devices.db file will be created from the current environment when the console reads the database from system save. Subsequent attempts to read the database from the system save will load the one from sd instead, allowing for a common database between all sys/emummc. Writes store the current database to both sd card and system save, meaning that any changes to the database will also end up synchronised in the system saves too (only for sys/emummc you've booted with the setting enabled, of course). Because this relies on atmosphere to mitm the relevant IPC functions for loading and storing the database, it can't be used to synchronise with OFW.

I've got 2 switches (one it's my daughter's). Do you think this is be able to copy the file over to the 2nd switch once synced?

I tried this with the syncfix app but it didn't like it.
This can't automatically sync the databases between consoles, if that's what you're asking. You could however manually copy the database file from one switch to another with the setting enabled in order to have the same pairings on both consoles. Note that you would also have to use Mission Control to spoof the bluetooth MAC address of the original console on the second in order for the controllers to consider the pairings valid. Also note that doing this and using the two consoles in the vicinity of one another may cause unpredictable behaviour with the consoles fighting over the connection.

I haven’t looked into the file format yet so not sure if it’s tied to the Switch/Nand/etc.
It's just a binary dump of the array of bluetooth device settings documented here
 
Last edited by ndeadly,

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    BakerMan @ BakerMan: it looks like a little kids' game, and bunny (welcome btw) is looking for an uncensor patch