Pages: [1]   Go Down
Author Topic: HOW TO FIND PORT IN LINUX USE AT COMMAND  (Read 1200 times)
0 Members and 1 Guest are viewing this topic.
Bandung, Indonesia
Offline Offline
Newbie
*
Karma: 0
Posts: 23
KEEP CALM AND USE ARDUINO
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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  smiley-cool
Logged

Dubuque, Iowa, USA
Offline Offline
Faraday Member
**
Karma: 46
Posts: 2501
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

NSW Australia
Offline Offline
Faraday Member
**
Karma: 84
Posts: 3438
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

0
Offline Offline
Faraday Member
**
Karma: 8
Posts: 2526
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: