To make sure that the firewall on your mac isn’t blocking Barcode to PC, follow these steps:
Security & Privacysettings
Open Spotlight Search using
Command + Space and type
Security & Privacy
firewall in the System Preferences search bar and hit ENTER
If Barcode to PC server is already present in the list you don't have to anithing, and you can skip the following steps.
Barcode to PC server.app