Good morning,
I am developing a kiosk application. In that application i need to send some commands to a printer with ESC/POS protocol.
I have some commands that give me information about printer (printer status, end of paper status). For sending command I use this function, but I need also to read the printer reply.
How can I do it? (The printer is connected in USB mode).
I'm developing on delphi xe2
Thanks
The example is assuming that your string type is simple such as shortstring. Try declaring s as shortstring. It can not work with widestring or unicode.
Did you check if the USB connection makes a new serial port?
If a new serial port displayed in device manager, I can help you to send the ESC command with a Delphi Comport component.
But if there is no serial port shown up, I have no idea about how to control the thermal printer.
Related
I have a Windows XP machine that is connected to a cash drawer via an RJ12 cable.
As per the manufacturer's instructions here:
http://www.aures-support.fr/UK/faq/galeo/
the cash drawer is on I/O address of HEX 4B8 (decimal 1208).
There is software running on the PC that opens the drawer correctly, plus the testing scripts provided by the manufacturer's website also work. This indicates that the drivers must be working correctly. And the manufacturer's defaults are all there.
How can I send a message to the I/O address to test this, and with what script/method should I do this? Command line?
(As per the link, in the device manager there is a "prolific COM port", on COM7. I've tried testing the drawer by sending a message to COM7 from both the command line and using JS with a nodejs script running. Neither have worked. This makes me think that simply addressing the COM7 port by name is not enough, and that I need the exact I/O address. I'm happy to be corrected on this assumption.)
Much appreciated.
I'm doing a project to build printer using a microcontroller via USB. The MCU's USB is configured as printer class when I plug the MCU into the PC so that it is identified as a printer. I've installed generic/text only driver available with windows and hence i can see my printer in "devices and printers" listed under printer category.
My question here is if I want to print whatever is sent to the printer, I need to know the data being sent from PC. For example, if I print a pdf, I want to know what data is sent i mean the format like HEX values or anything like that. Once I know what is coming into the controller I can print.
Any input here is welcome.
Thanks in advance
Well, since your printer setting is a simple generic/text only, the data sent will be the text content of the PDF. No markup, not even bold text or italics. Any pictures in the PDF will not be sent at all.
If you wan more than that, you can write a driver for your printer. As the driver writer, you determine what's sent to the printer.
I am working a project from my school. We are using a microcontroller to send integers over bluetooth (Sparkfun's bluesmirf) to an android device.
Because different people need the microcontroller I am wondering if it is possible to programmatically send send data over bluetooth to my android phone via my laptop's bluetooth?
I previously was testing we CoolTerm, but I am only able to send data manually by pressing the Enter key each time.
I want to create a loop that sends a random number (12 digit long) over and over (differnet int each time) from my HP Pavilion DV7 laptop? I am using Windows 7 Ultimate, and Coolterm 1.4.1.
My solution to this problem was using RealTerm.
I creared a *.txt file with the ints in each line (copy+paste from Excel table - made it easier). Then, after I connect to the Laptop's bluetooth port under the Port tab, I go to the Send tab and use the Dump File To Port option and add the *.txt file I created. Also, I used 999 as delay to send each line every 999miliseconds, and under repeats I changed from 1 to 0 in order to make it reapet until i press Stop.
Check out this Codeplex project - http://32feet.codeplex.com/ it allows you to open up Bluetooth sessions using C# through the native Windows stack. It will also allow a Bluetooth Serial Port (SPP) session which is what you'll want to use to connect to your device. The project is fairly longstanding and has a good amount of documentation on the site or on blogs if you Google.
Is that possible to send characters to currently open text box via IME ? What I am trying to do is that I have Bluetooth module that handles connection between Bluetooth keyboard and windows mobile device , when user press key on Bluetooth keyboard Bluetooth module receive it and send it to currently open text box via IME. You Comment will greatly help me as i am newbie in Windows Mobile development.
if the BT keyboard is using the HID protocol you do not need any additional software. All key strokes should be automatically routed as keyboard input to the right input.
If you need to write your own software, you need to open a COM port connection to the BT keyboard. Then your app can receive the BT keyboard messages and issues them as keyboard messages. See also http://www.hjgode.de/wp/2011/11/10/keywedge-updated/
But at all, your WM6.5 should have the HID drivers and so, after connection to the BT keyboard you do not have to do anything more.
Post the device model name, if you need more assistance.
regards
Josef
I have problem with Zebex Z-3000 barcode scanner. It is connected to my PC via PS2 port. Does anybody knows about PS2 scanners. I had no problem with USB scanners but I ca't get PS2 scanners work. Do I have to listen PS2 port?
No, usually PS/2 scanners will simulate keypresses as if the barcode's value had been typed on the keyboard.
Is it recognising the barcode but not sending data, or not even beeping?
Scanners generally come with (or you can obtain) a set of configuration barcodes to control the types of codes it recognises and how the values are formatted (whether it appends a carriage-return, for example). You could try contacting the manufacturer or scour their website (now that it's working again) to find these.
I also have a barcode scanner with PS/2 connector. A "keyboard wedge" y connector to be precise. When I plug only the scanner to the PC and perform scanning, I only head a beep sound without any text written in text editor, which I use to test it.
Now, when I plug a PS/2 keyboard into the Y connector, so it's keyboard+scanner connected to the PS/2 port, I could see some text written in the text editor when performing test.
So, the key point is that you need to have the keyboard attached to the Y connector.
PS/2 barcode scanners are "keyboard wedge" scanners that plug in between a PS/2 keyboard and a computer's PS/2 port. When a barcode is scanned, they send the data to the computer as if it were keyboard input.
The ZEBEX Z-3000 barcode scanner has a set of configuration barcodes. Try to use those to get the scanner working if when you try scanning into Notepad, the scanner does not send any data. The scanner might be incorrectly set to RS-232C or USB mode (instead of PC/AT mode), or the barcode symbology you are trying to scan might not be enabled.
(Users of other models of barcode scanners should consult their respective manufacturers' programming guides instead.)