Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sane_get_devices returns empty list, while scanimage -L does not #4

Open
lwessely opened this issue Mar 13, 2024 · 0 comments
Open

Comments

@lwessely
Copy link

While scanimage -L correctly lists one device: device brother5:bus1;dev1' is a Brother ADS-1700W USB scanner

sane_get_devices() returns an empty device list in the code below:

import { SANEStatus, libsane } from "sane-wasm";

libsane({
  debugSANE: true,
  debugUSB: true,
  debugFunctionCalls: true,
}).then(async (sane) => {
  const init = sane.sane_init();
  console.log(init.status === SANEStatus.GOOD);

  const state = sane.sane_get_state();
  console.log(state);

  let { status, devices } = await sane.sane_get_devices();
  console.log(status === SANEStatus.GOOD, devices);

  await sane.sane_exit();
});

The output of the code on my machine is

true
{
  initialized: true,
  version_code: 16842753,
  version: { major: 1, minor: 1, build: 1 },
  open: false
}
true []

I would expect the device list to contain all devices listed by scanimage -L, instead of being empty.

I am on node v21.7.0, on EndeavourOS (an Arch-based Linux distro).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant