Problem: My wifi password is too long to be manually inserted in my printer.
Solution: Use WPS in Mikrotik.
Enable WPS for a wireless interface.
/interface wireless set wlan-interface wps-mode=push-button-virtual-only
Virtually activate the WPS button.
/interface wireless wps-push-button wlan-interface
Check the logs to see if it worked.
18:47:16 wireless,info wlan-interface: WPS virtual button pushed
18:47:20 wireless,info wlan-interface: WPS association from 00:11:22:33:44:55
18:47:20 wireless,info 00:11:22:33:44:55@wlan-interface: connected, signal strength -66
18:47:20 wireless,info wlan-interface: WPS of 00:11:22:33:44:55 started, associated
18:47:27 wireless,info wlan-interface: WPS of 00:11:22:33:44:55, received info: [...]
18:47:27 wireless,info wlan-interface: WPS of 00:11:22:33:44:55, do registration
18:47:29 wireless,info wlan-interface: WPS of 00:11:22:33:44:55 complete
18:47:29 wireless,info wlan-interface: WPS button reset
18:47:29 wireless,info 00:11:22:33:44:55@wlan-interface: disconnected, WPS complete
18:47:36 wireless,info 00:11:22:33:44:55@wlan-interface: connected, signal strength -66
This log indicates that the WPS setup was successful and the device was able to connect to the network.