USB barcode scanner with c# ,net? - usb

I want to read the data coming form USB port which I have inserted USC barcode scanner to it. what can I do it with c# ,net?
I want to read the data coming form USB port which I have inserted USC barcode scanner to it. What can I do it with c# ,net?

Related

How to connect an OutputStream to an UsbDeviceConnection in Android?

I need to connect an Android device to a thermal printer (DDP-250) thru an USB cable.
The Android device has USB Host capabilities.
The thermal printer has an USB interface.
So far, I'm already able to create an UsbDeviceConnection to the printer.
The tricky part is that the printer's SDK works based on an OutputStream to send data to the device.
From the javadoc:
Printer(java.io.OutputStream out)
Constructs a new instance of this class from a given OutputStream.
This means that sending data using UsbDeviceConnection.bulkTransfer is not an option.
I need to, somehow, get an OutputStream that streams data to the UsbDeviceConnection.
I even thought about using UsbDeviceConnection.getFileDescriptor to create a FileOutputStream, but UsbDeviceConnection.getFileDescriptor just returns an integer.
Oh, just to be clear, i know this printer has a bluetooth interface. But while using it, i was having wifi instability problems. And i need to have access to both, wifi internet and the printer, at the same time. I also tried to connect the android device to the internet using an usb/ethernet adapter (in this case the thermal printer would stay connected thru Bluetooth), but this android device does not have ethernet capabilities.
Any ideas? Anything at all. I'll take anything, even the recommendation of another thermal printer.
Thanks!
file descriptor (FD) is an abstract indicator for accessing a file.
so I think following statement will work.
public FileOutputStream (FileDescriptor fd);
Constructs a new FileOutputStream that writes to fd.

Zebra ZM400 USB Printing in WINCE 5.0 and VB.NET

I have an application in VB.NET, for smart devices, that prints labels containing some product information such as manufacturar name, product name, product weight and a barcode with the product name. In the past I used to print it using the serial port of my device but, due to a hardware change, the new device my company bought doesn't have the serial port anymore, but it has more USB ports than the old device.
I googled for answers but most of them didn't point me to an answer, due to most, or all of them, don't use the .NET CF to print in Zebras. Many of topics I found explain how to create a connection to USB port but, obviously, when moved to WIN CE, it didn't work.
I have the code for Zebra printing (ZPL II), just need a way to send it to one of my USB ports and check if it's printing the correct information.
Thanks in advance.
You need a driver for the printer. Windows CE provide a generic USB print transport driver that should work with many of those text-based printers, you may add it to your Windows CE OS image and try it.
If it works you may be able to send data to the printer by using PRN*: instead of COM*: as device name (PRN1:, PRN2: etc.).

Catch Data from a barcode scanner connected via Ethernet

I have a vb.net application that needs to catch the readings from a barcode scanner in a TextBox.
As far as I know, the scanners work sending the data as keystrokes, but I dont know if that still applies when it's connected via Ethernet cable
Well, to get to the point, will the scanner send the data automatically to the textbox? or it will be necesary to work with sockets to handle the readings? and in that case, can some please point me in the right direction.
Thanks in advance.
-x-
In case you ask, the scanner is a COGNEX DATAMAN 500QL
Have you tried downloading the software and drivers from their support site?

Arduino Firmware Recommendation Needed

I have an Arduino-compatible ADK board with USB Host Shield.
(Specifically, it is the Seeeduino ADK Main Board at:
http://www.seeedstudio.com/depot/seeeduino-adk-main-board-p-846.html. It is receiving external USB Power.)
I have a custom USB accessory connected to it, and I need to do something that should be simple for this forum's contributors.
My ultimate plan is to connect an Android 3.2 tablet or phone to the ADK board and tell it to send out a hex packet to my USB accessory. But right now, I need sample code for the Arduino firmware to send hex commands out to my USB accessory.
The packet breakdown is as follows:
STX DAT1 DAT2 DAT3 DAT4 ETX CHK
Name Hex Definition
STX 02h Start of Text Data
DATx --h Text Data
ETX 03h End of Text Data
CHK --h Checksum
Can someone point me to example firmware for my Arduino board to output this data packet to my attached USB Accessory?
Closest thing I could find was the Arduino Serial Reference at:
http://arduino.cc/en/Reference/Serial
Any other responses would be appreciated.
Have you tried the standard Google ADK example?
http://developer.android.com/guide/topics/usb/adk.html
From what I can see on the Seeeduino page you shouldn't have to do anything special. Once that's up and running you can modify the code to work with your message format.

Getting Epson receipt printer to print from Arduino

I'm trying to build a microprinter using an Arduino and an Epson TM-T88II receipt/POS printer. The printer uses the Epson Esc/POS system, but I can't get it to do anything at all from the Arduino. I'm doing things like:
#include <SoftwareSerial.h>
#define out_pin 3
#define in_pin 2
SoftwareSerial printer = SoftwareSerial(in_pin, out_pin);
void setup()
{
pinMode(in_pin, INPUT);
pinMode(out_pin, OUTPUT);
printer.begin(9600);
delay(1000);
printer.print(0x1B, BYTE);
printer.print('#'); // ESC(HEX 1B) # is supposed to initialize the printer
printer.print("hello world");
printer.print(0xA, BYTE); // print buffer and line feed
}
I just can't get the printer to respond at all. The printer powers up and prints its self test just fine. It's a serial (RS-232) printer, and I'm connecting it to the Arduino through a MAX233 chip. I've checked and rechecked my connections through the chip, which I think are right based on a friend who has a similar setup working. I read somewhere that the TM-T88 printers need null-modem serial cables, so I bought an adapter, and that didn't seem to make any difference.
I'm new to electronics, so I'm completely stumped. I just want to get it to print something, so I can get to the fun part - the programming :). Any thoughts on things to test/try? I can give more detail on wiring or anything else, just didn't want this to get TOO long.
Are you using an RS-232 transceiver? The Arduino outputs 0 and 5 V for serial, while the printer uses -12 and 12 V for serial. You should use a MAX232 or similar device to get the correct physical interface. (You might be able to cheat if you invert the serial port on the Arduino, but that might not work, and it's more trouble when just getting started.)
Once that's taken care of, the RTS and DTR may be your problem. You should be able to change the DIP-switch settings on the printer and turn off flow control altogether, or switch it to software flow control.
Also, you may need to send both line feed and carriage return.
However, once all that's done it should print just fine, even without any reset commands. Send a bunch of ASCII characters and line feed/carriage returns, and it'll spit it all out.
You can ignore the RX line (on the Arduino side, TX on the printer side) for now - just send it data until you figure out the wiring, level conversion, flow control, etc.
You could check whether you can communicate with a PC, both from the Arduino and to the printer.
I would use an oscilloscope to see if the serial signals come out of the Arduino and the MAX as they should, but then you probably don't have one.
Are you sure the communication settings are correct? You set the baud rate to 9600, but what about data bits, parity, stop bits? What about the control lines?
I'd hook another PC instead of the printer to the other end of the serial cable and run telnet or PuTTY on that system to make sure you are communicating out and actually talking through the serial port. If so, you could use the same solution to send data to the printer to confirm all settings such as number of data bits, parity, etc.
I've done a similar project and had the same issue. You need a null modem / crossover cable to go from max232 to the printer as both devices are in slave configuration