0

i have a question regarding Rasperry Pi and Arduino. I have them connected via USB and on the Arduino is a NFC Reader connected(via Pins). Can I look on the Rasperry Pi with a command or something similar if the Arduino is connected and see what is connected with the Arduino (If its even possible)?

I know there is the lsusb command or dmesg but they wont show what is connected to the Arduino ?

Thanks in regard

4
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking.
    – Community Bot
    Sep 7 at 17:29
  • 1
    The simple answer is NO! And the more elaborate answer is it depends on your Arduino code ! Please post the code you have on your Arduino! Without the code its just a guessing game!
    – MatsK
    Sep 7 at 17:31
  • On the Arduino I have the DumpInfo Code for the RC522 Nfc Reader, so when I hold a card/chip on the reader it will give me the PID of the card
    – Keiro
    Sep 8 at 12:38
  • And I wanted to see if it is possible to see on the Rasperry Pi if a Arduino is connected and even what is connected to the Arduino?
    – Keiro
    Sep 8 at 12:53
1

Arduino Uno uses a separate chip for USB to UART interface. As a result it will always look like a UART (/dev/ttyUSBx or /dev/ttyACMx) on the Pi, and the only way to exchange information will be to open the UART (with the right baudrate!) and send data to the Arduino, which then can reply and tell what's connected to it.

Arduino Leonardo / Due controllers implement the USB communication directly. On these boards, it's possible that the Arduino will present itself as a different device class, depending on what's connected to it. E.g. if you connect an NFC Reader, the Arduino could connect as a keyboard (USB HID - human interface device), which will allow you to read a password from the NFC and type it directly in the password prompt.

In both cases, the actual logic detecting what's connected to the Arduino is up to you to implement.

In addition to lsusb and dmesg, there is udevadm info which is able to show a lot of info about a USB device, including human-readable vendor and model name strings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.