Offline sync

I am doing a project with LED poi and I need both devices to not depend on external wifi, and synchronize with each other, how can this be done?

Have one connect to the other’s AP.

That is, I just have to specify the AP point of the first device in the wifi settings of the second device. and if I connect to the first one via AP, will both work?