Arduino Forum

Forum 2005-2010 (read only) => Software => Troubleshooting => Topic started by: alex.venom on Jul 09, 2009, 09:06 pm

Title: An video of (one of) my problems
Post by: alex.venom on Jul 09, 2009, 09:06 pm
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  :-?
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 12, 2009, 01:10 pm
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.
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 12, 2009, 04:27 pm
I'm using the latest model of Macbook Pro... just bought it..
Arduino APP @ 32bits trough the "Get Info" thing..

Still no clues yet  :-/
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 12, 2009, 04:59 pm
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
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 12, 2009, 08:25 pm
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...
 :-?
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 12, 2009, 08:40 pm
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;
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 14, 2009, 02:55 am
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?  ;)
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 14, 2009, 03:14 am
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
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 15, 2009, 02:03 am
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
Title: Re: An video of (one of) my problems
Post by: cianof on Jul 15, 2009, 01:31 pm
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.


Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 15, 2009, 02:00 pm
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.
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 15, 2009, 02:48 pm
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
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 15, 2009, 03:02 pm
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
Title: Re: An video of (one of) my problems
Post by: cianof on Jul 15, 2009, 10:39 pm
I'm running Mac OS X 10.5.7 (9J61) too.

Is your chip a 328P-PU too?
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 15, 2009, 10:44 pm
yep, ATMEGA328P-20PU...
Title: Re: An video of (one of) my problems
Post by: cianof on Jul 16, 2009, 12:10 pm
Here's some more info from my setup.

System:
OS X 10.5.6
IDE Version 0016
USB driver FTDIUSBSerialDriver_v2_2_10.dmg
ATMEGA328P-PU
IDE settings are correct
Tools > Board > Arduino Duemilanove w/Atmega 328
Tools > Serial > /dev/tty.usbserial-A70076ay (tried cu.usbserial as well)

Arduino board - purchased from ebay.

Upload works fine using XP via bootcamp.

Here's the console output:
avrdude: Version 5.4-arduino, compiled on Oct  9 2007 at 11:20:31
       url line removed

       System wide configuration file is "hardware/tools/avr/etc/avrdude.conf"
       User configuration file is "/Users/MYUSERNAME/.avrduderc"
       User configuration file does not exist or is not a regular file, skipping

       Using Port            : /dev/tty.usbserial-A70076ay
       Using Programmer      : stk500v1
       Overriding Baud Rate  : 57600
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding
avrdude: Send: Q [51]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

RS light blinks 3 times. I reckon thats the avrdude: Send: 0 [30]   [20] bit.
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 16, 2009, 10:57 pm
System Version:      Mac OS X 10.5.7 (9J61)
 Kernel Version:      Darwin 9.7.0

and my Arduino is an ATMEGA328P-PU  :-?
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 16, 2009, 11:04 pm
Quote
Arduino board - purchased from ebay.


Hmm... mine came from eBay too. Some place from China. Could that be a clue??  :-/
Title: Re: An video of (one of) my problems
Post by: stompyj on Jul 17, 2009, 09:59 pm
System Version: Mac OS X 10.5.7 (9J3050)
Kernel Version: Darwin 9.7.1

How can I tell more specifically which board I have besides a Arduino Duemilanove AtMega328?

Also, I'm a step behind you guys, I can't even get a valid port name in the tools -> serial port menu to appear.  I've tested Arduino-0016, FTDI driver(s) 2.2.9 and 2.2.10 on a 15" macbook pro, 13" macbook pro, 13" macbook, and a Mac Pro.  None of them can even see the driver to select.

Furthermore, I can get it working fine using VMware (both XP and Kubuntu) on any of these platforms.

-Eric
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 18, 2009, 05:09 am
WOW, something is really broken...

I have a new Mac mini (Core2 2Ghz, Nvidia9400M) with 10.5.7, fully updated. I use it as a media frontend for my TV. I just installed Arduino 16 and the FTDI 2.2.9 driver that comes with it. Everything worked perfectly, I uploaded a sketch and communicated with my Duemilanove.


I'm wondering if the FTDI chip on your Duemilanove is different(maybe a cheap Chinese clone). Open System Profiler, go to the USB section, and find the FTDI chip.

I have two Duemilanoves, and they show:
Code: [Select]

FT232R USB UART:

 Product ID:      0x6001
 Vendor ID:      0x0403  (Future Technology Devices International Limited)
 Version:      6.00
 Serial Number:      A6008cD3
 Speed:      Up to 12 Mb/sec
 Manufacturer:      FTDI
 Location ID:      0x3d100000
 Current Available (mA):      500
 Current Required (mA):      90

and
Code: [Select]

FT232R USB UART:

 Product ID:      0x6001
 Vendor ID:      0x0403  (Future Technology Devices International Limited)
 Version:      6.00
 Serial Number:      A6008cD3
 Speed:      Up to 12 Mb/sec
 Manufacturer:      FTDI
 Location ID:      0x1d100000
 Current Available (mA):      500
 Current Required (mA):      90

Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 18, 2009, 01:09 pm
Mine says:

Code: [Select]
FT232R USB UART:

 Product ID:      0x6001
 Vendor ID:      0x0403  (Future Technology Devices International Limited)
 Version:      6.00
 Serial Number:      A70076al
 Speed:      Up to 12 Mb/sec
 Manufacturer:      FTDI
 Location ID:      0x06200000
 Current Available (mA):      500
 Current Required (mA):      90
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 18, 2009, 03:14 pm
What is printed on top of your FTDI chip?

mine looks almost exactly like the picture at
http://parts.digikey.com/1/parts/1501976-ic-usb-serial-uart-28-ssop-ft232rl-r.html
but the batch number is higher (0832 instead of 0830)
Code: [Select]

FTDI
0832-B
FT232RL
Title: Re: An video of (one of) my problems
Post by: cianof on Jul 18, 2009, 10:51 pm
Here's mine:

Code: [Select]

FT232R USB UART:

 Product ID:      0x6001
 Vendor ID:      0x0403  (Future Technology Devices International Limited)
 Version:      6.00
 Serial Number:      A70076ay
 Speed:      Up to 12 Mb/sec
 Manufacturer:      FTDI
 Location ID:      0x1a200000
 Current Available (mA):      500
 Current Required (mA):      90

Title: Re: An video of (one of) my problems
Post by: cianof on Jul 20, 2009, 04:18 pm
Written on my chip:
FTDI
0836-B
FT232RL
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 20, 2009, 05:55 pm
OK, is there any difference on the circuit board?

Mine is exactly identical to:
http://ja.wikipedia.org/wiki/%E3%83%95%E3%82%A1%E3%82%A4%E3%83%AB:Arduino_Duemilanove_0509.JPG

There couldn't be any huge differences or it wouldn't work with Windows, but maybe this could give a hint as to why it's not working on Mac.
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 20, 2009, 06:17 pm
If you pull the 328p off the Duemilanove you are basically left with a FTDI adapter. Once you have removed the 328p, you can do a loopback test by connecting Pin0(RX) and Pin1(TX) and sending data to the serial port. Any data you send should come right back.

http://forum.sparkfun.com/viewtopic.php?t=15336&sid=31ecb89c9cb35eab197db1dc910732f8
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 21, 2009, 01:06 am
My FTDI chip says

FTDI
0836-B
FT 232 RL

exacly as clanof's one does.
I tried to remove the ATMega chip and loopback the RX and TX. Both LEDs (TX and RX) blink when I send data, but I don't get anything back in the console.


:-/
Title: Re: An video of (one of) my problems
Post by: stompyj on Jul 21, 2009, 04:06 pm
MyFTDI chip says :

FTDI
0845-B
FT232RL

Does anyone have any ideas on why I can't even get my /dev to display

/dev/cu.usbserial-xxxxxxxx
/dev/tty.usbserial-xxxxxxxx

When I plug in the device?

This device works fine on windows and linux boxes, but doesn't work on any mac machine for me.  Whats even weirder is that I got it to work one time on my macbook, but once I rebooted the macbook, it's never worked again...

Very strange.

Title: Re: An video of (one of) my problems
Post by: stompyj on Jul 21, 2009, 04:09 pm
Code: [Select]

FT232R USB UART:

 Product ID:      0x6001
 Vendor ID:      0x0403  (Future Technology Devices International Limited)
 Version:      6.00
 Serial Number:      A6008jhm
 Speed:      Up to 12 Mb/sec
 Manufacturer:      FTDI
 Location ID:      0x1d100000
 Current Available (mA):      500
 Current Required (mA):      Unknown (Device has not been configured)


This is what's in system profiler.  The Current Required field must be because I'm not seeing anything in /dev, hence the driver isn't even loading properly.
Title: Re: An video of (one of) my problems
Post by: stompyj on Jul 21, 2009, 07:39 pm
This is the error I see from the mac app "Console" when plugging the arduino board into my mac via USB.

Has anyone seen this?  Any suggestions on where to go from here in terms of debugging?

Code: [Select]

7/21/09 1:36:44 PM kernel USBF: 19022.259 IOUSBCompositeDriver[0x9408d80](FT232R USB UART) GetFullConfigDescriptor(0) returned NULL

Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 22, 2009, 12:57 am
Have you tried to uninstall (manually remove) and reinstall the FTDI drivers, Stompyj?
Title: Re: An video of (one of) my problems
Post by: stompyj on Jul 22, 2009, 02:52 am
Yeah, multiple times on multiple machines.  I'm just about to install the drivers on my mac mini (non-intel) and see how those drivers work.

-Eric
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 26, 2009, 04:44 pm
Still no clue...  :-/
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 27, 2009, 05:33 am
Did everyone that is having problems buy their boards off eBay instead of one of these guys http://arduino.cc/en/Main/Buy ?

I have two Duemilanoves that work perfectly with:


If you did buy them on eBay, what is the seller's name?
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 27, 2009, 05:57 pm
Mine is this one:
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=130302933349

Bought from Electricwatch seller
Title: Re: An video of (one of) my problems
Post by: cianof on Jul 28, 2009, 11:25 am
Same here. electricwatch was the seller of my board too.
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 28, 2009, 12:31 pm
well... that can't be a coincidence.

First thing we need to do is to alert the seller that he is selling boards that don't work on OSX with the regular FTDI driver... I'm almost certain he got his hands on a bad batch of FT232RL chips. If he can't rectify the problem then FTDI would probably like to know about this.




If the Arduinos shipped to you guys via China, there is a good chance the chips used to make your Arduinos are counterfeit. I recently got an oscilloscope from China with a Hoitek serial chipset ( http://www.hoitek.com/ ) . The USB Vendor ID in that chipset was stolen from Maxim ( http://www.maxim-ic.com/ ), but I'm not certain where the chip design is from. Hoitek seems to make knock-offs of some Atmel chips http://www.hoitek.com/PDF/8952.pdf .
Title: Re: An video of (one of) my problems
Post by: alex.venom on Jul 29, 2009, 02:48 am
Yep... thanks Gabebear! I'll drop him an message...
Today I bought a new Arduino from Sparkfun.. let's see if that one works  ;)
Title: Re: An video of (one of) my problems
Post by: electricwatch on Jul 31, 2009, 10:44 am
Sorry guys,

There is a assembly error on my Arduino boards.

To fix the Mac OSx upload problem, please remove the R2 100ohm resistor.

Many thanks to those guys informed me about this problem.

Sorry again.
Title: Re: An video of (one of) my problems
Post by: electricwatch on Jul 31, 2009, 10:46 am
Here is the photo for R2 100ohm resistor :

http://electricwatch.googlepages.com/101error0.JPG

http://electricwatch.googlepages.com/101error1.jpg
Title: Re: An video of (one of) my problems
Post by: gabebear on Jul 31, 2009, 04:50 pm
[ch21780][ch35442] electricwatch!
Title: Re: An video of (one of) my problems
Post by: cianof on Jul 31, 2009, 10:51 pm
Thanks for sorting it out electricwatch. Much appreciated.
Title: Re: An video of (one of) my problems
Post by: jet on Jun 11, 2010, 01:13 am
I just got email from Apple saying that the bug I filed about system crashes has been fixed.  The bug ID is 7111429, if you want to go look it up on the developer web site.