You can also install gcc43, then it works again as it then uses gcc43, but you need to keep gcc44 or it will downgrade avr-libc and that gets some more dependency hell going ;-(

• Upload doesn't work? Do a loop-back test.• There's absolutely NO excuse for not having an ISP!• Your AVR needs a brain surgery? Use the online FUSE calculator.• My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...• Microsoft is not the answer. It is the question, and the answer is NO!

I am new to Arduino and need multiple serial ports, but I have a question about NewSoftSerial: the page at Arduiniana says that you can only use one serial device at a time, and have to designate one as "active" at any given time. Does this mean the buffer cannot receive data from the inactive devices? I have a setup where it is unpredictable which serial devices will chime in next and when, so I can't declare ahead of time--I need to "listen" to all of them, all the time. Will NSS not work for me, or does the "one at a time" rule only apply to READING the buffer, not the buffer accumulation itself?

Also, is there any documentation to NSS that lists all the functions you can call, and how they work, sort of like the "Reference" section of the main Arduino page?

I'm afraid the "one at a time" rules applies to the actual reception of the data and not just to when you check the buffer. The reason is this. If two devices are connected via "soft" serial ports, we have to assume that they are transmitting independently to the Arduino. As you say, it is entirely unpredictable when a byte might arrive from either one. But reliable reception on a software port requires that the whenever a byte arrives, the processor is 100% occupied in receiving it. So you see, if two bytes arrive from the ports at close to the same time, the processor can either abandon the partly-finished byte that arrived first to process the second, or ignore the second in favor of the first, but it cannot process both at once.

That's why you can't actively receive on two ports at once.

However, there are many successful designs out there where, say, you monitor the serial GPS device for a while, perhaps processing a single sentence, and then make your XBee active for another while. You might also see if one of the devices might be attached instead to a hardware port.

I hope some of this helps. I'd like to help your project succeed.

To answer your last question, no, I have long wanted to add a "reference" section to all my Arduiniana libraries, but unfortunately the project has not yet bubbled up to the top of my priority stack.

Thanks, that makes sense. I was hoping that maybe there was some magic beyond the horizon of my understanding that would make simultaneous reception possible, but that was wishful thinking. I'll try to come up with a synchronized scheme whereby each device holds off until its "turn" to "speak"--I think this may be feasible without losing any data. The other devices are actually other Arduinos, so I can probably program them to wait, and then say everything in bursts.

Thanks for all your voluntary hard work on this! No rush on the Reference page, I think I can figure out what I need from the included code examples.

Patrick, I happen to be working with this multi-port receive issue in some writing I'm doing. Perhaps this sample sketch might give you an idea how you might structure your code. This kind of solution isn't for everyone, but it might be enlightening.

Here I have an XBee radio that I am listening for input on. As soon as I get a 'y' from the radio, I want to note my position, as defined by the serial GPS device I also have connected. Here's a solution that will work with NewSoftSerial:

• Upload doesn't work? Do a loop-back test.• There's absolutely NO excuse for not having an ISP!• Your AVR needs a brain surgery? Use the online FUSE calculator.• My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...• Microsoft is not the answer. It is the question, and the answer is NO!

With regards to the error above, the offending line is the "sbiw %0, 0x01 \n\t". I'm messing around with alternatives, I found some place that suggests manually moving %0 into a register before calling sbiw which I'll try soon.

If only the register naming of inline assembler didn't suck that much... I swear I've read more than one manual regarding this and it still is pretty obscure stuff.

• Upload doesn't work? Do a loop-back test.• There's absolutely NO excuse for not having an ISP!• Your AVR needs a brain surgery? Use the online FUSE calculator.• My projects: RGB LED matrix, RGB LED ring, various ATtiny gadgets...• Microsoft is not the answer. It is the question, and the answer is NO!

sorry for this "necro post", but I'm running out of ideas.I'm trying to interface an arduino with a bluetooth chip, enabling the arduino to talk to my computer (over bluetooth).I'd like to describe the situation / problem first, I'll give a short list of technical data at the bottom. All help is appreciated.

I have an arduino that I have hooked up to a bluetooth device, I'm trying to make the arduino talk to my computer (which also has a bluetooth device, obviously). I have tried the SoftwareSerial library, which doesn't appear to ever see anything it can read, a custom method that is based on a interrupt on the rx pin, trying to read the bits as the fly past (to my understanding this is also how NewSoftSerial reads data), aswell as the SoftwareSerial library.I can send data to my laptop without problems, it arrives just as I send it (with a quirk of inverted linebreak/newline characters, but thats a quirk of the bluetooth chip I reckon), the receiving data on the arduino side is the problem.SoftwareSerial denies the existance of ever seeing anything arrive.The NewSoftSerial however, shows promise.While calls to the available() method say that it has nothing to read, pure calls to the read() method give back invalid values (-1, no byte found). But this is the part where I see promise, because it will print a number of error bytes based on the number of characters I sent to the arduino (bluetooth device).ie: I send a message "hello" to the arduino, the arduino would print 5 times a -1 value to the computer through its hardware serial.This tells me that it is receiving something, but I have the feeling it doesn't know what it is it is trying to read..Any insights and help regarding the matter would be most appreciated!

The sketch(es), in case it yields any information regarding the issue:

// set the data rate for the NewSoftSerial port mySerial.begin(4800); mySerial.println("Hello, world?");}

void loop() // run over and over again{ if (mySerial.available()) { Serial.print((char)mySerial.read()); } if (Serial.available()) { mySerial.print((char)Serial.read()); }}

I've got two PUTTY windows open, the hardware uart is on COM3, and the SoftSerial is on COM4 on pins 2, 3. Both windows print out their greetings fine. When I type on COM3, I see the characters echoed on COM4 tty. However, when I type on COM4, I don't see anything echoed back to COM3.

COM3 is going to a tested FTDI, COM4 is a Modern Device P4, going to a Profile RS232->USB cable. Both have been tested for uploads with Arduino.