HOW TO FIND PORT IN LINUX USE AT COMMAND

hi im jonny from indonesian.

several days i bought one piece gsm/gprs shield v2.0 from seeedstudio. and for tester AT COMMAND. im use this

http://m2msupport.net/m2msupport/module-tester/

and

http://www.seeedstudio.com/wiki/images/b/b2/Sscom32E.zip

and my problem. that's apps can't find port in linux. i know if im using windows that port is COM . but in linux is different. anyone can give opinion or advice what can i do to find port ?

thank's 8)

  1. Unplug your Arduino/shield.
  2. Type "dmesg" (as root).
  3. Plug in your Arduino/shield.
  4. Type "dmesg" again and look at the new messages.

It should say that your device attached as, for example, "ttyUSB0". Then use "/dev/ttyUSB0" as your port.

Typically your application will need root privileges in order to attach to the port. You can also "chmod a+rw /dev/ttyUSB0" so that any (non-root) user can attach to the port. Be aware that you will need to execute that chmod command each time you attach/unattach the Arduino (it is not permanent).

1 Like

If you use a file manager window to examine /dev and sort by most recent, it will pop up visibly in the listing when you plug it in (and refresh the list).

I recently noticed a feature in CentOS 6 - if you look in /dev/serial/by-id/ you'll find a unique device special file name for FTDI based devices. Not sure how long this feature has been there; I know I've had to use udev rules to get that functionality in the past.

If you are fortunate enough to have an Arduino with the FTDI USB interface, this gives you a unique repeatable device special file name no matter when or where or how many get plugged in.

If you've got a newer one that uses the Atmel chip for USB, then the device has no unique identifier so you're out of luck.

-j