Li-Ion UPS for a 12V 1.5A Router
1 - Nothing else than the batteries shall be connected to B+/B- ports of the 2S BMS module. Its purpose is to protect the batteries for over charging, over discharging and over current. User access to charge and discharge is done using P+/P- ports only. You're right on this point with your first schematic.
2 - Connections must be short (low resistance) between the batteries and the 2S BMS module. So fuses are definitively not welcomed in these lines and could render the things worse regarding the voltage control. (Better put one in the P+ line if you want)
3 - You have to control the charge of the batteries (the BMS module doesn't do that). A module based on a TP5100 could do that. But you've to remove or change the limiting current, sets by default to 2A - way too much - by removing one R100 (0.1 ohm SMD): it will drop the current to 1A, but replacing both of them by a unique 0.2 ohm will provide 0.5A to the batteries, which seems much adequate in your case.
For different value, R(ohm) = 0.1 / I(A)
Don't forget to put the &quot;SET&quot; jumper in place for two Li-ion cells.
Input from your 12V/2A power supply, output to the P+ of the BMS module. Common GND.
4 - As suggested, the buck-boost XL6009 (sepic?) converter must be at the very end of the chain to precisely control the voltage delivered to the switch/router.
5 - You may use the external switching circuit proposed in the TP5100 datasheet, but you need to use the pin 6 of the TP5100 chip, which isn't available easily on the Chinese module. But if you're skilled enough in delicate soldering, it could be possible.
Keeping it simple, I think in your case that a double schottky diode in TO220 package could do the trick: one anode to the positive of the 12V/2A power supply, the other anode to the P+ of the BMS and the common cathode to the positive input of the buck/boost XL6009 converter. Double diode, could be replaced by any single diode, but select the schottky diode with the lowest Vf available according to the expected current to limit looses in them.
6 - One latest recommendation: the readily available TP5100 Chinese module doesn't provide thermal control of the batteries while charging (even if the chip itself is capable of doing that), so keeping the charging current low is the safest way.
Hope this could help you.