OPOS Configuration.xml DevicePath Property - c#

We use a windows iot version to do a cash drawer Service Object of OPOS.
We open the cash drawer using GPIO pin,so we communication with system
using Physical Memory address to do a open
We don't know how to set a Hardware Device Path of Configuration file of POS.NET
environment.
Someone could help us to deal with the Hardware Device Path problem?
<Device HardwarePath="0xFED0C1D8" Enabled="yes" PnP="no">
<LogicalName Name="WASPCD" />
</Device>
The HardwarePath="0xFED0C1D8" is our GPIO address ,is that right?

If the cash drawer service object you are using is made by OPOS instead of POS for.NET, you do not need to write the configuration.xml of POS for.NET.
Please make sure that Common Control Objects are installed.
Follow the procedure below to open the cash drawer device in the application.
2-1.Acquire the device collection by calling the GetDevices method with CashDrawer as the type parameter and Opos or OposAndCompatibilityLevel1 as the compatibility parameter.
2-2. Search the device information with the device name key or logical device name of the device being used defined in the OPOS registry from the acquired device collection, and perform CreateInstance based on it.
2-3. Call Open method using created object.

Related

using Ip address for Printer With PosExplorer Opos SDK.Net using C#

I had a code like this before using a device name of printer but we migrated
and now using ip address on printers my existing code looks like this
...
internal void ProcessInformation()
{
PosExplorer posExplorer = new PosExplorer();
DeviceCollection receiptPrinterDevices = posExplorer.GetDevices(DeviceType.PosPrinter);
DeviceInfo receiptPrinterDevice = posExplorer.GetDevice(DeviceType.PosPrinter, "SRP2");
PosPrinter printer = (PosPrinter)posExplorer.CreateInstance(receiptPrinterDevice);
printer.Open();
printer.Claim(10000);
printer.DeviceEnabled = true;
printer.PrintNormal(PrinterStation.Receipt, "test print 1");
}
...
i need help for starting like how do i make a code using PosExplorer connecting the api to the printer using ip address and do a print with header and body format?
How you specify it depends on the type of service object provided by the printer vendor and how it is set.
There seems to be no standardized general purpose method using the POS for.NET API.
A possible method would be to use the native POS for.NET module as the service object and use PosCommon.DevicePath Property (POS for .NET v1.12 SDK Documentation).
Remarks
The PosExplorer class tries to initialize the DevicePath property to the hardware path of the physical device by using the following algorithm:
1 and 2 are methods to write the information to be set in advance by another means.
If the physical hardware supports Plug and Play and the Service Object is mapped to a specific hardware ID through the HardwareId custom attribute or a configuration XML file, the PosExplorer class sets the DevicePath property to the HardwarePath property of the physical device. Service Objects can typically use this DevicePath property to directly access the device.
If the device does not support Plug and Play, but has been configured through Posdm.exe or WMI, the DevicePath property will be set to the path that is specified when the device was configured.
It is possible that 3 can be set dynamically when the application program is executed.
If the device does not support Plug and Play and has not been configured through Posdm.exe or WMI, the DevicePath property will be set to empty string ("") and must be set by the Service Object before the Open method in the base/basic class can be called.
If you were using OPOS for your service object, you probably need to change the Windows registry settings, so there's nothing you can do when you run your application.
In any case, please ask your printer vendor if they support it and how to do it.

Monitor cashdrawer opened or not using EPSON printer in C#

We have Point of sale application.
We don't want to start the billing while the cash-drawer is open.
I saw EPSON is having the "Auto Status Back" function.
I have installed the "OPOS for dotnet" from the EPSON website.
It does open the cash drawer and prints to the printer.
But when it comes to "cash-drawer open/close status", it is always returning false.
The sample C# application is provided by EPSON, has OnStatusUpdateEvent event.
It is firing when I open the printer cover, power on/off. But not firing when the cash-drawer is open/close.
I have tried this sample code using ESC-POS.
Here also am getting "IsCashDrawerOpen = false" always.
{
"IsWaitingForOnlineRecovery":false,
"IsPaperCurrentlyFeeding":false,
"IsPaperFeedButtonPushed":false,
"IsPrinterOnline":true,
"IsCashDrawerOpen":false,
"IsCoverOpen":false,
"IsPaperLow":false,
"IsPaperOut":false,
"IsInErrorState":false,
"DidRecoverableErrorOccur":false,
"DidUnrecoverableErrorOccur":false,
"DidAutocutterErrorOccur":false,
"DidRecoverableNonAutocutterErrorOccur":false,
"DeviceConnectionTimeout":false
}
The printer model is EPSON TM-T82(Connected Via USB).
The cash-drawer is connected via an RJ11 cable connected to the printer.
Can anyone help?
The "Auto Status Back" function is automatically processed inside the OPOS or POS for.NET service object and is not visible to the application.
For "It is firing when I open the printer cover, power on/off.", It is possible that PowerState Online/Offline is notified instead of Open/Close of the CashDrawer.
Please check the value of the status property of StatusUpdateEventArgs.
For "But not firing when the cashdrawer is open/close.", The open state sensor of the CashDrawer may not exist, is not connected, or may be broken. Or the setting by Setup POS (Which is Open state, LOW or HIGH?) May be different.
Are the CashDrawer and connection cable EPSON's? If it is from another manufacturer, is it listed in information such as EPSON's confirmed operation list? Please check it.
By the way, OPOS and ESC-POS-.NET are separate and independent, and there will be little information that can be complemented by arranging them side by side.
You can find the connector wiring diagram on page 68 of the document that you can download from this page.
TM-T82 (Singapore & India Model) Technical Reference Guide
Is it supported and connected?
Or, since the previous page describes the buzzer unit that connects to the drawer kick connector, it may be set to the mode to connect this unit.
Please refer to the setting description starting on page 54 to check.

