We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

Print Server



  • @fossette Thank you for the encouragement.

    I have been looking into the openwrt OS abit and found the p910nd package. Seems like it could handle the task. Will be experimenting a bit when I am free.

    As for the hardware side, after looking into the schematics of the expansion dock. It will seem like a direct connection to the USB data pins will be a feasible idea. I will have to provide a regulated 5V tho. Or could anyone tell me if the 5V is need?


  • administrators

    Setting up p910dn on Omega2 is pretty straightforward. The trick is to properly configure your computer printer settings.

    First make sure your Omega2 is at the latest firmware. (usb printer driver is included)
    Once the printer is plugged in to Omega's USB host port you should be able to see it under /dev/usb/lp0

    Next install p910nd daemon

    opkg update
    opkg install p910nd
    

    Once installed, edit the configuration file /etc/config/p910nd

    config p910nd
            option device        /dev/usb/lp0
            option port          0
            option bidirectional 1
            option enabled       1
    

    Restart p910nd

    /etc/init.d/p910nd restart
    

    now you are done with the setup on Omega2 side


    To add the printer to your computer use the following steps:
    (credit: the following is taken from OpenWRT forum)

    OS X

    • select system preferences
    • Print & Fax
    • Click on + button
    • Click on IP Printer
    • set Protocol: HP Jet Direct - Socket, Address: : and then select brand and printer.
    • Type a name if you don't want the IP address for a name.
      close the Printer Browser.

    Windows

    • Click on the Start button and select Devices and Printers.
    • Click on "Add a printer."
    • In the Add Printer dialog select "Add a local printer."
    • Select "Create a new port:" and set the type of port to "Standard TCP/IP Port". Then click Next.
    • In the "Hostname or IP address:" field enter the IP address of your router.
    • The "Port name:" field may be set to something you like.
    • De-select "Query the printer and automatically select the driver to use," then click next.
    • The computer will then attempt to detect the TCP/IP port. This will take some time and will most likely fail. Failing this step is not a problem.
    • On the "Additional port information required" page set the device type to Custom and click "Settings…"
    • Verify the Printer Name or IP Address. The Protocol should be set to "Raw" and the Raw Settings Port Number should be 9100. Leave LPR Settings and SNMP Status Enabled empty or de-selected. Then click OK.
    • Select the correct printer driver and click next. You may need to install drivers if they are not already available.
    • Finish the remaining printer installation wizard steps as needed. The printer should now be installed and working!


  • @Zheng-Han the p910nd daemon cannot be found in the onion repo. Will it be fine if I take the ipk package file from another wrt branch?


  • administrators

    you can enable defualt LEDE repos by editing /etc/opkg/distfeeds.conf

    here is a sample of my configuration

    src/gz reboot_core http://downloads.lede-project.org/snapshots/targets/ramips/mt7688/packages
    src/gz reboot_base http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/base
    src/gz reboot_packages http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages
    src/gz omega2_core http://repo.onion.io/omega2/packages/core
    src/gz omega2_base http://repo.onion.io/omega2/packages/base
    src/gz omega2_packages http://repo.onion.io/omega2/packages/packages
    src/gz omega2_onion http://repo.onion.io/omega2/packages/onion
    


  • @Zheng-Han Thanks I managed to get it to work! Awesome. Below will detail the steps I took.

    1. Change root Password:
      passwd

    2. Enable Default LEDE repo:
      vi /etc/opkg/distfeeds.conf
      src/gz reboot_core http://downloads.lede-project.org/snapshots/targets/ramips/mt7688/packages
      src/gz reboot_base http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/base
      src/gz reboot_packages http://downloads.lede-project.org/snapshots/packages/mipsel_24kc/packages

    3. Update USB-Essentials
      opkg update
      opkg install kmod-usb2 --force-depends

    4. Enable TCP Port 9100
      vi /etc/config/firewall
      #Allow attached network printer
      config rule
      option src 'apcli0'
      option proto 'tcp'
      option dest_port '9100'
      option target 'ACCEPT'

    5. Update USB Printer Driver
      opkg [code]upgrade kmod-usb-printer --force-depends

    6. Plug In Printer and Check if is Connected
      Look for /dev/usb/lp0

    7. Install p910nd daemon
      opkg install p910nd

    8. Configure daemon
      vi /etc/config/p910nd
      config p910nd
      option device /dev/usb/lp0
      option port 0
      option bidirectional 1
      option enabled 1

    9. Restart daemon
      /etc/init.d/p910nd restart



  • Would be nice if this Tutorial finds the way in to the manual or wiki.
    @Andy-Liu if you have github you could propose as pull request.



  • @Andy-Liu was it an O, O2 or 2+?



  • This post is deleted!


  • Can you print from an iPhone or Android using this setup?



  • @Luciano-S I don't have a github or anything. Maybe you can help set it up?
    @Costas-Costas I was using a O2 but i dont see why it will not work for the rest of the series.
    @James-Harding I didn't really meant it for printing from a phone. But it is a good idea. Will look into it when I have more time. Work for me this month is really pilling up.



  • @Andy-Liu said in Print Server:

    @Luciano-S I don't have a github or anything. Maybe you can help set it up?

    Sign up by Github:
    https://help.github.com/articles/signing-up-for-a-new-github-account/

    if you are completely new to git .. read the presentation mentioned in the link below:
    http://product.hubspot.com/blog/git-and-github-tutorial-for-beginners

    How to create the first Repository:
    https://help.github.com/articles/create-a-repo/

    And how to format with Markdown:
    https://community.onion.io/topic/707/markdown-how-to-start-with-it

    If you went thru everything you are ready to contribute on github 😉



  • @Luciano-S. okayz! will look into it when I am free. Thanks!



  • Hey there,

    thanks for the good explanation on how to run p910nd on an Omega!
    I have the Omega2+, and I am trying to get my printer (Samsung ml-2850d) running with p910nd. I have a USB cable soldered directly to the Omega2 as power supply with a 3.3V voltage regulator inbetween. Then I connect the printer via USB directly to the D- and D+ pins of the Omega2 board (pin out).
    The problem is, that I do not see my printer under /dev/usb/. I am not sure whether the printer needs the gnd and v+ connection from the board to be recognized or if it's not supported?

    Cheers
    Nils



  • @Nils-Flaschel I am not sure as I have not done with physical wiring to the board. I am using a dock currently. Will be looking to remove the dock when I have time to figure everything out. You could try providing a 5V to V+ and ground to V-.



  • Hi!

    When I try to

     opkg install p910nd
    

    it says :

    Unknown package 'p910nd'.
    
    
    Collected errors:
    
     * opkg_install_cmd: Cannot install package p910nd.
    

    Why is this like that. I would like to build a print server with my Omega 2. My Router runs DD-WRT





  • Hello,

    i tried to get the printer server online but I always get the error: usblp module was not found while installing the kmod-usb2.
    Has the kernel been changed? I thought it should have the usb printer support activated...

    (I'm using a Omega2 for this project)



  • Any way we can get it to work with other printers too? or maybe compile cups for the omega?



  • @Andy-Liu said in Print Server:

    opkg install kmod-usb2 --force-depends

    Hi, I tried to follow your steps but getting stuck at the installation of kmod-usb2 and kmod-usb-printer. I am using Omega2+.

    The same error message:
    pkg_run_script: package "kmod-usb-printer" postinst script returned status 255.
    opkg_configure: kmod-usb-printer.postinst returned 255.

    Any suggestions?



  • /dev/usb/lp0 won't show up for me.

    kmod-usb2 and kmod-usb-printer are installed

    Unplugging/plugging printer cable yields:

    [ 1441.830049] usb 2-1: USB disconnect, device number 4
    [ 1446.755533] usb 2-1: new full-speed USB device number 5 using ohci-platform
    

    Was working until I rebooted the device. Any clues?

    EDIT: OK, this was incredibly nasty, but this is how you fix it:

    wget these two:

    http://repo.onion.io/omega2/packages/core/kmod-usb2_4.4.46-1_mipsel_24kc.ipk
    http://repo.onion.io/omega2/packages/core/kmod-usb-printer_4.4.46-1_mipsel_24kc.ipk
    

    Then opkg install both of them by filename, using the --force-depends option

    It seems the LEDE repo feeds, while an interesting idea, might be too much of a moving target. Even the .ipks downloaded from the links above are not an exact match for the kernel, but on my system close enough to make things work.


Log in to reply
 

Looks like your connection to Community was lost, please wait while we try to reconnect.