i wanna print to a receipt printer. This would be plugged to a RS323 port. Mostly over a USB adapter.
The reason is, that I try to implement a small cashier app. So there would it be fantastic if I can print through a receipt printer device.
So my Question is, is it possible to communicate with this device within a windows store app (WinRT)? Or is that not possible in general?
Serial and parallel ports are not supported in WinRT as can be seen in: MSDN
There is a line in the table describing that there is no WinRT alternative for the serial and parallel port support that existed int the Win32 API.
Best regards
Related
I'm currently writing a code in C# that would allow the user to read from the usb COM port (I currently have a microcontroller feeding it constant values to the usb port through serial print) and print it to the output of visual studio.
I've been reading up on a lot of documentation, specifically the MS's guide to conecting to USB:
https://msdn.microsoft.com/en-us/library/windows/apps/xaml/dn312121.aspx#step1
but I'm now finding that the USB device isn't supported.
However, would it be possible to simply read from the Serial port instead of entirely connecting the USB device to the project?
Since it's a Store App, I can't use Serial.IO.Ports
I have this system ive been working on where in the user has to print in a bluetooth thermal printer after every transaction. Can someone give me a source reference or a sample code for this particular function? he bluetooth printer brand is just generic, most of the sources in the website all have brands particularly Zebra. But i wont be using that since it might be different. any help would be nice. Thanks!
Please see inTheHand (or 32feet.net) for a framework using Bluetooth.
You need to discover and connect to the BT printer and then use a socket stream to send print commands.
You may also use RegisterDevice with the BT mAC address and then use the provided serial COM port to communicate with the printer.
To be more detailed you need to describe your needs in more details and shorter english sentences.
I'd like to write a simple C# app to collect the output of a Zebra printer's magnetic card reader. (Model RW420) My only interface to the device is USB. The CPCL language specifies an MCR command for this purpose, but I cannot figure out how to issue this command to the printer via .NET. Neither the online documentation nor support staff can tell me. Does anyone have an idea?
You need to write native code in order to read back from USB (using pInvoke). You need to find the usb device path with Zebra's vendor ID in it. You would pass this device path to CreateFile
see: MSDN Create File
Please note that the RW420 manual (page 29) states:
Note that the RW series USB port is
intended for setup and maintenance of
the printer only and not for permanent
communications use to a terminal.
We have networked Zebra printers here, so my best guess is that if you can communicate over USB, in the way you intend, there will be a serial (or parallel) port exposed to talk to given by Zebra's USB driver. Start by looking in the Device Manager in Windows. If this is the case, you should be able to do standard serial communications to the printer, and follow the CPCL manual for querying the magstripe reader (see page 10-23 of the CPCL manual)
I want to write 2 programs with C# one work on PC, the other work on a windows mobile phone.
So I want the PC program to send a signal via Bluetooth ( 1 byte maybe) to the windows mobile phone. and the mobile program (which work on background) handles and accepts this byte without the need of pairing.
how to code this?
please I need any kind of help.
My library 32feet.NET should be useful...
Device Discovery can be done with BluetoothClient.DiscoverDevices, and sending data should be done with classes BluetoothClient and BluetoothListener, see the User Guide for more info.
If your phone can use Serial Bluetooth adapters (RFCOMM), you could send it using the serial class.
I am working on an embedded Windows CE project and am interested in accessing a USB HID device through one of its USB Host ports. All I really need to read are the raw HID specification packets.
On a Windows computer, I have a working program using hid.dll, but as far as I have researched, there isn't any equivalent on Windows CE. I know there is the usbhid.dll file, but I'm not sure if it is applicable for this situation. I would prefer not to write a kernel level driver, as I would like to do my coding in C#. How can I make consuming an HID device on Windows CE work?
I have no concrete experience with HID, but accessing the USB port as a COM port with a proper driver DLL (the device manufacturer might have one) might help. Theoretically you should be able to receive the device's raw data packets with a SerialPort class that way.
Toradex released their USB sensors and peripherals as open source.
The sensors are HID devices and the freely available source code does include samples for C# and Visual Basic on Windows CE.
Oak Sensors and Interfaces