hardware:hp2101nw_wlan_printserver
Unterschiede
Hier werden die Unterschiede zwischen zwei Versionen angezeigt.
Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung | ||
hardware:hp2101nw_wlan_printserver [2011/12/13 23:32] – reinhold | hardware:hp2101nw_wlan_printserver [2013/03/13 10:42] (aktuell) – Externe Bearbeitung 127.0.0.1 | ||
---|---|---|---|
Zeile 574: | Zeile 574: | ||
===== Network communication protocol (USB port forwarding over WLAN) ===== | ===== Network communication protocol (USB port forwarding over WLAN) ===== | ||
+ | |||
+ | |||
+ | There are three different types of communications: | ||
+ | - Device information requests: UDP port 34444 (data format: " | ||
+ | - Detection, configuration and locking: TCP & UDP port 34447 (data format: " | ||
+ | - USB over TCP: TCP port 34448 (data format: [type][18byte header], Response " | ||
+ | |||
+ | |||
* TCP Ports 34447, 34448 and 34450 are open and used | * TCP Ports 34447, 34448 and 34450 are open and used | ||
* UDP Ports 34444 and 34447 are used for discovery broadcast and other device communication | * UDP Ports 34444 and 34447 are used for discovery broadcast and other device communication | ||
- | There are to different types of communications: | ||
- | - communication with the print server for configuration / printer detection and locking | ||
- | - communication with the printer trough the print server | ||
=== General communication packet structure for print server communication === | === General communication packet structure for print server communication === | ||
Zeile 622: | Zeile 627: | ||
| 0x0001 | | 0x0001 | ||
| 0x0007 | | 0x0007 | ||
+ | |||
+ | === USB over TCP packet structure (TCP port 34448) === | ||
+ | |||
+ | The USB over TCP communication with the printer uses TCP port 34448. | ||
+ | |||
+ | Example: | ||
+ | 0b 00 02 00 00 00 00 01 00 00 00 00 12 00 00 00 ........ ........ | ||
+ | 00 00 00 00 01 00 00 00 ........ | ||
+ | 52 42 52 55 12 00 00 00 02 00 00 00 00 00 00 00 RBRU.... ........ | ||
+ | 01 00 00 00 12 01 00 02 00 00 00 40 2b 13 89 20 ........ ...@ .. | ||
+ | 00 01 01 02 03 01 ...... | ||
+ | |||
+ | The packets sent to the printer have a length of 24 bytes, first byte seems to be the command. After the header comes the actual USB packet contents (empty for USB control calls). | ||
+ | |||
+ | ^ bytes ^ description ^ | ||
+ | | 0 | command: 0x00=GET interface information (FIXME), 0x09=BULK FIXME, 0x0b=GET DESCRIPTOR, 0x1b=URB_CONTROL In | | ||
+ | | 1-5 | FIXME: UNKNOWN | | ||
+ | | 3 | For GET interface information: | ||
+ | | 6 | For GET DESCRIPTOR: DESCRIPTOR index, Otherwise: FIXME UNKNOWN | | ||
+ | | 7 | For GET DESCRIPTOR: DESCRIPTOR type (0x01=DEVICE, | ||
+ | | 8-9 | FIXME: UNKNOWN, for URB_CONTROL In: wValue, for STRING DESCRIPTOR: languageId | | ||
+ | | 10-11 | FIXME: UNKNOWN, for URB_CONTROL In: wIndex | | ||
+ | | 12-15 | For GET DESCRIPTOR: expected data length (excluding response header), URB_CONTROL In: URB length or wLength, little endian | | ||
+ | | 16-19 | serial (little endian): sometimes 0x00000000, mostly equal to bytes 20-23 | | ||
+ | | 20-23 | serial (little endian): Incremented with each USB command | | ||
+ | The resonse packets will quote bytes 16-23 (even if 16-19 is 0x00) | ||
+ | |||
+ | The response packets have a 16 bytes head, after which the contents of the USB packet are sent. | ||
+ | |||
+ | ^ byte ^ description ^ | ||
+ | | 0-3 | '' | ||
+ | | 4-7 | length of the packet data after the header (excluding this header) | | ||
+ | | 8-10 | FIXME: UNKNOWN, mostly 0x02 0x00 0x00 | | ||
+ | | 11 | FIXME: UNKNOWN (values 0x00, 0x32, 0x3a, 0x41) | | ||
+ | | 12-19 | Bytes 16-23 of the request (serial) | | ||
+ | | 20-... | ||
Zeile 746: | Zeile 787: | ||
| 86-101 | | 86-101 | ||
| 102-111 | | Hostname of the locking PC, 0x00 if not connected | | | 102-111 | | Hostname of the locking PC, 0x00 if not connected | | ||
- | | 112-168 | | + | | 112-168 | |
| 169-172 | serial | | 169-172 | serial | ||
| 173-174 | | USB Vendor ID (little endian) | | | 173-174 | | USB Vendor ID (little endian) | | ||
| 175-176 | | USB Product ID (little endian) | | | 175-176 | | USB Product ID (little endian) | | ||
- | | 177-192 | | + | ^ USB device interface information: |
+ | | 177 | iConfiguration(? | ||
+ | | 178 | bConfigurationValue(?) | | | ||
+ | | 179 | bDescriptorType(? | ||
+ | | 180 | bNumInterfaces | ||
+ | | 181-... | ||
+ | | | bInterfaceNumber | ||
+ | | | bInterfaceClass | ||
+ | | | bInterfaceSubClass | Byte 2: ifSubclass | | ||
+ | | | bInterfaceProtocol | Byte 3: ifProto | ||
All other bytes are 0x00. Their meaning is not yet known. | All other bytes are 0x00. Their meaning is not yet known. | ||
Zeile 788: | Zeile 839: | ||
| 0-3 | '' | | 0-3 | '' | ||
| 4-5 | 0x0007 (little endian) | Response to 0x0007 request | | | 4-5 | 0x0007 (little endian) | Response to 0x0007 request | | ||
- | | 38-42 | '' | + | | 6-37 | 16 bytes | USB device description |
- | | 173-174 | 0x132b | + | | 38-42 |
- | | 175-176 | 0x2089 | + | |
- | | 177-178 | 0x0100 | + | |
- | | 177-192 | | FIXME: Unknown ('' | + | |
- | + | ||
- | All other bytes are 0x00. Their meaning is not yet known. | + | |
hardware/hp2101nw_wlan_printserver.1323819134.txt.gz · Zuletzt geändert: 2013/03/13 10:42 (Externe Bearbeitung)