Go Down

Topic: An video of (one of) my problems (Read 9083 times) previous topic - next topic

alex.venom

I did an small video showing the issue:

http://www.youtube.com/watch?v=M6KZEYl5AN8

Besides that I'm having another problems reading/writing to the Serial in the Arduino, running in the Hardware-> Troubleshooting forum  :-?

gabebear

Are you using a Core2 Mac? (a.k.a. is your CPU 64bit?)

Are you running Arduino as a 32bit app, or did you change the Java version to 1.5?

The RXTX library problems certainly are a pain in the ass.

alex.venom

I'm using the latest model of Macbook Pro... just bought it..
Arduino APP @ 32bits trough the "Get Info" thing..

Still no clues yet  :-/

gabebear

Hmm... should be working... I would say your Hardware->Troubleshooting issue is definitely related...

Have you tried re-installing the FTDI driver? The driver is at /System/Library/Extensions/FTDIUSBSerialDriver.kext . Deleting that file and rebooting seems to be the easiest way to remove the driver. The newest driver version is 2.2.10 and can be downloaded at http://www.ftdichip.com/Drivers/VCP.htm

I'm using the 2.2.9 version of the FTDI driver which came with Arduino with no problems, but I have an older Core1/32bit Macbook.




Once you get this straightened out, check out http://www.arduino.cc/playground/Interfacing/Cocoa . I wrote the IOKit/ioctl part, which lets you ramp up the baud-rate. You probably want the latest HardwareSerial(otherwise your Arduino can only hit 1000000 baud). http://code.google.com/p/arduino/source/browse/branches/processing-5503/hardware/cores/arduino/HardwareSerial.cpp?spec=svn702&r=702

alex.venom

Yep.. I tried 2.2.9 and 2.2.10.. same issues. Tried to reinstall and, as it didn't work, even reinstalled the OSX itself. No lucky.
Now I'm using the 2.2.10 again...
 :-?

gabebear

Wow... I really don't have a clue... you've tried pretty much everything

The only thing I can come up with is maybe the CREAD flag on the termios structure for the serial-port is getting turned off by some misbehaving application. Most apps reuse the termios setting from the last application and only change the normal flags (databit size, parity, etc). The CREAD setting disables the serial port's reciever, so nobody changes it.

http://developer.apple.com/documentation/Darwin/Reference/ManPages/man4/termios.4.html


The project at http://www.ghearing.com/Arduino%20Serial%20Example.zip doesn't set CREAD, it just re-uses the termios setting. You can set it by changing:
Code: [Select]
cfmakeraw(&options);
to

Code: [Select]
cfmakeraw(&options);
options->c_cflag |= CREAD;

alex.venom

Thank you, gabebear for all your help. Unfortunately the Project you send didn't work either.  :-/
I selected the right Serial port and Baud Rate. The Arduino then Resetted and got frozen. It seems I'll have to keep using Windows for now... maybe on 00017 it will work?  ;)

gabebear

#7
Jul 14, 2009, 03:14 am Last Edit: Jul 14, 2009, 03:19 am by gabebear Reason: 1
Open up Terminal and run
Code: [Select]

stty -e -f /dev/tty.usbserial-WHATEVER

What is the output? do you have "cread" in you "cflags"?
the output for me is
Code: [Select]

      $stty -e -f /dev/tty.usbserial-A6008cD3

speed 9600 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
     -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
     -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -iutf8
     -ignbrk -brkint -inpck -ignpar -parmrk
oflags: -opost -onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
     -dtrflow -mdmbuf
discard dsusp   eof     eol     eol2    erase   intr    kill    lnext  
^O      ^Y      ^D      <undef> <undef> ^?      ^C      ^U      ^V      
min     quit    reprint start   status  stop    susp    time    werase  
1       ^\      ^R      ^Q      ^T      ^S      ^Z      0       ^W


Maybe something will pop out at you. Termios is an old BSDism

alex.venom

Code: [Select]
stty -e -f /dev/tty.usbserial-A70076al
speed 9600 baud; 0 rows; 0 columns;
lflags: -icanon -isig -iexten -echo -echoe -echok -echoke -echonl
     -echoctl -echoprt -altwerase -noflsh -tostop -flusho -pendin
     -nokerninfo -extproc
iflags: -istrip -icrnl -inlcr -igncr -ixon -ixoff -ixany -imaxbel -iutf8
     -ignbrk -brkint -inpck -ignpar -parmrk
oflags: -opost -onlcr -oxtabs -onocr -onlret
cflags: cread cs8 -parenb -parodd hupcl -clocal -cstopb -crtscts -dsrflow
     -dtrflow -mdmbuf
discard dsusp   eof     eol     eol2    erase   intr    kill    lnext  
^O      ^Y      ^D      <undef> <undef> ^?      ^C      ^U      ^V      
min     quit    reprint start   status  stop    susp    time    werase  
1       ^\      ^R      ^Q      ^T      ^S      ^Z      0       ^W


Exactly the same as yours...  ;D

cianof

I have exactly same problem as you. Been trying to get this to work for months.......posted a reply on your video.

Macbook Pro. Core 2.
Uploads work fine in XP.
Serial & Board correctly selected.
Arduino Duemilanove ATMEGA 328P-PU.

For selecting java version. Look "Java Preferences" in spotlight.



gabebear

#10
Jul 15, 2009, 02:00 pm Last Edit: Jul 15, 2009, 02:10 pm by gabebear Reason: 1
So it seems the latest Macbook has an issue with the FTDI driver? I'm betting this has something to do with the USB SD-card reader you both have built into your laptops.

In System-Profiler, is the FT232R directly connected to a "USB Bus" or is there a hub?

Could you try putting a powered USB hub between your laptop and Arduino? ... I know this shouldn't do anything, but it often does.




I just tried my Arduino connected via a non-powered hub and it still works fine.

alex.venom

#11
Jul 15, 2009, 02:48 pm Last Edit: Jul 15, 2009, 02:49 pm by alex.venom Reason: 1
Tried the USB Hub... same thing  :-/

It definitely seems like driver problems to me, but I'm guessing the problem is with 10.5.7 Mac OS X and not with the Macbook itself. I might be wrong, but I think if it was the Macbook (hardware issue) it wouldn't work in the Windows trough the Virtual Machine. Am I right?

Besides that, I'm having the exact same problem (can write, can't read) with the Macbook and with an PL2303 USB/Serial cable using the open source driver. An FTDI USB/Serial cable from a friend works perfectly..

Maybe my computer is just picky  ;D

gabebear

#12
Jul 15, 2009, 03:02 pm Last Edit: Jul 15, 2009, 03:38 pm by gabebear Reason: 1
Well, lots of people are using 10.5.7 without issue, so it seems like it is something with that model...

Apple will sometimes ship beta-ish OS builds with their newest hardware. What is the build version of the Leopard that came with your laptop? You can check this in System-Profiler by clicking on the "Software" subcategory(not an item in it).

Mine is 9J61, which was displayed as "Mac OS X 10.5.7 (9J61)". It looks like the Macbook Pros made after June use build 9J3050. If both of you have this build, then I'd say it's a kext(kernel extension) problem and FTDI and Apple would like to know about it.

http://support.apple.com/kb/HT1159

cianof

I'm running Mac OS X 10.5.7 (9J61) too.

Is your chip a 328P-PU too?

gabebear


Go Up