RWAP Posted June 7, 2016 Posted June 7, 2016 I am working on a new project which uses the Banana Pi to capture USB output destined for a printer in order to log the output from a system.The BananaPi will need to be a simple plugin which sits between the machine and a connected USB printer - so we want to: a ) Mimic the connected USB printer (so that the machine thinks it still has the original printer attached)b ) Capture the output from the machinec ) Send the captured output onwards to the printer.The BananaPi seemed the obvious choice as it has the built in USB OTG port and we would use the gadget printer to mimic the attached printer. Unfortunately, the Bananian images do not support the gadget printer at all (even after configuring them for Banana Pi + OTG, the command modprobe g_printer returns an error.We therefore installed the Vanilla flavour of Jessie from Armbian, and modprobe g_printer now seems to work. However, there is no /dev/g_printer which we expected to see - is this now stored in a different place, or maybe we have missed something?
sascha2000 Posted June 7, 2016 Posted June 7, 2016 Hello, I am also trying to activate the g_printer gadget, sadly without success. I am using the latest "Jessie server" with the following kernel: Linux bananapipro 4.5.5-sunxi #10 SMP Mon May 23 22:10:54 CEST 2016 armv7l GNU/Linux When entering "modprobe g_printer idVendor=0x0525 idProduct=0xa4a8" the machine does not respond in a way, that implies an error. However after entering "dmesg" the following error apears: couldn't find an available UDC - added [printer] to list of pending drivers Has anyone here an Idea what the reason could be? Regards Sascha
sascha2000 Posted June 7, 2016 Posted June 7, 2016 I had now a look at "/boot/script.bin" using bin2fex from the sunxi-tools. The definition of usb port 0 seems to be ok, its set to OTG: [usbc0]usb_used = 1usb_port_type = 2usb_detect_type = 0usb_id_gpio = port:PH04<0><1><default><default>usb_det_vbus_gpio = "axp_ctrl"usb_drv_vbus_gpio = port:PB09<1><0><default><0>usb_ac_enable_gpio = port:PH05<1><0><default><0>usb_restrict_gpio = 0usb_host_init_state = 0usb_restric_flag = 0usb_restric_voltage = 3550000usb_restric_capacity = 5
Igor Posted June 7, 2016 Posted June 7, 2016 Those bin scripts are for old kernel series (3.4.x) ... for more success try to compile latest kernel 4.6.1 or even 4.7 RC2 and make sure to enable OTG in DTB. I am not sure it is on by default.
RWAP Posted June 9, 2016 Author Posted June 9, 2016 Well, I have tried to compile a new version of Armbian using the instructions at https://github.com/igorpecovnik/lib, although most of the OTG options in the standard bananapi configuration seem to be correct - I couldn't see anything in particular that was missing for installing g_printer. I tried compiling it in a virtual machine running Ubuntu 14.04 from http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/installer-i386/current/images/netboot/mini.iso because the AMD version would not install on my Windows machine (with an Intel processor)Unfortunately, the compilation process fails at the debootstrap stage - I caught a load of messages that it was trying to install missing kernel modules - presumably because it was looking for the AMD version in Ubuntu?
RWAP Posted June 9, 2016 Author Posted June 9, 2016 Hmm - maybe something wrong with the way I am setting up the installation - I created a new folder /bpi-sources which I then entered before using the git clone (otherwise it says it cannot do it as /lib already exists)...I have now tried using amazon web services and yet it still fails in the second stage of debootstrap "CHROOT failed to run command '/bin/bash' - no such file or directory""ERROR in create_rootfs_cache" bin/bash exists, so I am at a loss -The install log isdpkg-deb: building package `linux-u-boot-bananapi-next' in `linux-u-boot-next-bananapi_5.14_armhf.deb'.Displaying message: Started patching process for kernel sunxi-next 4.6.2 infoDisplaying message: Looking for user patches in userpatches/kernel/sunxi-next info/bpi-sources/lib/patch/kernel/sunxi-next/0010-bananapi_m1_plus_dts.patch sunxi-next 4.6.2Displaying message: ... 0010-bananapi_m1_plus_dts.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/axp20x-sysfs-interface.patch sunxi-next 4.6.2Displaying message: ... axp20x-sysfs-interface.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/b53_switch.kernel_4.5+.patch sunxi-next 4.6.2Displaying message: ... b53_switch.kernel_4.5+.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/bananapipro-wifi-codec-led-fix.patch sunxi-next 4.6.2Displaying message: ... bananapipro-wifi-codec-led-fix.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/bash_to_afterinstall.patch sunxi-next 4.6.2Displaying message: ... bash_to_afterinstall.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/cubieboard_enable_mmc0_trigger_to_green_LED.patch sunxi-next 4.6.2Displaying message: ... cubieboard_enable_mmc0_trigger_to_green_LED.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/cubietruck-enable-uart2.patch sunxi-next 4.6.2Displaying message: ... cubietruck-enable-uart2.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/cubietruck_enable_mmc0_trigger_to_green_LED.patch sunxi-next 4.6.2Displaying message: ... cubietruck_enable_mmc0_trigger_to_green_LED.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/linux-vanilla_v4.5.1_sun7i-a20-bananapro_dts.patch sunxi-next 4.6.2Displaying message: ... linux-vanilla_v4.5.1_sun7i-a20-bananapro_dts.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/packaging-4.x-NEXT-with-postinstall-scripts.patch sunxi-next 4.6.2Displaying message: ... packaging-4.x-NEXT-with-postinstall-scripts.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/spi_allow_transfer_larger.patch sunxi-next 4.6.2Displaying message: ... spi_allow_transfer_larger.patch succeeded info/bpi-sources/lib/patch/kernel/sunxi-next/support_for_second_mmc_cubieboard2.patch sunxi-next 4.6.2Displaying message: ... support_for_second_mmc_cubieboard2.patch succeeded infoDisplaying message: Compiling next kernel 4.6.2 infoDisplaying message: Compiler version arm-linux-gnueabihf-gcc 4.8 infoDisplaying message: Using kernel config file lib/config/kernel/linux-sunxi-next.config infoDisplaying message: Creating board support package bananapi infoDisplaying message: Fingerprinting Armbian 5.14 Bananapi Debian jessie next infoDisplaying message: Building package linux-jessie-root-next-bananapi infoDisplaying message: Starting build process for bananapi jessie infoDisplaying message: Creating new rootfs for jessie infoDisplaying message: Installing base system Stage 1/2 infoDisplaying message: Installing base system Stage 2/2 infoDisplaying message: ERROR in function create_rootfs_cache debootstrap-ng.sh:163 err
RWAP Posted June 9, 2016 Author Posted June 9, 2016 Ah I can at least get past this issue now - the compile.sh is missing the command to make the /debootstrap directory if it does not already exist....Igor, that is a minor update which is required
Igor Posted June 9, 2016 Posted June 9, 2016 Try removing output/cache. It looks like deboostrap process was not successful ... or rather remove everything and start over. In general avoid to touch anything under lib or structure wise if you are not familiar with the tool.
RWAP Posted June 9, 2016 Author Posted June 9, 2016 Try removing output/cache. It looks like deboostrap process was not successful ... or rather remove everything and start over. In general avoid to touch anything under lib or structure wise if you are not familiar with the tool. The cache was empty (apart from 2 empty folders) at this point. Creating the /debootstrap directory has resolved the problem (I can at least now see the sd card image in the cache/sdcard folder)
RWAP Posted June 9, 2016 Author Posted June 9, 2016 Drat it got all the way to the end and then failed - hostapd.log:Building hostapdfatal: write error: No space left on devicecan't find file to patch at input line 3Perhaps you used the wrong -p or --strip option?The text leading up to this was:--------------------------|--- a/hostapd/config_file.c|+++ b/hostapd/config_file.c--------------------------No file to patch. Skipping patch.1 out of 1 hunk ignoredcan't find file to patch at input line 14Perhaps you used the wrong -p or --strip option?The text leading up to this was:--------------------------|--- a/src/ap/ap_config.h|+++ b/src/ap/ap_config.h--------------------------No file to patch. Skipping patch.1 out of 1 hunk ignoredcan't find file to patch at input line 24Perhaps you used the wrong -p or --strip option?The text leading up to this was:--------------------------|--- a/src/ap/hw_features.c|+++ b/src/ap/hw_features.c--------------------------No file to patch. Skipping patch.1 out of 1 hunk ignoredcan't find file to patch at input line 35Perhaps you used the wrong -p or --strip option?The text leading up to this was:--------------------------|--- a/src/ap/ieee802_11_ht.c|+++ b/src/ap/ieee802_11_ht.c--------------------------No file to patch. Skipping patch.2 out of 2 hunks ignored/bin/bash: line 0: cd: /tmp/hostap/hostapd: No such file or directorymake: *** No rule to make target 'clean'. Stop./bin/bash: line 0: cd: /tmp/hostap/hostapd: No such file or directorymake: *** No targets specified and no makefile found. Stop.I guess after all that, the 8GB disk space provided free on Amazon AWS for free is just not enough space... Any chance the script could check if there is enough storage before running through the compile process?
Igor Posted June 9, 2016 Posted June 9, 2016 20G or more is recommended. You can go with less, but than you need to be more careful, making no mistakes. For illustration - only sources and cache for everything is around 30G. One image is up to 500Mb compressed ...
RWAP Posted June 10, 2016 Author Posted June 10, 2016 Well I eventually managed to compile the image last night - learning points are:a) Instructions on the github need to warn users that it needs to be compiled under an ARM environment, so if doing so on an Intel chip, ensure that you have enabled Virtualisation in the BIOS (if supported by your chip). Add a check that there is enough disk space before starting the compile.sh (or at least add a warning that 20GB hard disk is required). c) Alter the scripts to check and if necessary create the /bootstrap directory.Anyway, after recompiling and enabling most of the options for OTG, I can confirm that g_printer is now working properly - although if you enable the v2 USB OTG Gadgets, then instead of creating a virtual file - /dev/g_printer, it is now /dev/g_printer0 (ie followed by a number in case you have more than one OTG socket).One slight issue I have found is that the machine hangs when I try to do a reboot over SSH - I have to turn it off and back on again.Any ideas?
Igor Posted June 10, 2016 Posted June 10, 2016 Well, this is bleeding edge kernel. Bugs are more than expected - hard to tell what is wrong without serious debugging. I know that instructions are not the best, but we are working on it all the time. I never thought that we must be more detailed in this - I assume people know how to handle some virtual machine and install Ubuntu Linux on their desktop machine. We give only most important information, but all aspects are surely not covered. Lately we even address community to help us on making better manuals since it's getting too much for a small crew. We even arrange one cool board as a reward. Nevertheless things are working for your intention! 1
lauramari Posted September 9, 2016 Posted September 9, 2016 Hi, I'm working on a project very similar to yours. Instead of Banana Pi, I use a Udoo Neo board. The gadget printer is running on the Kernel Linux Sunxi 3.4. The Udoo Neo board is connected to the computer with OTG port. Everything is OK when the computer is running on Linux, when it's Windows, the connection between Udoo and Computer fails. We tried with a USB analyseur, we saw Windows is sending a request to the Udoo board, but there is no answer. I think it's exactly the problem you meet, have you found a solution?
RWAP Posted September 9, 2016 Author Posted September 9, 2016 We have recently got this working on the BananaPi - it takes a lot of setting up to do this.DId you checkdmesg | grep printer to see if the g_printer module is correctly set up and running (that is the first issue).What parameters are you then passing (if any) to do the modprobe g_printer command?
lauramari Posted September 12, 2016 Posted September 12, 2016 Thank you for your reply! We checked the dmesg, see below message. dmesg : [ 346.059459] printer gadget: printer ready [ 346.568268] printer gadget: high-speed config #1: printer [ 346.573746] printer gadget: Using interface 0 [ 346.578872] printer gadget: Using interface 0 [ 351.650717] printer gadget: Using interface 0 The parameters we are passing with modprobe g_printer are: modprobe g_printer idVendor=0x04b8 idProduct=0x0e15 bcdDevice=256 iManufacturer="EPSON" iProduct="TM-T20II" iSerialNum =544338460492160000 iPNPstring="MFG:EPSON;CMD:ESC/POS;MDL:TM-T20II;CLS:PRINTER;DES:EPSON TM-T20II;CID:EpsonTM00001002; When the Windows sends a printing order to the board, we see the paquet "BULK_OR_INTERRUPT" with a USB analyser, then nothing happen. Do you know where we have to do the setting? Thank you very much!
RWAP Posted September 12, 2016 Author Posted September 12, 2016 That looks about correct - although the iSerialNum is better in quotes.We then use the capture routine by Craig Nadler which you can find at:https://www.kernel.org/doc/Documentation/usb/gadget_printer.txtI guess your problem is that Linux is not telling Windows that the printer is available for printing....
lauramari Posted September 13, 2016 Posted September 13, 2016 Thank you very much for your help! We saw this page before, but for sure we didn't done properly the work. We will try again. Just to make sure with you, your project is working with windows? It's really strange for us, because we can capture the data from MAC, but not Windows. We will continue to investigate. Thanks!
RWAP Posted September 13, 2016 Author Posted September 13, 2016 Yes my application works with the BananaPi connected to Windows - it could of course be a difference between the BananaPi and the Udoo Neo board.
lauramari Posted September 14, 2016 Posted September 14, 2016 Thank you for the precision. Yesterday I tried with a Orange PI PC board, but I got the same behavior as Udoo, nothing happened with Windows. The Orange PI PC is like BananaPI, it's using Allwinner's chip, H3 for Orange PI PC and A20 for BananaPI. Can you tell me which version of Linux kernel are you using? is it Linux Sunni 3.4.x or 4.x? I tried with Linux Xunxi 3.4.39 and 4.7.3 on Orange PI PC. Since I don't know which gadget driver to use, I find the list of gadget driver in the kernel, and I did "modprobe" with each of them, but no result. Do you have any clue? thanks,
lauramari Posted September 14, 2016 Posted September 14, 2016 Hi, in addition to my previous message, I’d like to add more precision. I tried with Linux Sunxi 3.4.39 and 4.7.3 on the Orange PI. I understood that we need to load a USB device controller and after a gadget printer driver. When I do "modprobe net2280", it says it doesn’t exist. Could you please tell us which Device Controller that you loaded ? If we don't know the name of the Device controller, where we can find it? And what are the other settings you did ? Thank you very much !
RWAP Posted September 14, 2016 Author Posted September 14, 2016 I obviously spoke too soon - whilst it was working this weekend, today, it has stopped being recognised as the original printer.We did not install a device controller, but you can see from the dmesg screen dump below, what modules are enabled.The image was based on 4.6.3-sunxiThere is also a warning message in dmesg which is puzzling - I am sure that was not there last weekend when the device worked properly (although I might have missed it)...:Any suggestions as to what causes this warning - interceptor is my own C program ?
RWAP Posted September 14, 2016 Author Posted September 14, 2016 I have resolved the warning in dmesg by adding a sleep command in my shell script after I call the modprobe g_printer, and before I launch my interceptor program (based on the prn_example).However, I still can't get Windows 10 to recognise the device as the printer (still reports printer not available) like it did on the weekend....USB Treeview shows: Device Descriptor: bcdUSB: 0x0200 bDeviceClass: 0x00 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x40 (64) idVendor: 0x154F idProduct: 0x0517 bcdDevice: 0x01F0 iManufacturer: 0x01 0x0409: "BEIYANG" iProduct: 0x02 0x0409: "" iSerialNumber: 0x03 bNumConfigurations: 0x01 ConnectionStatus: DeviceConnected Current Config Value: 0x01 Device Bus Speed: High Device Address: 0x05 Open Pipes: 2 Endpoint Descriptor: bEndpointAddress: 0x81 IN Transfer Type: Bulk wMaxPacketSize: 0x0200 (512) bInterval: 0x00 Endpoint Descriptor: bEndpointAddress: 0x01 OUT Transfer Type: Bulk wMaxPacketSize: 0x0200 (512) bInterval: 0x00 Configuration Descriptor: wTotalLength: 0x0023 bNumInterfaces: 0x01 bConfigurationValue: 0x01 iConfiguration: 0x00 bmAttributes: 0xE0 (Bus Powered Self Powered Remote Wakeup) MaxPower: 0x01 (2 Ma) Unknown Descriptor: bDescriptorType: 0x09 bLength: 0x03 03 09 03 Interface Descriptor: bInterfaceNumber: 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x02 bInterfaceClass: 0x07 bInterfaceSubClass: 0x01 bInterfaceProtocol: 0x02 iInterface: 0x00 Endpoint Descriptor: bEndpointAddress: 0x81 IN Transfer Type: Bulk wMaxPacketSize: 0x0200 (512) bInterval: 0x00 Endpoint Descriptor: bEndpointAddress: 0x01 OUT Transfer Type: Bulk wMaxPacketSize: 0x0200 (512) bInterval: 0x00
RWAP Posted September 14, 2016 Author Posted September 14, 2016 Compare that to the USB Treeview for the actual USB printer when connected directly: Device Descriptor: bcdUSB: 0x0110 bDeviceClass: 0x00 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x40 (64) idVendor: 0x154F idProduct: 0x0517 bcdDevice: 0x01F0 iManufacturer: 0x01 0x0409: "BEIYANG" iProduct: 0x02 iSerialNumber: 0x00 bNumConfigurations: 0x01 ConnectionStatus: DeviceConnected Current Config Value: 0x01 Device Bus Speed: Full Device Address: 0x06 Open Pipes: 3 Endpoint Descriptor: bEndpointAddress: 0x02 OUT Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x01 Endpoint Descriptor: bEndpointAddress: 0x82 IN Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x01 Endpoint Descriptor: bEndpointAddress: 0x85 IN Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x01 Configuration Descriptor: wTotalLength: 0x0027 bNumInterfaces: 0x01 bConfigurationValue: 0x01 iConfiguration: 0x00 bmAttributes: 0xC0 (Bus Powered Self Powered ) MaxPower: 0x32 (100 Ma) Interface Descriptor: bInterfaceNumber: 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x03 bInterfaceClass: 0x07 bInterfaceSubClass: 0x01 bInterfaceProtocol: 0x02 iInterface: 0x00 Endpoint Descriptor: bEndpointAddress: 0x02 OUT Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x01 Endpoint Descriptor: bEndpointAddress: 0x82 IN Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x01 Endpoint Descriptor: bEndpointAddress: 0x85 IN Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x01 Any suggestions as to how I get iProduct to be the same ( I pass a null character for this, in the same way as I do for iSerialNumber)
lauramari Posted September 15, 2016 Posted September 15, 2016 I have the same result as you when I do the USB Treeview. It's very strange that it worked once for you and then it failed. I don't have idea for the moment. I will continue to investigate.
RWAP Posted September 15, 2016 Author Posted September 15, 2016 I have the same result as you when I do the USB Treeview. It's very strange that it worked once for you and then it failed. I don't have idea for the moment. I will continue to investigate. Which printer are you using? Even more oddly I sent the image dump of my SD card to my customer to try on their computer with similar SNBC printer and it worked. I wonder if it is something in the Windows 10 update which was installed this week which has prevented it working...
lauramari Posted September 17, 2016 Posted September 17, 2016 I tried 2 printers : Epson TM and HP Officejet. I'm using an image generated by https://github.com/igorpecovnik/lib The kernel 4.x is complied with g_printer, configfs. I did the USBView of the 2 tests (test 1 : Windows 10 <-> Printer ; test 2: Windows <-> Orange PI with g_printer) The difference between the 2 tests are the speed, the bloc « Unknown Descriptor », and the number of endpoints, one is 0x81, one is 0,82. Below are the 2 USBTree: Test 1 : Device Descriptor: bcdUSB: 0x0200 bDeviceClass: 0x00 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x40 (64) idVendor: 0x04B8 (Seiko Epson Corp.) idProduct: 0x0E15 bcdDevice: 0x0100 iManufacturer: 0x01 0x0409: "EPSON" iProduct: 0x02 0x0409: "TM-T20II" iSerialNumber: 0x03 0x0409: "544338460492160000" bNumConfigurations: 0x01 ConnectionStatus: DeviceConnected Current Config Value: 0x01 Device Bus Speed: Full Device Address: 0x08 Open Pipes: 2 Endpoint Descriptor: bEndpointAddress: 0x01 OUT Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x00 Endpoint Descriptor: bEndpointAddress: 0x82 IN Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x00 Configuration Descriptor: wTotalLength: 0x0020 bNumInterfaces: 0x01 bConfigurationValue: 0x01 iConfiguration: 0x00 bmAttributes: 0xC0 (Bus Powered Self Powered ) MaxPower: 0x01 (2 Ma) Interface Descriptor: bInterfaceNumber: 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x02 bInterfaceClass: 0x07 bInterfaceSubClass: 0x01 bInterfaceProtocol: 0x02 iInterface: 0x00 Endpoint Descriptor: bEndpointAddress: 0x01 OUT Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x00 Endpoint Descriptor: bEndpointAddress: 0x82 IN Transfer Type: Bulk wMaxPacketSize: 0x0040 (64) bInterval: 0x00 Test 2: Device Descriptor: bcdUSB: 0x0200 bDeviceClass: 0x00 bDeviceSubClass: 0x00 bDeviceProtocol: 0x00 bMaxPacketSize0: 0x40 (64) idVendor: 0x04B8 (Seiko Epson Corp.) idProduct: 0x0E15 bcdDevice: 0x0100 iManufacturer: 0x01 0x0409: "EPSON" iProduct: 0x02 0x0409: "TM-T20II" iSerialNumber: 0x03 0x0409: "544338460492160000" bNumConfigurations: 0x01 ConnectionStatus: DeviceConnected Current Config Value: 0x01 Device Bus Speed: High Device Address: 0x09 Open Pipes: 2 Endpoint Descriptor: bEndpointAddress: 0x81 IN Transfer Type: Bulk wMaxPacketSize: 0x0200 (512) bInterval: 0x00 Endpoint Descriptor: bEndpointAddress: 0x01 OUT Transfer Type: Bulk wMaxPacketSize: 0x0200 (512) bInterval: 0x00 Configuration Descriptor: wTotalLength: 0x0023 bNumInterfaces: 0x01 bConfigurationValue: 0x01 iConfiguration: 0x00 bmAttributes: 0xC0 (Bus Powered Self Powered ) MaxPower: 0x01 (2 Ma) Unknown Descriptor: bDescriptorType: 0x09 bLength: 0x03 03 09 03 Interface Descriptor: bInterfaceNumber: 0x00 bAlternateSetting: 0x00 bNumEndpoints: 0x02 bInterfaceClass: 0x07 bInterfaceSubClass: 0x01 bInterfaceProtocol: 0x02 iInterface: 0x00 Endpoint Descriptor: bEndpointAddress: 0x81 IN Transfer Type: Bulk wMaxPacketSize: 0x0200 (512) bInterval: 0x00 Endpoint Descriptor: bEndpointAddress: 0x01 OUT Transfer Type: Bulk wMaxPacketSize: 0x0200 (512) bInterval: 0x00
lauramari Posted September 17, 2016 Posted September 17, 2016 I tried to build the kernel with the speed 64 instead of 512, nothing happened. I tried to install different UDC driver controller and recomplied the kernel, it didn't work. Can you please tell me what was your procedure to compile the kernel, maybe there are some settings that we forgot to do.
RWAP Posted September 17, 2016 Author Posted September 17, 2016 Unfortunately, I am not sure what settings I used to compile the kernel (it was based on the same download as you used) - I simply enabled what seemed to be obvious requirements for the gadget printer and it worked - I have since tried to recompile it, but could not get the compiled version to install the g_printer device, so there was something I missed. Is there any way of discovering what settings were used? Have you tried reinstalling the printer driver under Windows once you connect the Orange Pi and/or changing the port used for the printer? With the SNBC printer, this seemed necessary - possibly because they install their own virtual printer (instead of using the standard Windows USB0001 virtual printer)!
lauramari Posted September 19, 2016 Posted September 19, 2016 To get the settings that you used to build your image, you can consult from your image: /usr/src/linux-headers-$(uname -r)/.config Can you please send me you .config? I can compare with mine and give you feedback. Thanks,
Recommended Posts