loader image

Synology USB Printer Configure

What makes us different from other similar websites? Forums Tech Synology USB Printer Configure

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #8041
    thumbtak
    Keymaster
    1. Login via browser, to Synology NAS
    2. Click Control Panel
    3. Click File Services
    4. Search SSH
    5. Check Enable SSH service
    6. Click Apply
    7. Close Control Panel
    8. Open File Station
    9. Click home
    10. Click Create
    11. Click Create Folder
    12. Name it Script
    13. Click OK
    14. Click Script
    15. On your computer, Open Notepad or Mousepad
    16. Paste the following code:
      #!/bin/sh
      docker run -d \--name=p910nd \--privileged \-p 9100:9100 \-v /dev/usb/lp0:/dev/usb/lp0 \justinhimself/p910nd:latest '-b' '-d' '-f' '/dev/usb/lp0'
    17. Save as printer_configure.sh
    18. Drag file to the Script folder you created on your NAS
    19. Open Package Center
    20. Click All Packages
    21. Search for Container Manager
    22. Install Container Manager
    23. Open Container Manager
    24. Click Registry
    25. Search for p910nd
    26. Download justinhimself/p910nd
    27. Close Container Manager
    28. Open Command Prompt or Terminal
    29. Type ssh username@port and when asked enter your password
    30. Type cd /dev/usb/lp0
      If found, the printer should be able to be configured.
    31. Type exit
    32. Type ssh username@port and when asked enter your password
    33. Type cd Script
    34. Type chmod +x printer_configure.sh
    35. Type bash printer_configure.sh
      At this point, it should create a Container called p910nd
    36. Add the network printer on your system at NAS IP address
      If it prints the page , after adding it, all is fine, until you restart your NAS
    37. Go to your NAS
    38. Click Control Panel
    39. Click Task Schedular
    40. Click Create
    41. Click Scheduled Task
    42. Click User-defined script
    43. Task name Printer-Restart
    44. Click Schedule
    45. Set Repeat Daily
    46. Start time of your choice
    47. Check Continue running within the same day
    48. Repeat Every hour
    49. Last run time of your choice
    50. Click Task Settings
    51. Paste the following code in User-defined script
      #!/bin/shLOG="/var/log/p910nd.log"echo script started at \date +%Y-%m-%d\ %H:%M\ >> $LOG/usr/local/bin/inotifywait -m -e create --include 'usb' /dev | while read changed; do /usr/local/bin/docker restart p910nd ; echo [\date +%Y-%m-%d\ %H:%M\] restarting p910nd >> $LOG; done
    52. Click OK
    53. Click Apply
    54. Close Control Panel
    55. Click Control Panel
    56. Click File Services
    57. Search SSH
    58. Uncheck Enable SSH service
    59. Now the code above (in step 51) should restart the printer when you power off the device and the first script (in step 16) can be deleted, if you want.
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.
TAKs Shack