Comment 23 for bug 1822762

Revision history for this message
zdohnal (zdohnal) wrote :

Brian,

I track new hplip release at my github since upstream does not have any public versioning system, to track at least changes between releases. https://github.com/zdohnal/hplip

I see a probably relevant change in 3.18.9 in scan/sane/hpaio.c:

@@ -252,7 +255,29 @@ static int AddDevice(char *uri)
     }
     else
     {
- DBG(6,"unsupported scantype=%d %s\n", ma.scantype, uri);
+ // This is added to make the uri hp:/net/hp_model_name?ip-xxx.xxx.xxx.xxx&queue=false
+ // For some of the devices the scan MDL recevied would be model_name instead of hp_model_name
+ len = strlen(uri);
+ strncpy(new_uri, uri, 9);
+ new_uri[8] = 'h';
+ new_uri[9] = 'p';
+ new_uri[10] = '_';
+ for (i = 11,j = 8; j<=len; ++i, ++j)
+ new_uri[i] = uri[j];
+
+ hpmud_query_model(new_uri, &ma);
+ DBG(6,"scantype=%d %s\n", ma.scantype, new_uri);
+
+ if(ma.scantype>0)
+ {
+ hpmud_get_uri_model(new_uri, model, sizeof(model));
+ AddDeviceList(new_uri, model, &DeviceList);
+ device_added = 1;
+ }
+ else
+ {
+ DBG(6,"unsupported scantype=%d %s\n", ma.scantype, new_uri);
+ }
     }

IMO it is that partial fix you talk about - I overlooked it before.