Benutzer-Werkzeuge

Webseiten-Werkzeuge


hardware:hp2101nw_wlan_printserver

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen RevisionVorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
hardware:hp2101nw_wlan_printserver [2011/12/14 00:15] – ues reinholdhardware:hp2101nw_wlan_printserver [2013/03/13 11: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: "@\0[len][DEVNAME][OPTIONID]:[VALUE]\n")
 +  - Detection, configuration and locking: TCP & UDP port 34447 (data format: "SBSU[Cmd][args]")
 +  - USB over TCP: TCP port 34448 (data format: [type][18byte header], Response "RBRU[len]...")
 +
 +
  
   * 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  | request device status, returns printserver name, connected printer and ... TODO | |  0x0001  | request device status, returns printserver name, connected printer and ... TODO |
 |  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: Interface to request info for (0x00, 0x01, 0x02) |
 +|  6  | For GET DESCRIPTOR: DESCRIPTOR index, Otherwise: FIXME UNKNOWN |
 +|  7  | For GET DESCRIPTOR: DESCRIPTOR type (0x01=DEVICE, 0x02=CONFIGURATION, 0x03=STRING), Otherwise: FIXME UNKNOWN |
 +|  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  | ''RBRU'' magic ("URBR" in little endian) |
 +|  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-...  | USB packet contents  |
  
  
Zeile 746: Zeile 787:
 | 86-101  | ''10.0.0.4''  | IP-address (as string) of the locking PC, 0x00 if not connected | | 86-101  | ''10.0.0.4''  | IP-address (as string) of the locking PC, 0x00 if not connected |
 | 102-111 |               | Hostname of the locking PC, 0x00 if not connected | | 102-111 |               | Hostname of the locking PC, 0x00 if not connected |
-| 112-168 |               FIXME: Unknown connection / locking data | +| 112-168 |               Locking data (as sent with the SBSU 0x07 locking command) 
-| 169   0x01  FIXME: Unknown, always 0x01 (whether a printer is connected or not) |+| 169-172 serial  | 0x01; if printer is connected/locked, incremented with each status request (every 3 seconds) |
 | 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     FIXME: Unknown (''00 01 02 03 00 ff ff ff  01 07 01 02 02 07 01 02'') |+^ USB device interface information: ^^^ 
 +| 177 | iConfiguration(?    | 
 +| 178 | bConfigurationValue(?)    |  
 +| 179 | bDescriptorType(?   
 +| 180 | bNumInterfaces  | Nr. of interfaces 
 +| 181-...   || interface info (4 bytes per interface) | 
 +|     | bInterfaceNumber   | Byte 0: ifNumber | 
 +|     | bInterfaceClass    | Byte 1: ifClass | 
 +|     | 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  | ''SBSU'' | magic header indicating a USBS communication packet over UDP | | 0-3  | ''SBSU'' | magic header indicating a USBS communication packet over UDP |
 | 4-5  | 0x0007 (little endian) | Response to 0x0007 request | | 4-5  | 0x0007 (little endian) | Response to 0x0007 request |
-38-42    ''13549''   FIXME: Unknown, some USB descriptor (?) +6-37 16 bytes | USB device description 
-173-174 |  0x132b  USB Vendor ID (little endian) | +38-42  16 bytes   | USB device serial number (as string) |
-| 175-176 |  0x2089  | USB Product ID (little endian) | +
-| 177-178 |  0x0100  | USB bcdDevice (little endian), TODO: Or iManufacturer or bNumConfigurations???+
-| 177-192 |     | FIXME: Unknown (''02 03 00 ff ff ff  01 07 01 02 02 07 01 02'') | +
- +
-All other bytes are 0x00. Their meaning is not yet known.+
  
  
Zeile 911: Zeile 957:
  
 TCP port 34448 TCP port 34448
 +
 +Each packet of the TCP stream uses the PSH,ACK flags, so each packet is followed by an empty ACK packet in the network communication! These ACK packets are not shown here.
  
 Requesting various USB descriptors: Requesting various USB descriptors:
Zeile 980: Zeile 1028:
  
 TCP port 34448 TCP port 34448
 +
 +Each packet of the TCP stream uses the PSH,ACK flags, so each packet is followed by an empty ACK packet in the network communication! These ACK packets are not shown here.
  
   1b 00 02 ff 00 03 00 00  00 00 00 01 f1 03 00 00 ........ ........   1b 00 02 ff 00 03 00 00  00 00 00 01 f1 03 00 00 ........ ........
Zeile 995: Zeile 1045:
       3b 4d 44 4c 3a 6d 63 31  36 39 30 4d 46 20 28 46 ;MDL:mc1 690MF (F       3b 4d 44 4c 3a 6d 63 31  36 39 30 4d 46 20 28 46 ;MDL:mc1 690MF (F
       41 58 29 3b 43 4c 53 3a  50 52 49 4e 54 45 52 3b AX);CLS: PRINTER;       41 58 29 3b 43 4c 53 3a  50 52 49 4e 54 45 52 3b AX);CLS: PRINTER;
 +
 +==== (k) Disconnecting and Unlocking the printer
 +
 +TCP port 34447
 +
 +  53 42 53 55 03 00 00 00                          SBSU.... 
  
  
Zeile 1023: Zeile 1079:
   - i)         ... USB descriptor requests, response ''RBSU'' (TCP port 34448)   - i)         ... USB descriptor requests, response ''RBSU'' (TCP port 34448)
 long pause long pause
-  - j)         ... USB CONTROL in (printer desc requested+  - j)         ... USB CONTROL in (printer desc requested) (TCP port 34448) 
 + 
 +Unlocking/disconnecting the printer through the utility on Windows: 
 +  - k)         ... SBSU 0x0003 (disconnect) (TCP port 34447) 
 +  - a)         ... SBSU 0x0001 (status), showing the unlock (UDP port 34447) 
hardware/hp2101nw_wlan_printserver.1323818117.txt.gz · Zuletzt geändert: 2013/03/13 11:42 (Externe Bearbeitung)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki