40

I have just started experimenting with Serproxy and Arduino to get some serial data into Flash Builder/Flex. Serproxy seems to work fine and seems to connect to whatever port is specified. However, I am not able to see or read any data from the serial port using ActionScript. This is odd, because the Arduino should be printing data on a loop.

The only thing I can think of is that I am not setting the correct serial port number. I have been trying to figure out how to find out what number should be set, that is, 5331, 5332, 5333, etc.

How do I find out the port number? Is there a way to do this using Terminal on OS X maybe?

4

6 回答 6

99

You can find your Arduino via Terminal with

 ls /dev/tty.*

then you can read that serial port using the screen command, like this

screen /dev/tty.[yourSerialPortName] [yourBaudRate]

for example:

screen /dev/tty.usbserial-A6004byf 9600
于 2012-09-04T09:20:22.920 回答
25

Try this: ioreg -p IOUSB -l -b | grep -E "@|PortNum|USB Serial Number"

于 2014-04-29T22:09:47.573 回答
3

I was able to screen using the device's name anyway so that wasn't the issue. I was actually just trying to find the port number, i.e. 5331, 5332 etc. I managed to find this by a trial and error process using an app called TCP2Serial from the app store on Mac OS X. It isn't free but that's fine as long as I know it works!

Worth the 99c :) http://itunes.apple.com/us/app/tcp2serial/id506186902?mt=12

于 2012-09-10T09:42:50.603 回答
2

mac os x don't use com numbers. you have to use something like 'ser:devicename' , 9600

于 2017-05-11T21:03:55.533 回答
0

While entering the serial port name into the code in arduino IDE, enter the whole port address i.e:

/dev/cu.usbmodem*

or

/dev/cu.UG-*

where the * is the port number.

And for the port number in case of mac just open terminal and type

ls /dev/*

and then search for the port that u have set in arduino IDE.

于 2020-05-25T16:25:14.650 回答
0

Found the port esp32 was connected to by -

ls /dev/*

You would get a long list and you can find the port you need

于 2020-06-13T19:00:20.263 回答