alexpevzner / sane-airscan

Scanner Access Now Easy - universal driver for eSCL (Apple AirScan) and WSD
Other
280 stars 39 forks source link

HP Laserjet M2727dnf MFP #251

Closed burnbabyburn closed 1 year ago

burnbabyburn commented 2 years ago

Hi, hope this is the right place for this prob.

My MFP needs the proprietary HP-binary-plugin (e.g. hplip-3.22.4-plugin.run) to work correctly. I am using a network setup. (Printer: 192.168.1.233 on localnet and 10.0.0.29 on different network, sane-airscan: 192.168.1.234, IPP_Service_Host: 192.168.1.10) the printers http service pages shows an WS-Discovery Service so we should have a WSD up and running. But it seems to not register in MDNS/WSSD/ZEROCONF and so sane-airscanis not able to detect it. I tested my normal setup with an avahi-reflector and also moved the printer to the same network segment as sane-airscan. It made no difference.

while tcpdumping a hpaio:// scan (scanimage --test --verbose --progress) i was able to see the WSD XML the printer reported:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:wscn="http://tempuri.org/wscn.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <SOAP-ENV:Body>
    <wscn:ScanElements>
      <ScannerConfiguration>
        <DeviceSettings>
          <FormatSupported xsi:type="SOAP-ENC:Array" SOAP-ENC:itemType="wscn:ScanDocumentFormat" SOAP-ENC:arraySize="2">
            <item>jfif</item>
            <item>hpraw</item>
          </FormatSupported>
          <QualityFactorSupported>false</QualityFactorSupported>
          <ContentSupported xsi:type="SOAP-ENC:Array" SOAP-ENC:itemType="wscn:ContentType" SOAP-ENC:arraySize="1">
            <item>Auto</item>
          </ContentSupported>
          <DocumentSizeAutoDetectSupported>false</DocumentSizeAutoDetectSupported>
          <FeederCapacity>50</FeederCapacity>
          <DuplexRotation>180</DuplexRotation>
          <Rotation>0</Rotation>
        </DeviceSettings>
        <Platen>
          <ColorSupported xsi:type="SOAP-ENC:Array" SOAP-ENC:itemType="wscn:ColorEntryType" SOAP-ENC:arraySize="4">
            <item>BlackandWhite1</item>
            <item>GrayScale8</item>
            <item>RGB24</item>
            <item>RGB48</item>
          </ColorSupported>
          <PlatenMinimumSize>
            <Width>1920</Width>
            <Height>1920</Height>
          </PlatenMinimumSize>
          <PlatenMaximumSize>
            <Width>8500</Width>
            <Height>11690</Height>
          </PlatenMaximumSize>
          <PlatenOpticalResolution>
            <Width>1200</Width>
            <Height>1200</Height>
          </PlatenOpticalResolution>
          <FlatbedSupported>true</FlatbedSupported>
        </Platen>
        <ADF>
          <ADFSupported>true</ADFSupported>
          <ADFSupportsDuplex>true</ADFSupportsDuplex>
          <ADFMinimumSize>
            <Width>1920</Width>
            <Height>1920</Height>
          </ADFMinimumSize>
          <ADFMaximumSize>
            <Width>8500</Width>
            <Height>15000</Height>
          </ADFMaximumSize>
          <ADFOpticalResolution>
            <Width>300</Width>
            <Height>300</Height>
          </ADFOpticalResolution>
        </ADF>
      </ScannerConfiguration>
      <ScannerStatus>
        <ScannerCurrentTime>2018-07-23T12:50:41Z</ScannerCurrentTime>
        <ScannerState>Idle</ScannerState>
        <ScannerStateReason>None</ScannerStateReason>
        <ScanToStatus>
          <PaperInADF>false</PaperInADF>
          <ScanToAvailable>false</ScanToAvailable>
        </ScanToStatus>
      </ScannerStatus>
      <ScannerInfo>
        <ModelNumber>CB532A</ModelNumber>
      </ScannerInfo>
    </wscn:ScanElements>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

And i was able to forge a curl post for wsdiscovery - So sane-airscan stuff should work

