How to communicate Arduino board with laptop using c#? - database

I want to do serial communication of fingerprint sensor through Arduino and get hash value from fingerprint sensor and save in database.

Related

USB hardware connection

I have different sensors such as dht11, moisture sensor etc. All of them have a data pin which will give raw data. I want to connect the sensor directly to a USB to send the raw data to a comport via USB serial communication. Can you help me how to make the hardware connection between the sensor data pin and USB data +, data-, power and ground.

Transferring data from STM32F407 to libusb through USB CDC class

I'm working on the project in which I should transfer data from a microcontroller to a PC with the USB protocol. I am working with the STM32F407 microcontroller for transferring data to a PC with the USB Protocol.
I am using libsub for transferring data in Windows 7.
I have written a program with STM32cubeMX and configured the USB device class library. I can transfer data with the CDC virtual COM port, but I want to transfer data with libusb. I install the libusb driver for my device, but when I send data from the microcontroller to PC nothing is send!!!!
What is my problem? How can I send data from a USB device to a PC with USB and high speed?
Enter image description here
In USB protocol the host device initiates any transfer, for example a bulk transfer. i assume that the ST32f407 is the device and the pc ist the host so the ST32 can not initiate any USB transfer. The communication over virtual COM works because it the virtual COM is like a tunnel, but this tunnel was also initated and is (logically) kept alive by the host (pc)
Bulk transactions
Like all other USB transfers, the host always initiates a bulk
transfer. The communication takes place between the host and the
target endpoint. The USB protocol does not enforce any format on the
data sent in a bulk transaction.
source: https://msdn.microsoft.com/de-de/library/windows/hardware/ff539199%28v=vs.85%29.aspx
All data transfers are initiated and controlled by the host and USB
peripherals are slaves responding to host commands
source: https://www.midi.org/articles/basic-of-usb
in usb even interrupts have to wait until the host polls:
Any one who has had experience of interrupt requests on
microcontrollers will know that interrupts are device generated.
However under USB if a device requires the attention of the host, it must wait until the host polls it before it can report that it needs
urgent attention!
source: http://www.beyondlogic.org/usbnutshell/usb4.shtml#Interrupt
See http://www.beyondlogic.org/usbnutshell/usb4.shtml#Bulk for bulk transfers
So you can send data from the device to the host but the host has to establish the communication meaning has 'ask' for the data. This is done via the bulk IN endpoint that is used to read data from the device to the host
I have a project using STM32F4 and libusb at GitHub but with Linux. It's working above 256Kbytes/s.

how to transmit a location data without using internet?

I would like to send current location of a vehicle to a vehicle presence checking device. In normal case the systems send the location data over GSM Network, but I don't want this because I would like to create a cheap monitoring system. Then I cant use RF transmitter because it transmit data over a few meters. So how to transmit a location data from a gps device to a monitoring device over a 2km distance using wireless data transmission without using internet?
If it is just internet you don't want to use, u can use phone sms to send the co-ordinates in text form.
Otherwise, a point to point network using nano stations,is the only wireless communication that I know can work even to 5km.

transmission speed in USB virtual serial port

What is the transmission speed or baud rate in a virtual serial port connection through USB 2.0 . I basically need to transfer data from an ARM microcontroller to PC. The microcontroller has support for USB, and currently I am transmitting data by creating a virtual serial port using USB CDC.
On using minicom (in linux) or putty (in windows), I am able to receive data irrespective of the settings of baud rate in the application.
This gets me a little confused, as to who sets the data transfer rate and what is the significance of the settings in the application. What transfer speeds can I expect in this case, and is there any way to control and measure them?
Moreover, for streaming data and intermittently issue commands, is USB CDC a good solution??
The "baud rate" that you set in your terminal program when connecting to a USB CDC ACM virtual serial port is just a number that gets sent to the device, and the device can ignore it or interpret it however it wants to. The baud rate does not affect the rate of data transfer over USB.
The rate of data transfer is determined by what USB speed you are using (low speed, full speed, high speed, etc.), how much other traffic is on the bus, how efficiently you are writing to the serial port on the sending side, and how efficiently you are reading on receiving side.

Sending characters on USB port of android phone

My android device mmx a89 ninja phone does not have a host controller.I wish to develop an application which will simply send ascii values of characters,that I press,at the USB port of my device.
Is it possible without rooting the device?
The ascii values need to be sent in the simple UART format.
Start bit--->Data--->Stop Bit
or normal USB format also might do if it could be converted to UART using USB to serial converter
Let's first take a step back. Since you're not a host controller, your USB port will be connected to one (possibly via a hub, but tha's just plumbing). That host controller you're connected to will not expect "start bit -> data -> stop bit". That's in violation of USB spec.
A USB-to-serial converter appears like it could work. After all, it takes a serial USB datastream, strips off USB overhead, and adds start&stop bits. But a USB-to-serial converter in general expects to talk to a host controller.
What you'd need is therefore a smart peripheral. E.g. a Raspberry Pi does have both a USB host controller and a UART.

Resources