im have trouble with adding pos printer to posdm (configuration.xml or command line adddevice)

I am having trouble with adding my Pos Printer to PosDM in Configurattion XML and with command line add device.
i had searched a lot about this but got nothing Useful
i had tried the command line add device like:
"posdm adddevice SWD\PRINTENUM{9475957E-9973-435B-AF15-4591F5938233} /type:PosPrinter /soname:"EPSON TM-T82 ReceiptSA4"
by using this i got "no SO found that matches!"
i also added the logical name of device in configuration.xml:
but when i use the command "Posdm listdevices" i doesnt show me my printer
"SWD\PRINTENUM{9475957E-9973-435B-AF15-4591F5938233}" is the DevicePath as a standard Windows desktop printer.
EPSON OPOS/OPOS for.NET should not support that mode.
If it is visible on the device manager, it is a usage mistake.
Disconnect the printer, uninstall the printer driver, use the OPOS ADK for.NET, see Appendix-C in the appropriate printer manual, change the hardware settings, and reinstall the device driver (USB serial?) .
Configurattion XML of PosDM settings should be set in the GUI by running the SetupPOS tool of EPSON OPOS for.NET as an administrator instead of the command line.
For details, refer to the SetupPOS User's Reference Manual.
To set the default printer in code behind try:
app.ActivePrinter = "EPSON TM-T82 ReceiptSA4";

Set USB keyboard status in C#

I need to send output reports to a USB "keyboard", but Windows returns an invalid handle when using CreateFile on the USB device. This is because Windows has the device open in exclusive mode. How do I still send output reports to the keyboard?
I have already looked into the HidP_Xxxx functions, but they all require the CreateFile to succeed with a valid handle. Also the Direct Input's SendDeviceData's documentation says that no device will work with it and to use HID instead. The link to HID documentation is broken on that page.
maybe this is an issue of the driver (the .inf file) of the barcode scanner and some specific keys it sets in registry, see the following links
http://www.cypress.com/knowledge-base-article/exclusive-access-usb-device
https://msdn.microsoft.com/en-us/library/windows/hardware/ff563827(v=vs.85).aspx (specifying exclusive access to device objects)
https://msdn.microsoft.com/en-us/library/windows/hardware/ff548407(v=vs.85).aspx (IoCreateDeviceSecure routine)
https://msdn.microsoft.com/windows/hardware/drivers/install/inf-addreg-directive
https://msdn.microsoft.com/en-us/library/dn790026(v=vs.85).aspx (register and initialize the barcode scanner driver)
https://msdn.microsoft.com/de-de/library/windows/desktop/ee416848(v=vs.85).aspx (Cooperative levels)
maybe use a program like USBDeview to clean the registry and reinstall the scanner again (check the inf file for the AddReg entry) or try to remove the exclusive access registry key for the barcode scanner manually
in addition the windows 10 hidscanner.dll seems to be buggy https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware/pos-hid-barcode-scanner-drivers-being-deleted/206b5354-06e0-47cb-98b8-805f525e130e , https://answers.microsoft.com/en-us/windows/forum/windows_10-hardware/windows-10-with-pos-hid-barcode-scanner/2adc8ea9-556c-4b85-98fe-3b625c37ab76

NI USB-6363 BNC User Access Pins

Does anyone know what the User Access Pins are used for in the USB-6363 device? What type of signal are they supposed to read and what are they capable of doing?
USB-6363 BNC Front Panel
The USB-6363 BNC device is matching the BNC-2120 terminal interface. The "USER" BNC and screw terminals do not connect to the DAQ device, but only to each other and act as convenient patch spots to bring in external signals.
The BNC-2120 Installation Guide (page 13) has more information.

Categories

Resources