curl --verbose --header Accept: --header "Content-Type: application/soap+xml; charset=utf-8"  --header "Transfer-Encoding: chunked" --user-agent "gSOAP/2.7" --data @req  10.0.0.29:8289/StableWSDiscoveryEndpoint/schemas-xmlsoap-org_ws_2005_04_discovery
*   Trying 10.0.0.29:8289...
* Connected to 10.0.0.29 (10.0.0.29) port 8289 (#0)
> POST /StableWSDiscoveryEndpoint/schemas-xmlsoap-org_ws_2005_04_discovery HTTP/1.1
> Host: 10.0.0.29:8289
> User-Agent: gSOAP/2.7
> Content-Type: application/soap+xml; charset=utf-8
> Transfer-Encoding: chunked
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 202 ACCEPTED
< Server: gSOAP/2.7
< Content-Type: application/soap+xml; charset=utf-8
< Transfer-Encoding: chunked
< Connection: close
<
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wscn="http://tempuri.org/wscn.xsd"><SOAP-ENV:Body><wscn:ScanElements><ScannerConfiguration><DeviceSettings><FormatSupported xsi:type="SOAP-ENC:Array" SOAP-ENC:itemType="wscn:ScanDocumentFormat" SOAP-ENC:arraySize="2"><item>jfif</item><item>hpraw</item></FormatSupported><QualityFactorSupported>false</QualityFactorSupported><ContentSupported xsi:type="SOAP-ENC:Array" SOAP-ENC:itemType="wscn:ContentType" SOAP-ENC:arraySize="1"><item>Auto</item></ContentSupported><DocumentSizeAutoDetectSupported>false</DocumentSizeAutoDetectSupported><FeederCapacity>50</FeederCapacity><DuplexRotation>180</DuplexRotation><Rotation>0</Rotation></DeviceSettings><Platen><ColorSupported xsi:type="SOAP-ENC:Array" SOAP-ENC:itemType="wscn:ColorEntryType" SOAP-ENC:arraySize="4"><item>BlackandWhite1</item><item>GrayScale8</item><item>RGB24</item><item>RGB48</item></ColorSupported><PlatenMinimumSize><Width>1920</Width><Height>1920</Height></PlatenMinimumSize><PlatenMaximumSize><Width>8500</Width><Height>11690</Height></PlatenMaximumSize><PlatenOpticalResolution><Width>1200</Width><Height>1200</Height></PlatenOpticalResolution><FlatbedSupported>true</FlatbedSupported></Platen><ADF><ADFSupported>true</ADFSupported><ADFSupportsDuplex>true</ADFSupportsDuplex><ADFMinimumSize><Width>1920</Width><Height>1920</Height></ADFMinimumSize><ADFMaximumSize><Width>8500</Width><Height>15000</Height></ADFMaximumSize><ADFOpticalResolution><Width>300</Width><Height>300</Height></ADFOpticalResolution></ADF></ScannerConfiguration><ScannerStatus><ScannerCurrentTime>2018-07-23T15:20:04Z</ScannerCurrentTime><ScannerState>Idle</ScannerState><ScannerStateReason>None</ScannerStateReason><ScanToStatus><PaperInADF>false</PaperInADF><ScanToAvailable>false</ScanToAvailable></ScanToStatus></ScannerStatus>* Closing connection 0
<ScannerInfo><ModelNumber>CB532A</ModelNumber></ScannerInfo></wscn:ScanElements></SOAP-ENV:Body></SOAP-ENV:Envelope>

avahi (thx to reflector) lists the printer on localnet and different net

=   eth0 IPv4 HP LaserJet M2727nf MFP (8A21A9)              Web Site             local
   hostname = [Drucker.local]
   address = [10.0.0.29]
   port = [80]
   txt = []
=   eth0 IPv4 HP LaserJet M2727nf MFP (8A21A9)              UNIX Printer         local
   hostname = [Drucker.local]
   address = [10.0.0.29]
   port = [515]
   txt = ["TBCP=T" "Binary=T" "Transparent=T" "adminurl=http://Drucker.local." "priority=50" "product=(HP LaserJet M2727nf MFP)" "ty=HP LaserJet M2727nf MFP" "rp=RAW" "qtotal=1" "txtvers=1"]
=   eth0 IPv4 HP LaserJet M2727nf MFP (8A21A9)              PDL Printer          local
   hostname = [Drucker.local]
   address = [10.0.0.29]

airscan-discover -d

e.g.
MDNS: resolve-ipv4("_ipp._tcp", "HP_LaserJet_M2727nf_MFP_fax @ odroidn2"): 192.168.1.10:631
WSDD: directed probe: trying if=enp0s3, addr=192.168.1.10
WSDD: HTTP POST http://192.168.1.10/StableWSDiscoveryEndpoint/schemas-xmlsoap-org_ws_2005_04_discovery
WSDD: HTTP resolving 192.168.1.10 80
WSDD: HTTP trying 192.168.1.10:80

But sane-airscan does not auto detect :/

logfile airscan-discover -d (valid 3weeks) pcap success scanning hpaio (valid 2weeks) Hint: Pcap of a Windows scan with the HP software also uses same proto/service etc...

€ Manual adding the printer: /etc/sane.d/airscan.conf

[devices]
#"Test" = hpaio:/net/HP_LaserJet_M2727nf_MFP?ip=192.168.1.233
#"HP MFP M277dw Scanner" = http://10.0.0.29:8289/WSDScanner,WSD
"HP MFP M277dw Scanner" = http://10.0.0.29:8289/WSDScanner , WSD

export SANE_DEBUG_DLL=255 && scanimage -d 'airscan:w0:HP MFP M277dw Scanner'

HP MFP M277dw Scanner: device created
HP MFP M277dw Scanner: DEVICE_STM_OPENED->DEVICE_STM_PROBING
HP MFP M277dw Scanner: using protocol "WSD"
HP MFP M277dw Scanner: HTTP POST http://10.0.0.29:8289/WSDScanner
HP MFP M277dw Scanner: HTTP using timeout: 5000 ms
HP MFP M277dw Scanner: HTTP resolving 10.0.0.29 8289
HP MFP M277dw Scanner: HTTP trying 10.0.0.29:8289
HP MFP M277dw Scanner: HTTP fdpoll: {--} -> {-w}
HP MFP M277dw Scanner: HTTP 983 bytes sent
HP MFP M277dw Scanner: HTTP done request sending
HP MFP M277dw Scanner: HTTP fdpoll: {-w} -> {rw}
HP MFP M277dw Scanner: HTTP fdpoll: {rw} -> {r-}
HP MFP M277dw Scanner: HTTP 145 bytes received
HP MFP M277dw Scanner: HTTP POST http://10.0.0.29:8289/WSDScanner: got response headers (400)
HP MFP M277dw Scanner: HTTP 661 bytes received
HP MFP M277dw Scanner: HTTP done response reception
HP MFP M277dw Scanner: HTTP POST http://10.0.0.29:8289/WSDScanner: 400 Bad Request
HP MFP M277dw Scanner: HTTP POST http://10.0.0.29:8289/WSDScanner: Bad Request
HP MFP M277dw Scanner: scanner capabilities query: Bad Request
HP MFP M277dw Scanner: DEVICE_STM_PROBING->DEVICE_STM_PROBING_FAILED
HP MFP M277dw Scanner: removed from device table
HP MFP M277dw Scanner: closed protocol "WSD"
HP MFP M277dw Scanner: device destroyed
API: sane_open("w0:HP MFP M277dw Scanner"): Error during device I/O
scanimage: open of device airscan:w0:HP MFP M277dw Scanner failed: Error during device I/O
[18:30:30.090574] [dll] sane_exit: exiting
[18:30:30.090607] [dll] sane_exit: calling backend `airscan's exit function
API: sane_exit(): called
API: sane_exit(): OK
[18:30:30.100465] [dll] sane_exit: finished
alexpevzner commented 2 years ago

Hi @burnbabyburn,

could you please show me trace, created by airscan-discover -t, will be saved as airscan-discover-zeroconf.log and sane-airscan protocol trace? Console output is not detailed enough to deal with this kind of problems.

burnbabyburn commented 2 years ago

airscan-discover -t

to eliminate possible errors due to my setup, i moved the MFP to the same net as the host. Here is the logfile . As the printer itself does not publish any ipp it seems to be ignored by the scan. The printers ip is not listed in the logfile Host scanning: 192.168.1.234 Printer: 192.168.1.233 OdroidN2 publishing ipp for printer: 192.168.1.10

alexpevzner commented 2 years ago

WSD discovery doesn't depend on IPP. It uses IPP announces only for hinting in the fast discovery mode: if all devices, known via DNS-SD, also known via WSDD, we can finish scan quickly. In a full mode that airscan-discover -t uses, this optimization is not used.

I see, the printer doesn't respond to discovery probes at all. I wonder, how the HP proprietary driver discovers it.

And show me sane-airscan trace in the manual configuration mode too. May be, detailed error response will put some insight to the root cause of the scanning problem (which looks separate from the discovery problem).

burnbabyburn commented 2 years ago

Did a clean ubuntu 20.04 LTS install. Captured the hp-setup traffic. Discovery tries via MDNS. My printer does not respond to that, even on Windows :) So i set ip to manual. HPLIP seems to ask via snmp for oid 1.3.6.1.4.1.11.2.3.9.1.1.7 if ip is defined manually. The printer responds with its capabilities. They seem to exchange some magic packets and configure the fax device in the end. hp-setup capture. Than the printer answers to MDNS.

And show me sane-airscan trace in the manual configuration mode too. May be, detailed error response will put some insight to the root cause of the scanning problem (which looks separate from the discovery problem).

grep ^[^#] /etc/sane.d/airscan.conf 
[devices]
"HP" = http://192.168.1.233:8289 , WSD
[options]
discovery = enable
model = network
protocol = manual
[debug]
trace   = /tmp/trace
enable  = true
hexdump = true
[blacklist]
burnbabyburn commented 2 years ago

scanimage-hp.log

here is the envelope an hp scan is sending. The req failing with HTTP 400 from airscan in the log trace, looks quite different.

ubuntu@ubuntu-VirtualBox:~$ curl --verbose --data @req  192.168.1.233:8289/StableWSDiscoveryEndpoint/schemas-xmlsoap-org_ws_2005_04_discovery
*   Trying 192.168.1.233:8289...
* Connected to 192.168.1.233 (192.168.1.233) port 8289 (#0)
> POST /StableWSDiscoveryEndpoint/schemas-xmlsoap-org_ws_2005_04_discovery HTTP/1.1
> Host: 192.168.1.233:8289
> User-Agent: gSOAP/2.7
> Content-Type: application/soap+xml; charset=utf-8
> Transfer-Encoding: chunked
> 
* Mark bundle as not supporting multiuse
< HTTP/1.1 202 ACCEPTED
< Server: gSOAP/2.7
< Content-Type: application/soap+xml; charset=utf-8
< Transfer-Encoding: chunked
< Connection: close
< 
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wscn="http://tempuri.org/wscn.xsd"><SOAP-ENV:Body><wscn:ScanElements><ScannerConfiguration><DeviceSettings><FormatSupported xsi:type="SOAP-ENC:Array" SOAP-ENC:itemType="wscn:ScanDocumentFormat" SOAP-ENC:arraySize="2"><item>jfif</item><item>hpraw</item></FormatSupported><QualityFactorSupported>false</QualityFactorSupported><ContentSupported xsi:type="SOAP-ENC:Array" SOAP-ENC:itemType="wscn:ContentType" SOAP-ENC:arraySize="1"><item>Auto</item></ContentSupported><DocumentSizeAutoDetectSupported>false</DocumentSizeAutoDetectSupported><FeederCapacity>50</FeederCapacity><DuplexRotation>180</DuplexRotation><Rotation>0</Rotation></DeviceSettings><Platen><ColorSupported xsi:type="SOAP-ENC:Array" SOAP-ENC:itemType="wscn:ColorEntryType" SOAP-ENC:arraySize="4"><item>BlackandWhite1</item><item>GrayScale8</item><item>RGB24</item><item>RGB48</item></ColorSupported><PlatenMinimumSize><Width>1920</Width><Height>1920</Height></PlatenMinimumSize><PlatenMaximumSize><Width>8500</Width><Height>11690</Height></PlatenMaximumSize><PlatenOpticalResolution><Width>1200</Width><Height>1200</Height></PlatenOpticalResolution><FlatbedSupported>true</FlatbedSupported></Platen><ADF><ADFSupported>true</ADFSupported><ADFSupportsDuplex>true</ADFSupportsDuplex><ADFMinimumSize><Width>1920</Width><Height>1920</Height></ADFMinimumSize><ADFMaximumSize><Width>8500</Width><Height>15000</Height></ADFMaximumSize><ADFOpticalResolution><Width>300</Width><Height>300</Height></ADFOpticalResolution></ADF></ScannerConfiguration><ScannerStatus><ScannerCurrentTime>2018-07-25T01:53:39Z</ScannerCurrentTime><ScannerState>Idle</ScannerState><ScannerStateReason>None</ScannerStateReason><ScanToStatus><PaperInADF>false</PaperInADF><ScanToAvailable>false</ScanToAvailable></ScanToStatus></ScannerStatus>* Closing connection 0
<ScannerInfo><ModelNumber>CB532A</ModelNumber></ScannerInfo></wscn:ScanElements></SOAP-ENV:Body></SOAP-ENV:Envelope>
ubuntu@ubuntu-VirtualBox:~$ cat req 
    <?xml
        version="1.0"
        encoding="UTF-8"
        ?>
    <SOAP-ENV:Envelope
        xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
        xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:wscn="http://tempuri.org/wscn.xsd">
        <SOAP-ENV:Body>
            <wscn:GetScannerElements>
                </wscn:GetScannerElements>
            </SOAP-ENV:Body>
        </SOAP-ENV:Envelope>

returns scanner capabilities. create a scanjob with jobsettings

ubuntu@ubuntu-VirtualBox:~$ cat req2
    <?xml
        version="1.0"
        encoding="UTF-8"
        ?>
    <SOAP-ENV:Envelope
        xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
        xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:wscn="http://tempuri.org/wscn.xsd">
        <SOAP-ENV:Body>
            <wscn:CreateScanJobRequest>
                <ScanIdentifier>
                    </ScanIdentifier>
                <ScanTicket>
                    <JobDescription>
                        </JobDescription>
                    <DocumentParameters>
                        <Format>
                            jfif
                            </Format>
                        <CompressionQualityFactor>
                            0
                            </CompressionQualityFactor>
                        <ImagesToTransfer>
                            0
                            </ImagesToTransfer>
                        <InputSource>
                            Platen
                            </InputSource>
                        <ContentType>
                            Auto
                            </ContentType>
                        <InputSize>
                            <InputMediaSize>
                                <Width>
                                    8499
                                    </Width>
                                <Height>
                                    11689
                                    </Height>
                                </InputMediaSize>
                            <DocumentSizeAutoDetect>
                                false
                                </DocumentSizeAutoDetect>
                            </InputSize>
                        <Exposure>
                            <AutoExposure>
                                false
                                </AutoExposure>
                            <ExposureSettings>
                                <Contrast>
                                    0
                                    </Contrast>
                                <Brightness>
                                    0
                                    </Brightness>
                                </ExposureSettings>
                            </Exposure>
                        <MediaSides>
                            <MediaFront>
                                <ScanRegion>
                                    <ScanRegionXOffset>
                                        0
                                        </ScanRegionXOffset>
                                    <ScanRegionYOffset>
                                        0
                                        </ScanRegionYOffset>
                                    <ScanRegionWidth>
                                        8499
                                        </ScanRegionWidth>
                                    <ScanRegionHeight>
                                        11689
                                        </ScanRegionHeight>
                                    </ScanRegion>
                                <ColorProcessing>
                                    GrayScale8
                                    </ColorProcessing>
                                <Resolution>
                                    <Width>
                                        300
                                        </Width>
                                    <Height>
                                        300
                                        </Height>
                                    </Resolution>
                                </MediaFront>
                            </MediaSides>
                        </DocumentParameters>
                    <RetrieveImageTimeout>
                        300
                        </RetrieveImageTimeout>
                    <ScanManufacturingParameters>
                        <DisableImageProcessing>
                            false
                            </DisableImageProcessing>
                        </ScanManufacturingParameters>
                    </ScanTicket>
                </wscn:CreateScanJobRequest>
            </SOAP-ENV:Body>
        </SOAP-ENV:Envelope>

returning empty job token and scanjobid <SOAP-ENV:Body><wscn:CreateScanJobResponseType><JobId>3</JobId><JobToken> </JobToken> And retrieve the image

ubuntu@ubuntu-VirtualBox:~$ cat req3
    <?xml
        version="1.0"
        encoding="UTF-8"
        ?>
    <SOAP-ENV:Envelope
        xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
        xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:xsd="http://www.w3.org/2001/XMLSchema"
        xmlns:wscn="http://tempuri.org/wscn.xsd">
        <SOAP-ENV:Body>
            <wscn:RetrieveImageRequest>
                <JobId>
                    3
                    </JobId>
                <JobToken>
                    </JobToken>
                <DocumentDescription>
                    </DocumentDescription>
                </wscn:RetrieveImageRequest>
            </SOAP-ENV:Body>
        </SOAP-ENV:Envelope>

printer scans

alexpevzner commented 2 years ago

This is some different protocol. Looks similar to WSD, but it is not WSD.

I currently don't have my personal resources to implement this protocol in the sane-airscan by myself, and I don't have a hardware to test implementation.

If you can code in C, you can consider implementing it by yourself (with my help, of course) and contributing to the sane-airscan. It is not as hard to do, as it sounds.

alexpevzner commented 2 years ago

And if you will consider to try, this is better to contribute to the https://github.com/alexpevzner/sane-airscan-unstable

This is development branch of the sane-airscan, for my convenience managed as a separate repository. Currently there is a very small difference between these branches, and I synchronize them time to time. But all big changes I prefer to appear in the unstable branch first.

burnbabyburn commented 2 years ago

TBH my last C code is 10yrs old now. But i can try though. It would help a lot if you could pinpoint me to the relevant files i need to look at :) Looking (very) roughly at your codebase, mainly airscan-wsd.c => Seems like the XMLNS is a lil bit different to standard WSD (wsa vs wscn or SOAP:Envelope vs SOAP-ENV:Envelope) The protocol communication seems rather simple (maybe a MS-BSSRR flavor?) The discovery part, well i didn't even want to try that as even the native HP tools fail on that. Only thing that would come to my mind would be a snmp scan for the OIDs from my last posts. And if the device/serial is in a list of known non standard WSD sane-airscan tries another method. Issue here can now be considered on-hold as my printer does not speak native WSD/eSCL. Maybe you could add it to the readme on your next push. Atleast we know more now! € Ubuntu 20.04 LTS also needs package universal-ctags for TAGS build target

alexpevzner commented 2 years ago

Yes, it really looks like MS-BSSRR dialect.

First thing to do is to choose a protocol name (probably, BSSRR). Add appropriate constant to the ID_PROTO enum. Add it to the id_name_table table in the airscan-id.c file. Add protocol handler constructor prototype, similar to proto_handler_escl_new or proto_handler_wsd_new to the airscan.h. Add handling of the newly added protocol to the proto_handler_new function in the airscan.h

Then create a new protocol handler. eSCL and WSD handlers are airscan-escl,c and airscan-wsd.c, respecyively. I suggest to start from airscan-wsd.c, because protocol is quite similar to WSD. But still want a separate protocol handler rather that a special mode of the WSD handler, as protocols are different enough.

It should be enough for manually-configured device.

Once we well have it all implemented, we may look how to add discovery.

tracend commented 2 years ago

€ Ubuntu 20.04 LTS also needs package universal-ctags for TAGS build target

I can confirm this.

Firstly, thank you, this lib definitely helped me fix the printer setup on my Ubuntu but when compiling I got the message:

make: ctags: Command not found

Please add in the Readme file that Ubuntu, Debian and similar have the additional dependency:

apt-get install universal-ctags

Thanks again

alexpevzner commented 1 year ago

Looks like this issue is not relevant anymore...