Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to Open Port via Ethernet only with weird checkStatus result #64

Open
javascripter opened this issue Sep 24, 2020 · 1 comment
Open

Comments

@javascripter
Copy link

javascripter commented Sep 24, 2020

First thanks for this wonderful library. I've successfully implemented printing functionality for MCP31LB (mC-Print3) using portDiscovery() and print() function via Bluetooth and Lightning on iPad.

  1. When I try to find my printer connected to a WiFi router using portDiscovery(), it returns an empty array on some routers and in some other routers, it does return an array containing a correct IP address (ex. TCP: 192.168.86.xx).

Maybe it's related to some router configuration, but I'm not sure what to look for.

  1. In the latter case, print() fails with status code Failed to Open Port even with the result returned by portDiscovery(). If I do checkStatus(),
{
  "overTemp": false,
  "cutterError: false,
  "coverOpen": true,
  "offline": false,
  "receiptPaperEmpty": false
}

result is lacking firmware version (maybe getting firmware version failed?), and somehow coverOpen returns true though it's not.

My code is like this.

StarPRNT.checkStatus('TCP:192.168.86.xx', 'StarPRNT')

If I connect via Bluetooth, the result of checkStatus() looks correct with the following:

{
    "coverOpen": false,
    "overTemp": false,
    "ModelName": "mC-Print3",
    "FirmwareVersion": :3.1",
    "offline": false,
    "receiptPaperEmpty": false,
    "cutterError": false,
  }

I'm not sure what's happening here, also not sure where to look for either..

If anyone knows what the cause of this could be, I'd really appreciate some help/information.

@javascripter
Copy link
Author

I fixed it by updating the SDKs to the latest ones and created a pull request for this. Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant