Shaped / webusb-ftdi

WebUSB FTDI Driver
Other
26 stars 3 forks source link

Can you provide sample how to use Fingerprint module r307 #3

Open allcpu opened 4 months ago

allcpu commented 4 months ago

I need to use this module I want to know is it possible to use it using FDTI usb 2 uart and your library if yes can you provide example. Thanks for this great library.

ForbiddenEra commented 4 months ago

Hi,

I'm not sure what exactly you mean by "Fingerprint module r307"?

Edit: I quickly Google'd and I see what you mean; you should be able to find protocol specifics for this device on Google, it seems to be popular with Arduino which means at the very least you should be able to find a C/C++ Arduino library that demonstrates how to interact with it, but all that is beyond the scope of this library itself which just provides the bridge so you can interact with this device (or any TTL device) via an FTDI chip or FTDI breakout (whether that's built in or one you provide) in a browser.

Many off the shelf chips and integrated modules/sensors/devices use TTY for communication which is very similar to RS232 serial (not identical) and the FTDI chips convert this TTL signal to USB for convenience. That means if the device you mentioned is like this, that the FTDI chip is only acting like a bridge between your USB and the TTL port on the device, which means you'll need the connection specifics (baud, bits, parity) protocol information (specification of commands to send/receive from the device that may be either plaintext or binary) of that device to interact with it properly, this may or may not be proprietary information depending on the device.

This library is indeed meant for using WebUSB to interact with FTDI's USB<->Serial devices like FT232*, which means it allows a browser to interact with these devices over USB, it's partially a stand-in/polyfill for WebSerial not being available on all browsers. Note that there are caveats to getting it working on some platforms as well, such as on Windows if FTDI's proprietary driver is installed, you'll have to replace it with a WinUSB driver or similar.

If you have the correct baud, bits and parity for connecting to the device, then you can use this library to connect to it and then send messages back and forth with it but the content of those messages will be dependent on the device itself, and as I said could be proprietary depending on the device.

Basically the FTDI chip is a device between your computer and your actual device: -- -- <Your device, assuming "fingerprint module" or whatever>.

The example in the README.md should provide what you need. If you can be more specific about your goals I can try to help further.

Thanks