I am looking to retrieve data from a USB device, this device is a fingerprint scanner. Because I bought it online and wasn't reading carefully enough, drivers and other installation programs weren't included. Send it back? Nah . . .
I want to see if it is possible to retrieve data from this device. To be honest, I don't even know if it's possible, but I would love to give it a whack.
I looked into making INF files and things Microsoft has put out, but I honestly don't know where to start simply because I have absolutely no experience doing this. I have a program set up to organize the data and such, I just need to find a way to actually get it.
What should I research and look into? Are drivers necessary?
Here is a little more information :-)
I want to save data from a fingerprint scanner.I bought a fingerprint scanner, but nothing came with it (drivers, software, etc.). I decided to not return it and see what fun I could have.
I have no code written up yet (mainly because I don't know where to start). But I looked into the device a little...Microsoft recognizes it as a "Fingerprint Scanner" but is still considered unrecognized.I have the USB identifier (at work right now, don't have it on hand)...
Is it even possible to communicate with the device without the initial drivers.Do I really need drivers for the device, or can I communicate with it as it is now.If I do need drivers, where should I start?What should I look into to get communicating with the device?
I am trying to fetch data from the USB device(say pendrive) connected to the USB port of a system. I have attached code.c file which I have wriiten for the same purpose, please find it. Here I am able to open the device file and read some random raw data which is in the log.txt file (also attached to this mail). But I want it to fetch data like minicom/teraterm does.
What methods and libraries I can use to do it successfully and how can it be done.
I was wondering if i had to say simply retrieve data from a server whether it be simple plain text for variables or download whole files (FTP), what would be the best method for this? I would imagine there is a pretty big difference between retrieving text and downloading files but im just wondering what the best thing would be to research for both.
I have a class I use to store column data read from delimited text files.
Code: class column_data { // class functions here public: // initialize class members column_data() : header(""),
[Code] ....
Each column is read into the vector of string. Next the string data is copy converted to the vector of double or the vector of int depending on the data type. There can also be additional transformations of the data (normalization, scaling, etc) and the transformed data is copied to the transformed_double_data vector. I do end up with multiple copies of the data, but I can clear some of the vectors if I don't need all the versions of the data anymore. Each column object goes into a container like a vector of objects or map of objects depending on how I need to access the column data.
There are functions that calculate statistics on the data in the columns and the results are assigned to the object variables like validate_r2. There are separate statistics for each column, so it seems logical to store the results in the column object. This works well for statistics like validate_r2 (pearson's correlation coefficient).
The current issue is that I have other statistics like "pw50" that I need to calculate and store. The statistic is the percent within +/- 50 units and the request for pw50 is passed in from the command line. The issue is that there could be several of these and they can have more or less any value like, pw50, pw75, pw100, etc. Storing data like this doesn't fit into my scheme very well because I can't pre-declare a variable to hold the result for every possible option. I don't know in advance how many, if any, of these there will be. I was thinking of adding two vectors, one of string and one of double,
Code: class column_data { public: // initialize class members column_data() : header(""), type(""), use(""), validate_r2(0.0),
[Code] ....
For each of this type of statistic requested, I would push_back a label into the string vector and then put the result into the parallel position in the double vector. This seems like I would work, but there are probably some things that could be done with pointers that might be better. Another option would be a vector of objects where each object had a string value for the label and a double for the result. That would be more bullet proof as far as keeping the label and value together, but I have not ever nested objects in a class like that so I thought I would post. I don't know the syntax for declaring an object of class_b inside the definition of class_a. The need is to provide dynamic storage for an unspecified number of these statistics and a reliable way to retrieve the values using the label.
I am working on a linked list that instead of the traditional integer value for a data, i'm using my own class. Unfortunately when i do this, i cant seem to retrieve my data from my Node.
#include "Customer.h" class Node { // TO DO:: Fill in. //Constructors and destructor public: Node(); Node(int atime, int ttime); Node(int atime, int ttime, Node* nd);
[Code] .....
In my main code, I've been trying something like
Node* c = new Node(1,2) Customer x = c->cust; // or Customer x = c->get_cust(); cout<<x.get_atime()<<endl; cout<<x.get_ttime()<<endl;
It should be displaying 1 and then 2, but just outputs 0 and 0.
i am student working on a project in c# to maintain the datas from a solar battery monitoring.i already imported the datas from the battery monnitoring and saved them in mysql database and retrived the data in c#.
i have problem in retriving the data in accordance with the date and time range selection.
what i am trying to do is there are more than 1000 datas in the table if i select two date and time the datas in the table should cross check these dates and show all the datas in the table in between those date&time
I'm developing a short c++ program to scan all devices connected to the system through the USB connections.
I have used libusb to scan them and it really works but this library does not provide me with the mounting point, so I get a list of devices including manufacturer, serial number, etc but not the mounting point.
I have also used libudev library but it seems to happen something similar...
I need to get the mounting point for all USB devices connected to the board, you know: /dev/ttyUSB0 ....
I am supposed to write a C program to send through USB interface to the analog device AD9914. Now I am doing the USB interface part where my computer has to detect the AD when it is plugged in and send the signals to it. I have to write the program to detect the device when it is plugged in. What kind of functions can I use? I know that the registry stores the device when it is plugged in. What functions are available to read?
What I want to do is abstract and model a device (more specifically in this case, an IMU) in an embedded system.
Now, there are a couple of gotchas:
- It is basically a framework, which means that it should work with any device, any platform and any bus.
- It is an embedded system, so power consumption and memory consumption must be reduced. It is not a PC.
- It cannot be too complex, because I fear that will just make people scrap it and rewrite it from scratch :P
- It should aim for as little code as possible to write the whole model, of course. Adding 100 lines of code for each register would be a bummer.
That said, I must also model the current system, which means that the current platform, the current bus (which is I2C) and the specific IMU model (I have a datasheet). So the model I am thinking of currently is this:
First, I have a platform. It will know what bus a device is connected on and contains the buses (or specifically, the instances of the buses). It consists of a specific class for each platform and a base. Here are the two I have now:
Code: namespace Sensors { template<typename Platform_t> class GPS; } namespace Platforms { class RaspberryPi: public PlatformBase
[Code]....
Currently I am making the assumption that all platforms will have an I2c bus and UART bus, but I'm not sure about that. We have only one platform ATM, though, so for now this holds. I'm guessing I might have to move it to the specific platforms later and get rid of PlatformBase.GetI2CBus is a problematic one related to registers, but I'll get back to that.
UART is simple to model since it's just a block read and write, so:
I'm probably going to handle all errors through exceptions. So if I can't open the UART bus, I'll throw an exception.
The I2C bus is a problem. I have a model which deals with it on a register-based level, but ideally I'd like to be able to model and use the devices on the I2C bus on a flag-based level (ie, I have names for each individual flag in the registers which I can read or write to directly instead of writing a hexadecimal value directly to each register).
Here is code:
Code: namespace Buses { template<unsigned int Id> class I2CDevice { public: I2CDevice(I2C& Bus): m_Bus(Bus) {} template<typename T>
[Code]....
So I2CDevice does some checks to see that the data to write to a register is either 8 or 16 bits. It does not check that the size to write matches the register's size, but another class does not.
The idea is also that it checks which device is currently active on the bus, and if it's not the current I2CDevice, then it simply selects that before attempting to read or write (the Open call).
This is not meant for multi-threaded environments. Yet, anyway.
The Impl2::Read/Write just dispatches the call so it calls the correct function for writing and reading the correct size, depending on the size of the data.
This is all well and good, but I2C works with registers, so of course I want a class to model a register which I can read and write to directly. It must tie into the bus class since the bus class is the one that abstracts reads and writes on the bus.
The register class looks like:
Code: template<unsigned int Bits, unsigned int RegisterId, typename Bus_t> class Register { public: typedef typename Impl::RegisterBase<Bits>::Storage_t Storage_t; static_assert(!std::is_same<Bus_t, Buses::UART>::value, "Cannot read and write registers on the UART bus."); static_assert(Bits == 8 || Bits == 16 || Bits == 32 || Bits == 64, "Number of bits must be 8, 16, 32 or 64."); auto Write(Storage_t Data) -> void
[Code]....
I think this explains itself, except for the Regs struct, which is an experiment by me to enable myself to access registers via Regs.Config, etc.
What is missing is the ability to access and read/write the individual bits inside the registers. I am thinking a two-way access, where you can write to individual bits, but must call .Write() to commit the write to the register for efficiency.
I haven't actually written this. I don't know a good way ATM. I don't want to add a lot of variables and a write function because that would use 1 byte for every bit which is unacceptable.
I don't want to add a lot of code to make it work, either. A good get/set class would be nice, but I can't see that working. The register must store all state and any subsequent classes must not store any state or overhead will increase.
Finally, yes, I know a lot is incomplete and untested. It probably won't even compile. But that is for later. First is finishing the model.
It would be nice if things such as the platform and buses could be made static because there will only be one instance at any time, and that would save overhead if I don't have to store objects or references to them, but I haven't figured out how to achieve this.
I have a college project which is a car racing game using C++ and the old-school graphics library BGI. After I draw the map and placed the objects(Car,obstacles,road's borders etc..)I added Sleep(); function to the function named Obstacles(); but the problem is, I can't move the car with the right&left arrows.a
Another problem,If I added a cleardevice(); command all objects disappears only the obstacles function keeps working. the Code is here:
char c; do{ c = (char)getch(); if (c == KEY_LEFT) { x = x - 10, x1 = x1 - 10; } if (c == KEY_RIGHT) { x = x + 10, x1 = x1 + 10;
[code].....
note: this is not the whole code, it's only a small portion of it, not a debugging question only need a hint how to fix it.
Is it possible to read NFC card reader in VC++/MFC. Is it possible to develop a callback function that will read the NFC device, and see once the card is inserted, it takes that value from the card and store it in a DB?
1) declare a variable ptr as a pointer to int and initialize it to NULL 2) dynamically allocate memory for an array of 100 elements 3) read 100 elements from the standard input device and store them in the array.
This is what I have so far, I'd like to know if its ok or if something is wrong.
int *ptr = NULL; ptr = new int[100]; cin >> dataPtr [arr];
I'm using a uC to read the device ID from a One Wire device. I'm trying to have the ID read every second and output to over a USART serial stream for debugging, however I'm having a number of problems getting this to work correctly and I think it has to do with my misunderstanding of memory allocation in this case.
The problem is that when I upload the binary to the uC, it gets the device ID correctly the first time, and from thereafter the program is unstable and starts returning garbage (1st screenshot).
Ideally everything inside of the while loop would be inside of its own function, however I have had nothing but trouble doing that. In fact, when I put that all into it's own function that returns void and takes BUSES as an input, the correct data comes out the first and therefore it somehow exits the "while" loop and never gets back in (2nd screenshot). Another thing I noticed is that when I put the variable declaration outside of the while loop in the code below, I get the same behavior.
I haven't include the code for OWI_DetectPresence and OWI_SendByte ... I've hooked up an oscilloscope and have visually confirmed they are working correctly. Once the OWI_ROM_READ byte is sent over the bus the slave responds with it's device ID. I feel like my issue here is memory allocation and not hardware.
how to fix the issue with the output to USART and how to make this into a function that returns the string of the hex ID?
Code:
int main(void) { unsigned char OWI_on_bus = FALSE; // initialize UART for debugging Init_USART();
The problem is that I want to scale the output. I was trying to send message to my control before blitting:
SendMessage( EM_SETZOOM, numer, denom ).
It scaled the control itself, but the blitted context was still the same size as original content CRichEditCtrl (befeoe scaling). Is there any way to blit/render scaled content of CRichEditCtrl to any device context (screen/paper) ?
i have saved my data in sql and i can retrieve them except datetime i can't retrieve ,, this is my code
SqlCommand cmd1 = new SqlCommand("select ID,name,carplatnumber,cartype,expiredate,badgtype from [ID-personal] where id like('" + textBox1.Text + "%')", cn); SqlDataReader dr1;
In c89/90 is there a way to retrieve a pointer from stack or whatever that would behave as this would once cast to the correct type? This is more of a curiosity than a requirement.
I'm trying to retrieve the Player object from my hash table so I can edit the content of that object. Here is what I have.
Player* HashTable::retrieve(char * key, Player& aPlayer) { //calculate the retrieval position (the index of the array) size_t index = calculateIndex(key); //search for the data in the chain (linked list) node * curr = table[index]; char id[100];
[Code] .....
Here I'm calling the retrieve and I need to return a pointer of that object.
Player* PlayerDB::FetchPlayer(char* name) { Player* info = new Player(); out << "Fetching player " << """ << name << "" -- "; if(h.retrieve(name, *info)) { out << "Success!" << endl;
[Code] .....
And here is my call in main. Player* outPlayer = NULL; outPlayer = pdb.FetchPlayer("Sappho"); if (outPlayer != NULL) { outPlayer->LevelUp(); }
I'm just trying to change the actual level of the player using the LevelUp function, but right now it is not making that change. I've been told I need to return a reference of the object in my retrieve function, but I thought that was what I was doing already.
Basically, I'm trying to figure out the index in an array from a pointer that is returned by either bsearch or lfind.
void *val; void *begin = (char *)v->elems (I need to use this separate variable)
Then, I call on either search, which seems to be working fine...
val = bsearch(key, begin, v->count, v->elemsz, cmp);
I'm trying to do the following:
index = *(int*)((char*)value_to_find - (char*)start_ptr)/sizeof(cv->elemsz)
However it segfaults everytime I do this. My logic is that I cast both void pointers to type of char*, then subtract the distance b/w the pointers since you can't do pointer arithmetic on void. I divide this by the size of each element to return the index, which needs to be cast to an int. What am I missing here?
I wanted to retrieve all rows from database and display in listview using list<string>
con.Open(); MySqlCommand view = new MySqlCommand("Select Cust_ID,Fname,Mname from Customer;", con); MySqlDataReader v1 = view.ExecuteReader(); while (v1.Read()) { for (int i = 0; i < v1.FieldCount; i++){ result.Add(v1["Cust_ID"].ToString());
i have a form in which i have a field date of birth , and a textbox to fill date of birth , when a person fills his date of birth like 01/01/1990 , then it will be saved into database , and when i retrieve this date form database then this comes 01/01/1990 12:00 AM , i want only date part from it.
I used to retrieve IP and NIC information by querying windows registry. Now I'm trying to use GetAdapterAddresses() API. Using GetAdapterAddresses() to get IP is not that easy, I need to dig a long deep as I check some examples so far, anyways my question is: Calling this API will return success on all versions of Windows ie: 32bits & 64bits ?
Though Microsoft has not opened any source, where this API is actually retrieving Windows IP information.?. Is it reading Registry or some windows file.