-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem reading output from device #2
Comments
Have you tried with Putty to debug the communications protocol? |
I'm quite new to the hardware layer :) I tried connecting to the device with Putty, but nothing happens. there is no prompt. When I set the wrong COM port, Putty says it cannot connect, but when I enter the correct one nothing happens. |
There will be no prompt, it doesn't work exactly as when you use Putty to connect to a Linux server where a shell welcomes you. |
If you selected "Serial" as the "Connection type" in Putty, and are using the correct COM port, then the problem may be the command you are sending. You may check the manual for that device to know what it actually expects, it may be it expects a new line at the end, a null character, or to have a prefix before sending the message. |
Putty is sending diffrent line endings than the one that my device is expecting, so it's not processing my messages. I don't have the time to diagnose it more - it's not key feature of my app :) |
OK, if you later need it, in Putty you can press Ctrl+J to send a line-feed, and Ctrl+M for a carriage return. So instead of pressing the ENTER key, you make any combination of those two. |
I'm trying to use SerialComm to retrieve data from barcode scanner. When I connect to it via Putty and scan a barcode the code appears on the screen. When I use included JustRead example, app succesfully connects to the device, but after scanning nothing shows up. What might be the problem? I'm using Datalogic Quickscan QD2430. |
Hi Jakub, The Unity part of SerialCommUnity needs a '\n' at the end of each message your hardware sends, it's with that line terminator that it decides where a message ends. Are you sure your hardware is sending that? If not, then the code that reads from the COM port in Unity needs to be changed so it knows when a message ends. That's the first reason I could think on top of my head about why the library doesn't work with your hardware. You mentioned a JustRead example, is that an example for your specific hardware? I couldn't find it online to take a look to that device's protocol. |
You were right. It was all about the line terminator. I found this example: |
OK, in that case, it is all about changing the line of the library how to detect an end-of-message. For some devices, all messages are of a fixed length; in others, there is special char terminating the message (like a '#', '.', '\n', etc.). |
I was able to send data to my USB Based Micro controller (Maple Mini) but can not receive data from it . Tested with the Demo scene DemoScene_AutoPoll from the package . Tested it on putty and it works fine was able to log the data recieved from Port . |
Hey thanks solved it be enabling DtrEnabled flag .. which is by default set to false :-) |
Good to hear it's working :) |
My device is based on USB-COM converter by FTDI CHip. Maker of the device (our inhouse electronics guy) assured me, that on command "@rel#1@" device should respond with "@rel#ON@", but nothing comes out of library. When sending "@rel#1@" the device does what it's supposed. How can I know what's the problem? Is there any other way, to recieve data from the device with the library?
The text was updated successfully, but these errors were encountered: