We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpElectronics,  Serial Library › trying2use 2virtualCOMports.getting coffeeCupFreez
Page Index Toggle Pages: 1
trying2use 2virtualCOMports.getting coffeeCupFreez (Read 1056 times)
trying2use 2virtualCOMports.getting coffeeCupFreez
Jan 28th, 2009, 10:27pm
 
hi,
has anyone ever run 2 virtual com ports through the macbook pro (on either the mac or windows xp through bootcamp)?

I'm trying to use 2 usb virtual com ports to run a custom wireless system on my macbook pro 3.1 with osx 10.5.6 and processing 1.01. I'm using the SiLabsUSB VCPDriver_CP210x

I've used it with 1 and it's fine, but when I plug in 2 it recognises them, but either crashes the machine or I get a little coffee cup icon sitting in the doc that won't disappear until i reboot, and nothing else happens - the(255,500) stage doesn't open and then the code doesn't run beyond listing the serial ports.

code:
--
import processing.serial.*;
 Serial myPort1, myPort2;
 
 void setup()
 {
   println ("*");
   size(255, 500);
   background(200);    
   println(Serial.list());
   myPort1 = new Serial(this, Serial.list() [0], 230400);
   myPort2 = new Serial(this, Serial.list() [1], 230400);

 }
 void draw()
 {  
println ("**");
 }
--

monitor print out:
--

*
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
[0] "/dev/tty.SLAB_USBtoUART0001"
[1] "/dev/cu.SLAB_USBtoUART0001"
[2] "/dev/tty.SLAB_USBtoUART"
[3] "/dev/cu.SLAB_USBtoUART"
[4] "/dev/tty.Bluetooth-Modem"
[5] "/dev/cu.Bluetooth-Modem"
[6] "/dev/tty.Bluetooth-PDA-Sync"
[7] "/dev/cu.Bluetooth-PDA-Sync"
--

thanks
Re: trying2use 2virtualCOMports.getting coffeeCupF
Reply #1 - Feb 2nd, 2009, 10:30am
 
In the list of devices [0] and [1] have the same name.
Have you tried:

myPort2 = new Serial(this, Serial.list() [2], 230400);

I admit I don't know what the 'tty' and 'cu' stand for, though.
Re: trying2use 2virtualCOMports.getting coffeeCupF
Reply #2 - Feb 2nd, 2009, 12:56pm
 
thanks. I identified (and resolved) the problem. it's a hardware problem basically - something particular to this mac. while it lists the different devices, it doesn't actually give them each a com port (despite what the Serial.list outcomes suggest) but if I use a usb hub in the left hand side of the machine, next to the power supply, it assigns a com port to each and works as it should (doesn't work on the usb port on the right hand side though, only on the left).

I also don't know what the 'tty' and 'cu' stand for, but I do know that 'tty' is the one you want.

thanks for your input
Re: trying2use 2virtualCOMports.getting coffeeCupF
Reply #3 - Feb 2nd, 2009, 1:13pm
 
NoahBuddy wrote on Feb 2nd, 2009, 10:30am:
I admit I don't know what the 'tty' and 'cu' stand for, though.


tty is 'teletype', a hold-over from the olden days when terminals connected to mainframes were teletype devices rather than keyboards and monitors (like a typewriter, printed output. first time i ever used unix was on one of these things, 1986). it's basically a standard serial connection but these days lots of things like usb connections appear as tty connections.
Re: trying2use 2virtualCOMports.getting coffeeCupF
Reply #4 - Feb 2nd, 2009, 8:35pm
 
Thank you koogs for the explanation.

Perhaps you have a USB and a USB2.0 port?
A hub has solved software conflicts for me (drivers really) and was able to slow down the USB2.0 device.
Re: trying2use 2virtualCOMports.getting coffeeCupF
Reply #5 - Feb 2nd, 2009, 9:01pm
 
re: Perhaps you have a USB and a USB2.0 port?

perhaps. I just looked at the hardware info for this machine and it does say USB Bus and USB High Speed Bus. (as well as the track pad and IR and bluetooth). I'll see if I can find another machine to test if this is the problem and will report back as it would be good to know. the hub I was using was USB2.0, so the logic is consistent.
Page Index Toggle Pages: 1