p910nd - for print server

Re: p910nd - for print server

Postby fvdw » Thu Jan 19, 2012 10:36 pm

Just create an image of 1 GB, there will be no data lost on your disk. Later you can delete the image again. The disk image is nothing more then a special file.
There is no real need to connect something to the back side usb port, and no you must not disconnect the nwsp2 from the network (if you do that the web interface can not be used anymor).
After you have created the image do a manual switch from host mode (front port) to device mode(back side port) and back to host mode using the menu in the web interface and then check if your printer still works.
When the nwsp2 is in usb device mode the printer won't work as the front port usb is disabled. But it should come back online when switching back to host mode. The question is if the usblp module can be kept loaded or must be unloaded first to be able to switch to divice moe and then reloaded again when switching back to host mode. If this is the case then integration is more work.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: p910nd - for print server

Postby k2v1n » Fri Jan 20, 2012 5:58 pm

It works for me but there are a problem with the back usb port, it's unusable

Kévin
k2v1n
 
Posts: 12
Joined: Tue Aug 23, 2011 3:59 pm

Re: p910nd - for print server

Postby bozo29 » Fri Jan 20, 2012 6:41 pm

@ Kevin

Your back usb port, it's unusable, anyway, or only after you install p910nd?
Now I am back home and start doing tests.
I come back after I finish, with the result.
bozo29
 
Posts: 82
Joined: Mon Dec 12, 2011 6:53 pm
Location: Romania

Re: p910nd - for print server

Postby fvdw » Fri Jan 20, 2012 7:52 pm

think chance is big that we need to make some adaptations, probably the usblp module when loaded will prevent the unloading of the driver for front port usb, this is necessary before driver for back side port can be loaded.

You can see in Putty what is happening if you do a manual switch
Before doin the switch give command
Code: Select all
dmesg -c

The -c option will clear the cache and only new entries in this log will be shown when giving the dmesg command again.
Now perform the manul switch to device mode using the web interface and give in Putty again
Code: Select all
dmesg -c


You should get output like this
Code: Select all
root@fvdwsl-nwsp2:/ # dmesg -c
usbcore: deregistering interface driver usb-storage
orion-ehci orion-ehci.0: remove, state 1
usb usb1: USB disconnect, device number 1
orion-ehci orion-ehci.0: USB bus 1 deregistered
 switching from usb-host to usb-device mode
mv_usb_release
 orion-ehci unregistered
 fsl-usb2-udc registered
Freescale High-Speed USB SOC Device Controller driver (Apr 20, 2007)
fsl-udc-init call
executing fsl_udc_probe in fsl_udc_core.c
g_file_storage gadget: No serial-number string provided!
g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, nofua=0, file: /share/1000/disk.image.1
fsl-usb2-udc: bind to driver g_file_storage
root@fvdwsl-nwsp2:/ #


post the output you get here, possibly the orion-ehci unregistering will fail
If thats the case then loading the back side usb port drivers will fail as well

If this is the case try again but first unplug the usb printer and unload the usblp moudule using the command
Code: Select all
modprobe -r usblp


check with lsmod command if it is indeed no longer active

--edit

