USB Communication between Arduino Nano and UHF Reader module












0















I am working on a project that requires a UHF reader development kit that can communicate using either RS232 or by USB. Via USB and a Serial terminal, I have been able to send commands to the reader as well as analyze its response.



My goal is to send these same commands to the reader, but through an Arduino Nano. My first instinct was to use the RS232, converting the signal via a MAX232. However, this is for a school project, and my advisor preferred I try to work with USB. I am familiar with UART communication, and I've been under the assumption that USB operates using UART.



I had purchased a USB converter that gives me access to the pins, but it had two additional pins than I was not expecting: CTS and DTR. I attempted to communicate despite these pins (just leaving them open, and connecting Rx, Tx, Vcc and GND as I normally would). When plugged into the UHF reader, the device did power on (as it draws power from the USB connection), however, it did not receive the output signal from the Arduino Nano.



I know that my baud rate and other settings are correct, because, as I have said, communicating via USB and a Serial terminal gives me no problems. My initial thought is that I need to properly connect the CTS and DTR pins, but immediately I could not find a good reference on how to do this, and I am not entirely convinced this is the issue. My other thought was that perhaps I am writing out my HEX values wrong from the Arduino, using a line similar to the following, where "UHF_Reader" is defined by SoftwareSerial:



UHF_Reader.write(0xAA);


However, it appears to me from research that this is indeed the correct way to output HEX values via serial.



My final attempt to resolve this was to connect the micro-USB from the Nano to the USB of the reader, and then use Software Serial in conjunction with the USB converter to analyze the output on a Serial terminal, while powering the Nano via a 5V power supply. However, since the reader draws power from the USB port, it did not even turn on when I attempted this (I am assuming that the Vcc can only be supplied from the USB end?). Regardless, this attempt proved useless as well.



If anyone can offer any advice, or point me towards any references for something similar, I would much appreciate it! I have spent a while on this, and I just can't figure out what the problem is.



For reference, the reader I am using is found here: UHF Reader



And the USB converter I am using is here: USB Converter










share|improve this question













migrated from superuser.com Jan 3 at 15:28


