GithubHelp home page GithubHelp logo

Comments (14)

dwilches avatar dwilches commented on July 24, 2024

Have you tried with Putty to debug the communications protocol?
If in Putty your device responds with "@rel#ON@" but not with SerialCommUnity, then it may be your device doesn't respond with a newline at the end of the response. Could you check if it is that?

from ardity.

jakubgondek avatar jakubgondek commented on July 24, 2024

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.

from ardity.

dwilches avatar dwilches commented on July 24, 2024

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.
In the case of COM ports, it will show an empty screen once connected, and everything you type in there will be forwarded to the COM port. So just go ahead and start typing your command.
You will find out if you need to pass a newline or not, and how the returned data looks.

from ardity.

jakubgondek avatar jakubgondek commented on July 24, 2024

Nothing happens when I write my command "@rel#1@", the device doesn't respond, nor behave like it should.

from ardity.

dwilches avatar dwilches commented on July 24, 2024

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.

from ardity.

jakubgondek avatar jakubgondek commented on July 24, 2024

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 :)

from ardity.

dwilches avatar dwilches commented on July 24, 2024

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.

from ardity.

jakubgondek avatar jakubgondek commented on July 24, 2024

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.

from ardity.

dwilches avatar dwilches commented on July 24, 2024

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.

from ardity.

jakubgondek avatar jakubgondek commented on July 24, 2024

You were right. It was all about the line terminator. I found this example:
https://code.msdn.microsoft.com/windowsdesktop/SerialPort-brief-Example-ac0d5004#content
with reading data by bytes and the data is read but it waits for the terminator to dispatch. Probably that was also the case with my previous question. By JustRead example I meant DemoSceneUserPoll_JustRead scene you provided.

from ardity.

dwilches avatar dwilches commented on July 24, 2024

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.).

from ardity.

Salma175 avatar Salma175 commented on July 24, 2024

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 .

from ardity.

Salma175 avatar Salma175 commented on July 24, 2024

Hey thanks solved it be enabling DtrEnabled flag .. which is by default set to false :-)

from ardity.

dwilches avatar dwilches commented on July 24, 2024

Good to hear it's working :)

from ardity.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.