I just tried it myself, switch for host to devuice and back with a loaded usblp module but without an usb printer connected (as I don't have one) the switch worked ok, the usblp module remains loaded.
So the switch can be made with a loaded usblp module, please check if yes/no doing it with connected printer makes the difference
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: p910nd - for print server

Postby bozo29 » Fri Jan 20, 2012 9:14 pm

O.K. Sorry to have to repeat myself, but you did a great job with this firmware.
And now here's the test: works perfectly.
So....

I created a 4GB image, then I connected the laptop via USB on the back USB port of NSP2, while I was connected wirelessly to the web interface of NSP2.
I connected the printer on the front USB port of NSP2 (NSP2 is currently in host mode) and I printed 2 pages.
Then I changed from "host mode" in "device mode" and the image I created earlier It appeared as a hard drive in Windows Explorer.
I copied (in Windows Explorer) from the real Laptop's HDD to virtual HDD a file (1.4 GB) and copy speed was 4MB/s (32Mbps).
While I copy the file I did a print command and obviously did not work. Normal, as NSP2 was in "device mode".

But now comes the very pleasant surprise .... :shock:
After I copied the file, I changed back from "device to host mode" and after 2-3 seconds the printer started to print the pages sent to print before. :D

My conclusion is that things work properly.

Unfortunately I read what you wrote just after I finished the test and the printer is not connected now to NSP2 because it is in another room.
However, I did the test but without the printer being connected.
I do a manual switch and I give command "dmesg -c" and here is the result:

root@LACIE:/ # dmesg -c
usbcore: deregistering interface driver usb-storage
orion-ehci orion-ehci.0: remove, state 1
usb usb1: USB disconnect, device number 1
orion-ehci orion-ehci.0: USB bus 1 deregistered
switching from usb-host to usb-device mode
mv_usb_release
orion-ehci unregistered
fsl-usb2-udc registered
Freescale High-Speed USB SOC Device Controller driver (Apr 20, 2007)
fsl-udc-init call
executing fsl_udc_probe in fsl_udc_core.c
g_file_storage gadget: No serial-number string provided!
g_file_storage gadget: File-backed Storage Gadget, version: 1 September 2010
g_file_storage gadget: Number of LUNs=1
g_file_storage gadget-lun0: ro=0, nofua=0, file: /share/1000/disk.image.1
fsl-usb2-udc: bind to driver g_file_storage
root@LACIE:/ #

then manual switch back ......
root@LACIE:/ # dmesg -c
unregistered gadget driver 'g_file_storage'
setting fsl-udc controller to 0
fsl-udc-exit call
Freescale High-Speed USB SOC Device Controller driver unregistered
switching from usb-device to usb-host mode
mv_usb_release
fsl-usb2-udc unregistered
orion-ehci registered
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
orion-ehci orion-ehci.0: Marvell Orion EHCI
orion-ehci orion-ehci.0: new USB bus registered, assigned bus number 1
orion-ehci orion-ehci.0: irq 19, io mem 0xf1050000
orion-ehci orion-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: Marvell Orion EHCI
usb usb1: Manufacturer: Linux 2.6.39.4 ehci_hcd
usb usb1: SerialNumber: orion-ehci.0
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
FAT: utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!
root@LACIE:/ #


I can repeat the test if you think necessary and see what appears in the PuTTY when i give the command "dmesg -c" with the printer connected, but that tomorrow.
However, I am very pleased that the printer works. :D

In connection with the tutorial we talked about yesterday, I archive it "zip" and I'll upload it later tonight or tomorrow, because now I have something working.

I look forward to your conclusions about the test. :roll:
bozo29
 
Posts: 82
Joined: Mon Dec 12, 2011 6:53 pm
Location: Romania

Re: p910nd - for print server

Postby fvdw » Sat Jan 21, 2012 1:19 pm

the test is perfect boz029

nothing to be done in the switching programs. The usblp kernel module can stay loaded without a problem.
I know enough to add the feature in then next releae.

thanks very much for testing
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: p910nd - for print server

Postby bozo29 » Sat Jan 21, 2012 7:22 pm

No need to thank me, I thank you for will add the print server function in the next fvdw-sl firmware version.
I will upload here the tutorial on how to set the printer in Windows.

printer_setup.zip

In the "zip" archive you will find the following:

- A file "printer_setup_tutorial.pdf" - this is the tutorial as I make it.
- A folder "printer_setup_images" - here is the pictures; just in case you want to reedit this tutorial otherwise than I did.

Looking forward to hearing about the next fvdw-sl firmware. ;)

Good luck
You do not have the required permissions to view the files attached to this post.
bozo29
 
Posts: 82
Joined: Mon Dec 12, 2011 6:53 pm
Location: Romania

Re: p910nd - for print server

Postby fvdw » Sun Jan 22, 2012 3:08 pm

Thanks very much Bozo29 I will put this coming week in the download and development section together with the driver until it is integrated in the firmware. After integration the guide is still very useful how to make use of it, again thanks very much for your contribution
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Previous

Return to Lacie Network Space vs2 and max version

Who is online

Users browsing this forum: No registered users and 5 guests