It looks like you are doing it correctly. The only difference you would need would be to account for changing the value between 0x01 and 0x00 for your requirements
It is not working though... Learned that I need to
make this happen CyBle_GetBleSsState() == CYBLE_BLESS_STATE_EVENT_CLOSE
But how do I get to that State?
I saw that it needs to be hibernated or in sleep mode?
Also after that, can I connect to that device(set into a Peripheral) to my Central?
CYBLE_BLESS_STATE_EVENT_CLOSE is an event state that occurs when the advertising radio is temporarily "off", meaning that there is no active wireless transmission at that time (iirc), which should occur automatically on its own when you are advertising. It is not related to deep sleep or hibernate.
Anytime the unit is advertising, it means that the radio is ready and will accept a connection from your central device if requested (barring the addition of security and other software checking.)