Configuring HP WiFi Printer HP Print BA Desktop 3450 series
https://developers.hp.com/hp-linux-imaging-and-printing/gethplip
Get the driver script hplip-3.23.3.run
chmod u+x hplip-3.23.3.run
Follow the command line instructions to complete the installation
Switch to WiFi of Printer (HP Print BA Desktop 3540), else firewall will block connecting directly with printer IP address.
Use WiFi direct method and enter printer's IP Address (For me: 192.168.223.1). This can be obtained by print printer configuration.