Finds printer, doesn’t connect
-
I downloaded the plugin, and when I installed the plugin for the first time, everything worked fine and receipts came out of the printer with the order. Then I changed the data that would appear on the receipt in the PHP script order-handler.php.
I think I made a mistake there because after a certain adjustment nothing came out of the printer anymore. I eventually reinstalled the plugin, but after that, the plugin no longer recognized the printer. Then I restarted my entire Plesk server which resulted in the printer being found again.
Only now does the printer indicate connectivity as ‘Not Connected’.
What also strikes me is that the IP address does not match with the IP address on the receipt. How to fix this?
I have a Star mC-Print3 running on firmware 3.1.
-
This topic was modified 5 years, 8 months ago by
ikbenphilip.
-
This topic was modified 5 years, 8 months ago by
ikbenphilip.
-
This topic was modified 5 years, 8 months ago by
-
@ikbenphilip Thank you for the sensible approach of restoring the plugin first. Once you have a stable environment, it may be worth you sharing your PHP changes if you continue to have trouble to see if we can help.
If the printer is shown as Not Connected, then it typically means one of two things:
- The printer is being blocked from sending messages to your server. This may be a local network issue (i.e. there seems to be some IP address issue) or on your server. Sometimes servers will block traffic that they think may be suspicious, and it’s possible that the repeated connections from a CloudPRNT printer trigger this. If restarting your server via Plesk cleared the issue, then this is something to consider. Please check your server logs and also see if you can add rules for this traffic monitoring.
- Another possibility is that something is preventing the plugin on your server from writing to the wp-content/star-cloudprnt/ folder which is used to store information about printer connections. It is unusual for this to be an issue though, especially since you have had it working already.
I don’t think I understand you last comment. which IP addresses you are comparing?
The address printed on the printer self-test is it’s local network address, by default it will be assigned by your router when the printer is powered on. It can only be used to access the printer internally on the local network. Your router should allow the printer to make outgoing connections to the internet (i.e. to communicate with your web site), in which case the traffic logs on your server will show that the connection comes from your router IP, not the printers local IP. If outgoing connections are blocked, then this would cause the “Not Connected” issue. Please check your router configuration to ensure that it is not blocking outgoing connections for the printer.
It is quite possible that the local network IP will change sometimes (again, this is controlled by your router), but as long as it continues to have internet access, this is not a problem. The important point is that your website URL doesn’t change, and therefore the CloudPRNT URL installed into the printer remains constant.Unfortunately, all of these issues are outside of my ability to help with via the forum. Almost certainly it is a local router, or server side network traffic rule causing the issue. But, if you contact your local Star office support then they should be able to run some tests to help narrow down where the problem is occurring.
@lawrenceowen Thanks for your quick response! I think that it is indeed my server that is blocking the action. Do you have any idea where to fix this in Plesk?
I am now indeed trying to test and configure the printer on a home network. Eventually, it ends up in a kitchen of a restaurant on another network.
Edit: When I turn my firewall off on my Plesk server, the connection is established! So it’s 100% something in my server.
-
This reply was modified 5 years, 8 months ago by
ikbenphilip.
@ikbenphilip This does seem like the likely cause. Unfortunately I have never personally used Plesk to manage any of my servers so I’m really not sure where to look.
Since it seems to work for a while after restarting the server, then it would indicate a traffic filtering issue, rather than a fixed firewall rule.It is always worth ruling out a local issue too, especially if you will finally be installing to a different network and the problem may then go away. We have seen a few ISP’s install traffic filtering rules on their home routers which can potentially cause issues like this, until you configure the router always permit a specific device. I’m in the UK where Sky routers are a known culprit. Rebooting the home router is one way to test this, if the connection resumes then it’s a strong indication that the blockage is local.
If you do contact your local Star support then they should be able to let you connect your printer to one of our servers for a while to see if it gets blocked there too. If it does, then it’s definitely a local issue. Let me know where you’re based and I can put you in contact with the right office.
@lawrenceowen Update: after I turned the firewall back on, the connection in the plugins remains connected. Only now it seems as if orders are no longer coming in. After an order is placed, the que remains empty and nothing comes out of the printer.
I’m based in the Netherlands Province/state: Overijssel.
@ikbenphilip please double check that you have the CloudPRNT option set to enabled in the plugin settings. and please make sure that you press Save Changes at the bottom of the “Star CloudPRNT for WooCommerce Settings” page after choosing your selected printer.
If you are still having trouble then support for the Netherlands is covered directly from the UK office using https://star-emea.com/contact/ please be aware that they are a little short staffed at the moment and may be a little slower to react than usual, so it is worth mentioning that you hare talking with me already via the WordPress forum.
@lawrenceowen They are both connected and enabled. I was wondering that since my WooCommerce is in Dutch, could that be something the CloudPRNT-plugin doesn’t recognize?
Everything is connected, enabled, etc. But the plugin just doesn’t recognize the order, nothing shows up in the printer queue while WooCommerce shows that the order has been confirmed. I’m now on a different router and it’s the same issue as on my own personal router.
-
This reply was modified 5 years, 8 months ago by
ikbenphilip.
@ikbenphilip It shouldn’t be an issue, I believe that most users are not running an English site. However, there can be issues if you have an IDN domain name with Unicode characters. In this case, there can be difficulties. But, if your site is registering that the printer is connected then I think it’s not the issue here.
One more theory, are you using the beta version of the Star plugin? If so, then it has changed internally the method of detecting new orders. The official release version is connected to the WooCommerce “ThankYou” hook, meaning that WooCommerce will trigger out plugin to create a print job whenever it generates the “Thank You” message for customers. This mostly works, but it is not reliable enough, for example it can fail if a user makes an order and then closes their browser before seeing the thankyou message.
So, the beta version, instead connects to the a WooCommerce hook that calls out plugin when the order status is set to “processing”. This is 100% reliable usually, but if you have configured your site to skip the “processing” status for new orders, then print jobs will not be generated at all. You can test this by switching an existing order to “processing” and it should print, or use the “Print via Star CloudPRNT” Order action to reprint it.
I have managed that everything works fine now! Thank you for your assistance. I do have a single question left.
How to remove extra data from the receipt such as ‘Mollie’ (Dutch variant of Stripe). I’m using the WooCommerce Delivery Date Time Plugin (Woo Delivery) and I only want to show the pickup time on the receipt. I’ve tried a few things in the order-delivery file but either the whole website crashes or just nothing happens.
@ikbenphilip It’s very good to know that you are up and running now. Thanks for letting me know.
On this thread: https://ww.wp.xz.cn/support/topic/add-on-and-custom-field/ I provided a slightly modified plugin that can filter the extra data and described how to adjust the list of fields that are printed. It does require editing the php code directly, but I tried to make it as simple as possible.
The topic ‘Finds printer, doesn’t connect’ is closed to new replies.