Find my arduino on any computer

I need to be able to have computer software to uniquely find my arduino running my code, even if it is plugged into another computer or compiled to a new arduino. I will have to make my own arduino board eventually, so I don’t think focusing on the usb driver chip (as I have read) would be the best idea. I don’t have much experience with arduino at all; however will be using C++/C# on the computer side.

Are you able to install a C++ or C# program on the computers where the Arduino might be attached? Or do you want it to work even for computers outside of your control?

What for the which?

Is this some kind of copy protection? You don't want people stealing your code and uploading it onto their own Arduinos?

If you released your code, then people will copy it. They may even modify it to remove the 'phone home' function. If you don't release it, then your code is safe.

The program which will be looking for the arduino would be distributed to the computers. It is not for copyright protection, but for easy grabbing of that specific arduino (By some said static information of which I don’t know and am asking about).

Could you be more specific than "grabbing" and "finding"? What is it that the interface between computer and Arduino must do? Once it is "found" must it do more?

I don't get it.

When you plug the Arduino into a computer, you probably know where it is . . . . plugged into the computer.

How about...

You know how 'your' Arduino responds, so...

  • Check all the COM ports, and on each one that is not already open (by some other app)
  • Save the current port config - then set for your nominated bps etc.
  • Send an ENQ message (of your own choice)
  • Listen for a reply (ACK ?) of you own choice.
  • If it's your device - keep going
  • If it's not yours... then restore the 'previous port settings'.
  • Repeat and rinse for all possible ports.

This is for automation. I do not want to have to cycle through and find it myself, and people who are not technologically smart in the slightest will be using it- meaning i have to idiot proof it; figured you guys would have figured that out when it says ‘find’. And as you should have also figured it, as I said, for sending/reading pins of course; what else would you use an arduino for?

So what's wrong with reply #6 ? I've used that successfully with zombie users.

btw FIND == LOCATE You can do this in code on the PC

I did not see #6 when I typed my response.

So using whichever method of connecting to USB, I would have the arduino constantly send a specific/unique message, and cycle through all ports till I find the one to listen to?(Send a reply to switch arduino to normal functionality)

Which form of digital messaging should I use for directly connecting arduino to USB (given that I will have to make my own arduino board)? I need to have arduino send a good chunk of data (at most 4Kb. NOT data stored on the arduino, but data for arduino reading MFC chip- which i believe runs over i2C at 7bits of data per block with 1 extra bit for read/write), but I am not 100% on that.

Would be awesome if I could easily connect arduino to compile blocks from 7-bits to 1bytes; but I guess the computer portion could easily handle that.

So using whichever method of connecting to USB, I would have the arduino constantly send a specific/unique message, and cycle through all ports till I find the one to listen to?(Send a reply to switch arduino to normal functionality)

NO. The Arduino is [u]listening[/u] when it's not [u]connected[/u]. Only if it sees your PC app looking for a device on that specific serial port will it respond and start the host-slave session.

Which form of digital messaging should I use for directly connecting arduino to USB (given that I will have to make my own arduino board)? I need to have arduino send a good chunk of data (at most 4Kb. NOT data stored on the arduino, but data for arduino reading MFC chip- which i believe runs over i2C at 7bits of data per block with 1 extra bit for read/write), but I am not 100% on that.

That's up to you - optimise the transfer protocol to suit your dataset, and any [u]expected[/u] future extensions

What method should I use to connect by usb to computer, since I won’t be using base arduino boards/ my own soldered (and hopefully custom printed should things work well). Would I be able to do something like how I connect to the NFC read/writer by I2C? Or is there a better way, which would be faster?

chip- which i believe runs over i2C at 7bits of data per block with 1 extra bit for read/write), but I am not 100% on that.

That is wrong, I2C works with 8 bit data, it has a 7 bit address.

The problem with your method of finding an Arduino is that you have to pole all the serial devices connected to your computer and hope they don't do anything erroneously with the polling package.

You are stuck with serial over USB I am afraid.

Is there a better device then, than arduino, if it could cause problems? I want to be able to connect to the my I/O interface device as simply as a keyboard; without possibly causing problems to other devices.

You could use wi-fi but that can be even more difficult to get going.

Like others here I don't quite get why you want to do this and what the final application is.

On your PC you could do this at the USB driver level if you have to. That would require you to modify the default drivers to run an app once the "Arduino like thing" has been detected.

Which chip do you plan to use in your Arduino-like device? The 328U4 has onboard USB but I would not recommend you use that unless you have some experience doing PCB layout for USB. A 328P (regular UNO) will need a USB-to-serial adaptor chip. An FTDI chip is my recommendation.

You could just use the basic UNO layout and include a 16U2 chip for the USB conversion. You will need to put an ISP connector for that chip as it won't come programmed for you.

Following on from Reply #6 why not write a line of code in setup() like

Serial.println("Hello, this is me, I'm here");

and ensure your PC program causes the Arduino to reset when it opens the Serial Port. Then the PC program will recognize the message - or will receive a different message or no message from the "wrong" Arduino.

As others have said if you explain what you want to achieve it will be much easier to make useful suggestions.

...R