PDA

View Full Version : Finding out communication port numbers on new aluminium macbooks



vk_dre
17-12-2008, 02:44 PM
Hi all,

I'm trying to obtain test data (for some uni work) from a pressure transducer. Originally, I had the transducer hooked up via a cable to the serial port of a windows pc. I'm currently out of the country and still needing to conduct some testing, so I'm using my new aluminium macbook while im overseas.

Here is my problem:

With the windows pc back in auckland, I used a matlab script file that read data from the transducer and logged it. In this script file I just needed to enter the com port number of the serial connection to the transducer.
Now with my macbook, ive got a serial to usb cable and have attached it like that, now with matlab I'm trying to figure out the correct com port for the USB port. I've tried everything in 'System Profiler' but nothing seems to be working. If anyone knows a definitive method by which I can find out the com port number then it would be much appreciated.

Sorry if this is a long winded and confusing post, but I'm rather stressed by time constraints and Pressf1 sprung to mind.

Once again:
Macbook (new aluminium model)
need to find comport number (to which transducer and serial to usb cable is attached).

Cheers for any help guy.

V.K

Chilling_Silence
17-12-2008, 02:58 PM
Run ls -la /dev/tty*

Do you have any /dev/tty.usbserial entries?

SolMiester
17-12-2008, 03:18 PM
Using a serial\usb adaptor in Windows gives yet another comm port number identified in device manager, do Mac's not have this?

Safari
17-12-2008, 05:26 PM
Using Terminal try the following
ioreg -b | grep usb

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

Erayd
17-12-2008, 06:09 PM
Using a serial\usb adaptor in Windows gives yet another comm port number identified in device manager, do Mac's not have this?

UNIX / Linux systems (OSX is a UNIX system) manage serial ports slightly differently - any new serial port gets registered as a tty device, usually with a name reflecting how it's connected to the PC. For example, the first serial port on a mainboard is normally /dev/ttyS0, the first USB one is /dev/ttyUSB0 etc.

They aren't all just lumped into one generic class (the way windows handles them).

Safari
17-12-2008, 06:24 PM
This his how they show on my Mac with with ioreg -b | grep usb

| +-o usb-power-mgt <class AppleMacIODevice, registered, matched, $
| | +-o usb@1A <class IOPCIDevice, registered, matched, active, busy 0, $
| | +-o usb@1B <class IOPCIDevice, registered, matched, active, busy 0, $
| | +-o usb@1B,1 <class IOPCIDevice, registered, matched, active, busy 0$
| | +-o usb@1B,2 <class IOPCIDevice, registered, matched, active, busy 0$

Erayd
17-12-2008, 06:29 PM
That's not the device names though :p.

Safari
17-12-2008, 06:34 PM
That's not the device names though :p.

What about this.
Not sure what he is actually looking for but just trying to help.

+-o EHCI Root Hub Simulation@1B,2 <class IOUSBRootHubDevice, registered, mat$
+-o OHCI Root Hub Simulation@1A <class IOUSBRootHubDevice, registered, match$
+-o OHCI Root Hub Simulation@1B <class IOUSBRootHubDevice, registered, match$
| +-o Hub in Apple Extended USB Keyboard@1b100000 <class IOUSBDevice, regist$
| | "PortNum" = 1
| +-o Apple Extended USB Keyboard@1b130000 <class IOUSBDevice, registered,$
| | "PortNum" = 3
| +-o Apple Optical USB Mouse@1b110000 <class IOUSBDevice, registered, mat$
| "PortNum" = 1
+-o OHCI Root Hub Simulation@1B,1 <class IOUSBRootHubDevice, registered, mat$
+-o USB Printer@3b100000 <class IOUSBDevice, registered, matched, active, $
"PortNum" = 1

Erayd
17-12-2008, 06:55 PM
Try 'ls /dev|grep tty' - that should give you a list of all tty devices on the system.

SolMiester
17-12-2008, 07:12 PM
UNIX / Linux systems (OSX is a UNIX system) manage serial ports slightly differently - any new serial port gets registered as a tty device, usually with a name reflecting how it's connected to the PC. For example, the first serial port on a mainboard is normally /dev/ttyS0, the first USB one is /dev/ttyUSB0 etc.

They aren't all just lumped into one generic class (the way windows handles them).

And that my friend in why linux and co will never become mainstream customer products..User need a simple GUI with simple interface naming schemes..LOL

Erayd
17-12-2008, 07:17 PM
Haha, only up to a point. Most GUIs are quite capable of figuring out what to use on their own, or if they can't they provide a succinct list of probable choices. It's usually only braindead software like the above that causes such issues.

I would also like to point out that both OSX and Linux are already mainstream...

[Edit: I think I'll leave this here, otherwise the poor thread will end up substantially more hijacked than it already is - while I'd love a debate, methinks that this probably isn't the ideal location.]

Chilling_Silence
17-12-2008, 10:20 PM
Wise choice ;)

vk_dre
18-12-2008, 03:56 PM
Thanks for all the help guys, will give it a go asap.

Cheers.