Thermal printer serial communication - serial-port

I have aquired a Citq H10, which is, in essence, an android tablet attached to a thermal printer. I pretty much made a paper weight out of the tablet, it doesn't start anymore, and I can't seem to do anything about it.
On the driver board of the printer, there is a MAX232 equivalent (UM3232EESE) so it would be evident, that it communicates over serial (rs232).
I have connected a DB9 connector, and I'm positive, i've done it right (the cursor on the terminal of COM1 pauses when turning on the printer).
There were a few test apps on an SD Card, and I reverse engineered some of it, I figured out, that it send info by copying bytes to the file of the port (I think). I tried copying the same bytes, but nothing happened.
So my question after all this text is: would I need a specific driver or do you see anything else wrong with my methods?
Tl,dr: can I use a thermal printer by copying bytes to it?

Related

Arduino mega entry point address

I am working on a fresh arduino mega rev3 device.
I want to understand how it works and i need to disassemble flash memory dump.
I have seen that bootloader starts at address 0x3E000
What i want to know now is where does the main program starts in memory.
Thanks
Where the bootloader starts (if it's used) depends on fuse settings. If you have compact bootloader, you can use smaller BOOTSZ. If you're using ICSP header for uploading user program, you don't even need bootloader at all.
Anyway, program starts at 0x0000 on this chip.

Serial communication crashes in LabVIEW

I am controlling a device over serial connection using LabVIEW (version 7.0). It is connected using USB, and is installed as a virtual serial port on the computer (running Windows XP). Every now and then my device crashes when my program sends a command, and it is unable to accept any more input (the device itself also stops working) until it has timed out.
I've looked at the serial port traffic using Portmon. Whenever the device crashes the serial driver sends the command I send using my program four times instead of just once, with an IOCTL_SERIAL_GET_COMMSTATUS command in between. I cannot see what this last command returns, but I assume something happens in the communication earlier on. I'm thinking my configuration of the port is not entirely right, but I have no idea how or why. I open and close the connection to my device every time I want to write something to it.
For completeness' sake: it has a baud rate of 9600, 8 bits, no parity, 1 stop bit, and no flow control. I'm aware that the correct settings of these parameters depend on the device, but the manufacturer has not supplied any recommended settings.
The driver is a DLL of some sort? If so, this is the most likely source of your problem, and you likely will need to contact the author of the driver. LabVIEW does have crashing bugs, but by far the most common source of crashes in simple communications apps is a buggy third-party DLL.
In other words, I doubt this is a LabVIEW problem at all and that you would have the same difficulty if you wrote a C program to talk to this driver. I only know what you've posted here about your system, but after many years of chasing down such issues, I would start with the device manufacturer/driver author.
If you have evidence to the contrary, please share.

Serial Port not working on Surface Book

I have a Microsoft Surface Book that I've dual booted Linux Mint on. I'm writing a program that needs to read in data from a serial port, but my serial ports don't seem to be working. The behavior is consistent across Mint and Windows (Testing done through Cygwin). It gets a bit of data the first 2-5 seconds that the device is plugged in (viewing the data through screen, same thing happens if I just use pyserial to print data incoming from serial port), then nothing.
What could be happening? I think I've isolated the problem to the serial ports - the Surface Book has 2 USB ports and the same thing happens on both of them, and I've tested the hardware that I'm plugging into it on 2 other computers (One Linux and one Mac OS), and it works fine on both of those.
Your MS Surface, seemingly, has a yellow triangle exclamation mark icon (over the adapter icon) without any driver to install/download. And properties in the device status box window say This device cannot start. (Code 10) or A device which does not exist was specified. Right?
If it's so you should wait for an update from MS. It's notorious problem.
I ended up getting the computer replaced on warranty for an unrelated issue months later, and what do you know, on the new computer the serial ports work fine. That indicates to me some sort of hardware problem, given that the issue persisted across OS's.
maybe this will help:
see Arduino examples for serial port communication - search google:
arduino serial c++
arduino serial c#
arduino serial c++ linux
the point is to open port properly you need to open a file, not a port. not with usual c - assembly write to port code.
another option you are using an unintentionally bought fake USB to serial cable with a Fake PL2303 chip
then you need to install the old version of the driver.
search in google:
Fake PL2303 + your os name:
install driver Fake PL2303 windows 10
another option is maybe it conserves energy and closes the port because it feels it is unused.
in windows> device manager,> properties of a device - usually USB root hub > power management - allow the computer to turn off this device to save power - uncheck it.
https://superuser.com/questions/408683/why-my-usb-mouse-gets-suspended-after-3-seconds-of-inactivity
https://blogs.msdn.microsoft.com/usbcoreblog/2013/11/08/help-after-installing-windows-8-1-my-usb-device-doesnt-charge-or-it-disconnects-and-reconnects-frequently/
also, you could look in windows events - to see what happens. usually, failures like this are registered in the events log.
an unlikely option is it consumes too much current, like a short circuit. and the device protection circuit shuts the chip off. also probably it does not have such circuit. one possibility is to try with an external powered hub.
the most probable of these is the power saving mechanism
I was experiencing the same problem - came across the solution on another site. The USB 3 ports on Surface Book aren't compatible with something or other to do with Com Port but running the device through a cheap USB hub solved my problem straight away and it was instantly recognised by the Arduino IDE

Upload hex using USB CDC from microcontroller as host

So has anyone done this?
I'd like to store a hex file on an SD card and just blast it to any boards I have with the catarina bootloader on them when I connect to my uploader device.
This seems to be the correct protocol to talk to the catarina bootloader (the command definitions are at the end.) http://www.atmel.com/images/doc1644.pdf
If I manually force it into programming mode from COM4 by setting it to 1200 baud and closing the port, then opening COM5 and sending it one of the commands I do get a response as I would expect but even if I put it in programming mode by sending "P" it dropps back out after a second or two and doesn't stay in programming mode as I would expect.
It seems that the timeout gets reset/extended if certain commands are sent so I guess that makes sense.

Arduino programming using USB download fails on Windows 2000

I have a number of Windows 2000 systems that we are trying to use to program the new Arduino Uno and Mega devices. These boards now come with a USB connection, an upgrade from the prior FTDI. I'm not able to download the Arduino code into the board from a Windows 2000 system
The supplied drivers are *.inf files that modify the standard USB driver that comes with Windows (in this case Windows 2000).
I go through the process of setting the port, setting the device and doing the download. The download fails, and the apparent error is that the PC can not communicate with the board. I've checked the port, adjusted the baud rates, etc. I've even moved the port number from a high port number (ie COM12) to a lower port (COM2) without any success. I do see activity on the rec/xmt lights on the Arduino board, so some type of data is being sent and received.
I'm looking for:
Someone who has been able to download files from Windows 2000 to the Arduino
or
A way to shim inside the USB driver to be able to watch the traffic going up and down to the board so I can continue to debug this.
or
Some general tips for things to look at in the .inf file that need to be set/not set to make it work on Windows 2000.
I know the boards work I've used them on a different set of Windows XP systems. So I know to some extent the install is good and that most of what I have works.
Full dumps can be found on the Arduino forum, http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1291090110/.
This is the information produced by the AVRDude program while it's trying to download the code.
this could be a long shot, but I jsut recentlz had problems uploading too. Fist of all, how long is the USB cabele you are uploading from? Mine in one case was too long and th arduino woul lose sync. Secondly, and this might just be a silly oversight (like i did) do you have things wired in the digital pin 0 and 1? These are used for the communication, and if there is anything else plugged in to them the upload will also fail.
As I said, long shot but those were two errors I had.

Resources