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: