Show Posts
Pages: [1] 2
1  Development / Other Software Development / Re: SoftwareSerial limitations - no bit-size, parity, or stop bits on: November 30, 2012, 01:42:41 am
Thank you for your reply.   I looked for the source code for the documentation but just found the source for the Arduino IDE and firmware.   I hope to be able to submit useful pull requests to that project on GitHub too, but for now I was hoping to contribute to accurately describing the limitations of the library in its documentation.

The Arduino reference home says at the bottom of the page, "Corrections, suggestions, and new documentation should be posted to the Forum." (with a link here).

I suggest adding the following bullet point in the "Limitations" section of the SoftwareSerial page:
  • Data bits, parity, and stop bits must be 8-N-1
2  Development / Other Software Development / SoftwareSerial limitations - no bit-size, parity, or stop bits on: November 28, 2012, 12:39:55 pm
The document for SofwareSerial should mention in the "Limitations" section that serial config is limited to 8N1.
http://arduino.cc/en/Reference/SoftwareSerial

I'd like to see the SoftwareSerial library extended to support an overloaded begin() method with a second "config" parameter so that I could pass it something like  mySerial.begin(1200, SERIAL_7E1), but until such time as that is implemented, the limitation should be noted in the documentation.
3  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Easy to "brick" Arduino Uno on Linux -- FIXED on: December 01, 2010, 08:48:35 pm
Firmware update to the 8u2 chip fixed this.  Everybody that hit this issue should donate to Dean Camera's Pledgie fund via the LUFA project page at: http://www.fourwalledcubicle.com/LUFA.php

Here's his tweet with the link to the github page that hosts the new firmware:
http://twitter.com/abcminiuser/status/9731256052883456


The procedure to fix is detailed in:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286088093/34#34
4  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Easy to "brick" Arduino Uno on Linux on: October 12, 2010, 04:55:38 pm
Yes, a fine option for programming the Uno, but as I've previously outlined in this thread, the problem does not appear to be with the bootloader (see reply #3).  Additionally, not everyone has an ISP, so that is a bad option for democratizing the tool.

It appears that we need someone with Linux CDC / ACM kernel module experience, someone with LUFA / USB / 8u2 programming experience, or someone with an oscilloscope or logic analyzer to look into this and check out what's going on when the Arduino Uno is sending serial data that causes the /dev/ttyACM0 port to become inaccessible.  Bad symptoms happen completely independently of the Arduino IDE -- an Arduino Uno sending serial data hooked up to an Ubuntu Linux 10.04 LTS or 10.10 Meerkat (kernel version 2.6.35) computer is a PITA to use even without the IDE at all -- simply attempting to open the port with a program like "minicom" fails most of the time.
5  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Easy to "brick" Arduino Uno on Linux on: October 11, 2010, 11:11:45 am
It looks like the most useful comments regarding this issue are on the Arduino blog on this post:
http://arduino.cc/blog/2010/10/02/arduino-0021-for-windows-mac-linux-fixes-pwm-bug-on-uno/#comments
6  Forum 2005-2010 (read only) / Bugs & Suggestions / Re: Easy to "brick" Arduino Uno on Linux on: October 06, 2010, 02:10:44 pm
I don't think it's the bootloader.  To recover from my most recent test I swapped the ATmega328P from my Uno and put it into my Duemilanove.  I switched the "Serial Port" to /dev/ttyUSB0 but had to leave the board type as "Uno" or uploading would not work -- I figured this was because the ATmega328P had optiboot on it.

After that, I was able to reprogram the chip easily even though it had the tight serial loop code / optiboot.

@Senso:  pressing reset doesn't really help.  I tried varying my button push timing systematically (then randomly) and coudn't come up with a reliable procedure that I could say with certainty was responsible for the success of the upload, though I did get it to work once (but not with the example program in the OP of this thread).
7  Forum 2005-2010 (read only) / Bugs & Suggestions / Easy to "brick" Arduino Uno on Linux on: October 06, 2010, 02:33:19 am
Apologies for the cross-post, but this is a more focused report than my other thread, which is at:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286088093

The Arduino Uno becomes extremely difficult to reprogram in Linux after uploading something akin to:
Code:
void setup() { Serial.begin(9600); }
void loop() { Serial.println("*"); }

Although the example above is contrived, it's not uncommon to "stream" sensor readings.
The device /dev/ttyACM0 is simply not accessible anymore (or only for fractions of a second once in awhile).  This is not a problem with the FTDI based units.

See linked thread for more details and some wild speculation (8u2 issues?  half-duplex serial?  OS driver issue?).
8  Forum 2005-2010 (read only) / Development / How to get an Arduino Uno into DFU mode without solder on: December 09, 2010, 12:37:22 pm
Device Firmware Update is a USB standard, and is safe to use.  If you mess up, you can dfu reset and try again.  I'm cross posting stimmer's post from here:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1285962838/10#10

To here in order to make the information available to non-forum members in the interest of free, wide dissemination of information.  The other forum requires login, this one doesn't.

-rgm
Quote
Here's a way to get the Uno into DFU mode without any soldering. Put two wires into GND pins on either side of the board. Then put the other ends of the wires on the board as follows:

The sequence is, hold the first wire on the top left 8u2 ICSP pad, then touch the second wire against the left side of the capacitor below the RX LED. Then remove both wires. It's slightly different to the sequence in the instructions but it seems to work.

Be careful with the second wire as the capacitor is quite near a 5v track. You can try using a low-value resistor instead of a wire if you are worried about blowing up your board.

To get back to normal mode, hold wire 1 in place as above, press the reset button, then remove wire 1. Or just unplug the USB cable and plug it back in.
9  Forum 2005-2010 (read only) / Development / Re: Problems with 0021 on Ubuntu 10.04 - FIXED! on: December 01, 2010, 07:59:09 pm
[size=16]FIXED!  It works![/size]

Following the procedure in reply #34 worked well for me (uploading new firmware to the 8u2 via dfu-programmer).  My IDE is responsive, minicom and screen have no trouble opening /dev/ttyACM0, and I can use the serial monitor and upload code without issue, even while streaming serial data constantly at 115200 bps.
[smiley=vrolijk_26.gif]

Thank you stimmer for sharing, and a big thank you to Dean Camera at the LUFA project and David Mellis @ Arduino / MIT, and everyone else who's worked on this.
10  Forum 2005-2010 (read only) / Development / Re: Problems with 0021 on Ubuntu 10.04 Lucid Lynx on: November 30, 2010, 11:17:32 am
I agree, loose loops are neither a perfect nor particularly effective workaround to this issue.  Although somewhat tolerable, it's extremely unpleasant to use, not to mention incredibly limiting, especially when attempting to communicate with a Processing sketch (or anything else using serial).  I hope that someone can share a better solution soon.  It's been a long time, and the Arduino Uno is effectively br0ken on GNU/Linux.  I'm sick of unplugging, replugging, slow IDE UI, removing lock files, and jamming the reset button and upload code buttons repeatedly.

Does anyone know how the efforts to "fix the linux kernel CDC ACM driver" are going?  Are there any efforts to validate the behavior of the 8u2 implementation of a CDC_ACM serial device?
11  Forum 2005-2010 (read only) / Development / Re: Problems with 0021 on Ubuntu 10.04 Lucid Lynx on: November 17, 2010, 03:48:49 pm
I look forward to trying this with my Arduino Uno, but note that you appear to have a Diecimila since your USB port is /dev/ttyUSB?.  The Arduino Uno serial port device is /dev/ttyACM?.   I have no problems with my Diecimila, only my Uno.
12  Forum 2005-2010 (read only) / Development / Re: Problems with 0021 on Ubuntu 10.04 Lucid Lynx on: October 10, 2010, 09:48:35 am
Nobody on the Arduino team reads these?  I cross-posted in the bugs forum:
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1286350399

I put optiboot on a Duemilanove and it still works fine in this scenario, so it's not the bootloader.
It's a pretty serious usability regression compared to the Duemilanove.  I hope they're focused on releasing the code for the 8u2 chip so that some progress can be made here in the community (although apparently the community of Linux Arduino Uno users is very small and non-vocal?)

I feel frustrated and with ever dimming hope of a solution.
13  Forum 2005-2010 (read only) / Development / Re: Problems with 0021 on Ubuntu 10.04 Lucid Lynx on: October 06, 2010, 02:05:12 am
Like an idiot I did it again (tight Serial.print loop) -- but this time I've had no luck repeatedly smashing the "Upload" button in the IDE  -- I guess the delay in the code is too small for me to "catch" it.  I can no longer reprogram the Uno since it won't listen to me / present the OS with a working port for long enough to talk to it.

I'll try again on Windows or Mac later this week.

Edit (an hour later): This got me past my "bricked" condition, but after intentionally re-bricking I could not duplicate its success, so I think it was coincidence.
(IDE is open)
Step 1: rm /var/lock/LCK..ttyACM0
Step 2: Click "upload" again.
14  Forum 2005-2010 (read only) / Development / Re: Problems with 0021 on Ubuntu 10.04 Lucid Lynx on: October 05, 2010, 01:08:37 pm
The FTDI based boards don't seem to run into this problem because it appears that they don't stream out serial data unless the port is accessed.  On my Arduino Duemilanove, with the following code:
Code:
void setup()  {
  pinMode(13,OUTPUT);
  Serial.begin(9600);
  delay(100);
  Serial.println("Here we go, duck.");
}

int count = 0;
void loop()  {
  digitalWrite( 13, HIGH );
  Serial.print("*");
  count++;
  if ( count == 80 ) {
    digitalWrite( 13, LOW );
    Serial.println();
    count = 0;
    delay( 200 );
  }
}

The LED blinks whenever the board has power, but the TX light only goes on when the port is accessed with the serial monitor, minicom, or "cat < /dev/ttyUSB0".  The means that the FTDI based arduinos are not subject to this issue -- they're able to be reprogrammed easily, even if they contain a program that hammers the serial port.  The Arduino Uno behaves differently in that the TX light is always on.
15  Forum 2005-2010 (read only) / Development / Re: Problems with 0021 on Ubuntu 10.04 Lucid Lynx on: October 05, 2010, 10:57:32 am
Quote
The IDE locks up so bad that I can't upload other sketches - I had to move to a mac (with 0021) to comment out the Serial.print(); in the offending code.
In my experience the IDE didn't lock up for longer than 6 seconds -- go slow and be patient (and don't click the Tools menu).  I was able to reprogram it from linux by repeatedly clicking the "Upload" button a few times (waiting between clicks), ignoring the error about /dev/ttyACM0 -- it got through eventually.

As I mentioned before, I suspect that the code running on the new Atmega8u2 chip on the Arduino Uno boards is to blame, simply because there are problems accessing the port outside of the Arduino IDE entirely (verified with minicom).  Perhaps it's only using half-duplex serial, so while it's busy sending it can't do anything else -- that's just a guess though.  I suppose the bootloader (optiboot) might be involved too, but now I'm really taking shots in the dark.
Pages: [1] 2