This question came from our site for computer enthusiasts and power users.























    0















    I am working on a project that requires a UHF reader development kit that can communicate using either RS232 or by USB. Via USB and a Serial terminal, I have been able to send commands to the reader as well as analyze its response.



    My goal is to send these same commands to the reader, but through an Arduino Nano. My first instinct was to use the RS232, converting the signal via a MAX232. However, this is for a school project, and my advisor preferred I try to work with USB. I am familiar with UART communication, and I've been under the assumption that USB operates using UART.



    I had purchased a USB converter that gives me access to the pins, but it had two additional pins than I was not expecting: CTS and DTR. I attempted to communicate despite these pins (just leaving them open, and connecting Rx, Tx, Vcc and GND as I normally would). When plugged into the UHF reader, the device did power on (as it draws power from the USB connection), however, it did not receive the output signal from the Arduino Nano.



    I know that my baud rate and other settings are correct, because, as I have said, communicating via USB and a Serial terminal gives me no problems. My initial thought is that I need to properly connect the CTS and DTR pins, but immediately I could not find a good reference on how to do this, and I am not entirely convinced this is the issue. My other thought was that perhaps I am writing out my HEX values wrong from the Arduino, using a line similar to the following, where "UHF_Reader" is defined by SoftwareSerial:



    UHF_Reader.write(0xAA);


    However, it appears to me from research that this is indeed the correct way to output HEX values via serial.



    My final attempt to resolve this was to connect the micro-USB from the Nano to the USB of the reader, and then use Software Serial in conjunction with the USB converter to analyze the output on a Serial terminal, while powering the Nano via a 5V power supply. However, since the reader draws power from the USB port, it did not even turn on when I attempted this (I am assuming that the Vcc can only be supplied from the USB end?). Regardless, this attempt proved useless as well.



    If anyone can offer any advice, or point me towards any references for something similar, I would much appreciate it! I have spent a while on this, and I just can't figure out what the problem is.



    For reference, the reader I am using is found here: UHF Reader



    And the USB converter I am using is here: USB Converter










    share|improve this question













    migrated from superuser.com Jan 3 at 15:28


    This question came from our site for computer enthusiasts and power users.





















      0












      0








      0








      I am working on a project that requires a UHF reader development kit that can communicate using either RS232 or by USB. Via USB and a Serial terminal, I have been able to send commands to the reader as well as analyze its response.



      My goal is to send these same commands to the reader, but through an Arduino Nano. My first instinct was to use the RS232, converting the signal via a MAX232. However, this is for a school project, and my advisor preferred I try to work with USB. I am familiar with UART communication, and I've been under the assumption that USB operates using UART.



      I had purchased a USB converter that gives me access to the pins, but it had two additional pins than I was not expecting: CTS and DTR. I attempted to communicate despite these pins (just leaving them open, and connecting Rx, Tx, Vcc and GND as I normally would). When plugged into the UHF reader, the device did power on (as it draws power from the USB connection), however, it did not receive the output signal from the Arduino Nano.



      I know that my baud rate and other settings are correct, because, as I have said, communicating via USB and a Serial terminal gives me no problems. My initial thought is that I need to properly connect the CTS and DTR pins, but immediately I could not find a good reference on how to do this, and I am not entirely convinced this is the issue. My other thought was that perhaps I am writing out my HEX values wrong from the Arduino, using a line similar to the following, where "UHF_Reader" is defined by SoftwareSerial:



      UHF_Reader.write(0xAA);


      However, it appears to me from research that this is indeed the correct way to output HEX values via serial.



      My final attempt to resolve this was to connect the micro-USB from the Nano to the USB of the reader, and then use Software Serial in conjunction with the USB converter to analyze the output on a Serial terminal, while powering the Nano via a 5V power supply. However, since the reader draws power from the USB port, it did not even turn on when I attempted this (I am assuming that the Vcc can only be supplied from the USB end?). Regardless, this attempt proved useless as well.



      If anyone can offer any advice, or point me towards any references for something similar, I would much appreciate it! I have spent a while on this, and I just can't figure out what the problem is.



      For reference, the reader I am using is found here: UHF Reader



      And the USB converter I am using is here: USB Converter










      share|improve this question














      I am working on a project that requires a UHF reader development kit that can communicate using either RS232 or by USB. Via USB and a Serial terminal, I have been able to send commands to the reader as well as analyze its response.



      My goal is to send these same commands to the reader, but through an Arduino Nano. My first instinct was to use the RS232, converting the signal via a MAX232. However, this is for a school project, and my advisor preferred I try to work with USB. I am familiar with UART communication, and I've been under the assumption that USB operates using UART.



      I had purchased a USB converter that gives me access to the pins, but it had two additional pins than I was not expecting: CTS and DTR. I attempted to communicate despite these pins (just leaving them open, and connecting Rx, Tx, Vcc and GND as I normally would). When plugged into the UHF reader, the device did power on (as it draws power from the USB connection), however, it did not receive the output signal from the Arduino Nano.



      I know that my baud rate and other settings are correct, because, as I have said, communicating via USB and a Serial terminal gives me no problems. My initial thought is that I need to properly connect the CTS and DTR pins, but immediately I could not find a good reference on how to do this, and I am not entirely convinced this is the issue. My other thought was that perhaps I am writing out my HEX values wrong from the Arduino, using a line similar to the following, where "UHF_Reader" is defined by SoftwareSerial:



      UHF_Reader.write(0xAA);


      However, it appears to me from research that this is indeed the correct way to output HEX values via serial.



      My final attempt to resolve this was to connect the micro-USB from the Nano to the USB of the reader, and then use Software Serial in conjunction with the USB converter to analyze the output on a Serial terminal, while powering the Nano via a 5V power supply. However, since the reader draws power from the USB port, it did not even turn on when I attempted this (I am assuming that the Vcc can only be supplied from the USB end?). Regardless, this attempt proved useless as well.



      If anyone can offer any advice, or point me towards any references for something similar, I would much appreciate it! I have spent a while on this, and I just can't figure out what the problem is.



      For reference, the reader I am using is found here: UHF Reader



      And the USB converter I am using is here: USB Converter







      usb






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Jan 3 at 15:24









      KC FordKC Ford

      31




      31




      migrated from superuser.com Jan 3 at 15:28


      This question came from our site for computer enthusiasts and power users.









      migrated from superuser.com Jan 3 at 15:28


      This question came from our site for computer enthusiasts and power users.
























          1 Answer
          1






          active

          oldest

          votes


















          0















          I've been under the assumption that USB operates using UART.




          No. You have it backwards. Devices can emulate a UART (known as CDC/ACM) over a USB connection as one of the many possible device profiles, but it is about as far from being a UART as an F1 car is from a Penny Farthing.



          USB operates on a strict Master / Slave principle. That is, it has a single master device, called the Host, which coordinates all the devices on the bus and makes requests to them. Everything you plug into a USB system is a Device and requires a Host to tell it what to do.



          Neither the Nano, nor this adaptor you bought, are Hosts. They are just Devices. And Devices cannot talk to Devices. Only Hosts can talk to Devices.



          Which means you need a Host in there somewhere. If you want it controlled by Arduino then you need a USB Host Shield (or something similar) which normally communicates over SPI.



          If the device you are trying to talk to uses the CDC/ACM profile then you can use the USB Host Shield with it. If it uses a proprietary profile, like the CH340G or FT232, then getting it to work with the USB Host Shield will be much harder (maybe even impossible) unless you are intimate with the underlying protocol used.






          share|improve this answer

























            Your Answer






            StackExchange.ifUsing("editor", function () {
            return StackExchange.using("schematics", function () {
            StackExchange.schematics.init();
            });
            }, "cicuitlab");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "540"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2farduino.stackexchange.com%2fquestions%2f60289%2fusb-communication-between-arduino-nano-and-uhf-reader-module%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0















            I've been under the assumption that USB operates using UART.




            No. You have it backwards. Devices can emulate a UART (known as CDC/ACM) over a USB connection as one of the many possible device profiles, but it is about as far from being a UART as an F1 car is from a Penny Farthing.



            USB operates on a strict Master / Slave principle. That is, it has a single master device, called the Host, which coordinates all the devices on the bus and makes requests to them. Everything you plug into a USB system is a Device and requires a Host to tell it what to do.



            Neither the Nano, nor this adaptor you bought, are Hosts. They are just Devices. And Devices cannot talk to Devices. Only Hosts can talk to Devices.



            Which means you need a Host in there somewhere. If you want it controlled by Arduino then you need a USB Host Shield (or something similar) which normally communicates over SPI.



            If the device you are trying to talk to uses the CDC/ACM profile then you can use the USB Host Shield with it. If it uses a proprietary profile, like the CH340G or FT232, then getting it to work with the USB Host Shield will be much harder (maybe even impossible) unless you are intimate with the underlying protocol used.






            share|improve this answer






























              0















              I've been under the assumption that USB operates using UART.




              No. You have it backwards. Devices can emulate a UART (known as CDC/ACM) over a USB connection as one of the many possible device profiles, but it is about as far from being a UART as an F1 car is from a Penny Farthing.



              USB operates on a strict Master / Slave principle. That is, it has a single master device, called the Host, which coordinates all the devices on the bus and makes requests to them. Everything you plug into a USB system is a Device and requires a Host to tell it what to do.



              Neither the Nano, nor this adaptor you bought, are Hosts. They are just Devices. And Devices cannot talk to Devices. Only Hosts can talk to Devices.



              Which means you need a Host in there somewhere. If you want it controlled by Arduino then you need a USB Host Shield (or something similar) which normally communicates over SPI.



              If the device you are trying to talk to uses the CDC/ACM profile then you can use the USB Host Shield with it. If it uses a proprietary profile, like the CH340G or FT232, then getting it to work with the USB Host Shield will be much harder (maybe even impossible) unless you are intimate with the underlying protocol used.






              share|improve this answer




























                0












                0








                0








                I've been under the assumption that USB operates using UART.




                No. You have it backwards. Devices can emulate a UART (known as CDC/ACM) over a USB connection as one of the many possible device profiles, but it is about as far from being a UART as an F1 car is from a Penny Farthing.



                USB operates on a strict Master / Slave principle. That is, it has a single master device, called the Host, which coordinates all the devices on the bus and makes requests to them. Everything you plug into a USB system is a Device and requires a Host to tell it what to do.



                Neither the Nano, nor this adaptor you bought, are Hosts. They are just Devices. And Devices cannot talk to Devices. Only Hosts can talk to Devices.



                Which means you need a Host in there somewhere. If you want it controlled by Arduino then you need a USB Host Shield (or something similar) which normally communicates over SPI.



                If the device you are trying to talk to uses the CDC/ACM profile then you can use the USB Host Shield with it. If it uses a proprietary profile, like the CH340G or FT232, then getting it to work with the USB Host Shield will be much harder (maybe even impossible) unless you are intimate with the underlying protocol used.






                share|improve this answer
















                I've been under the assumption that USB operates using UART.




                No. You have it backwards. Devices can emulate a UART (known as CDC/ACM) over a USB connection as one of the many possible device profiles, but it is about as far from being a UART as an F1 car is from a Penny Farthing.



                USB operates on a strict Master / Slave principle. That is, it has a single master device, called the Host, which coordinates all the devices on the bus and makes requests to them. Everything you plug into a USB system is a Device and requires a Host to tell it what to do.



                Neither the Nano, nor this adaptor you bought, are Hosts. They are just Devices. And Devices cannot talk to Devices. Only Hosts can talk to Devices.



                Which means you need a Host in there somewhere. If you want it controlled by Arduino then you need a USB Host Shield (or something similar) which normally communicates over SPI.



                If the device you are trying to talk to uses the CDC/ACM profile then you can use the USB Host Shield with it. If it uses a proprietary profile, like the CH340G or FT232, then getting it to work with the USB Host Shield will be much harder (maybe even impossible) unless you are intimate with the underlying protocol used.







                share|improve this answer














                share|improve this answer



                share|improve this answer








                edited Jan 3 at 16:11

























                answered Jan 3 at 15:39









                MajenkoMajenko

                67.5k43277




                67.5k43277






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Arduino Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2farduino.stackexchange.com%2fquestions%2f60289%2fusb-communication-between-arduino-nano-and-uhf-reader-module%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Plaza Victoria

                    In PowerPoint, is there a keyboard shortcut for bulleted / numbered list?

                    How to put 3 figures in Latex with 2 figures side by side and 1 below these side by side images but in...