No response to $ prompt from Arduino

Discussion about the arduino based g-code interpreter, grbl
Post Reply
phlamingo
Posts: 66
Joined: Fri May 25, 2012 10:42 pm

No response to $ prompt from Arduino

Post by phlamingo » Wed Oct 31, 2012 4:19 am

I am trying to get my PC to talk to the Arduino that came in my deluxe kit (Batch 2).

Whether I use gcodesender or the serial monitor in the Arduino development kit, I get nothing back but an (apparent) echo of exactly what I send to it.

Is it possible that my Arduino just doesn't have grbl loaded? Is there an alternate way to check?

I suppose I could just grab the hex loader and try to install grbl, but I wanted to poll the brain trust before I do something potentially irreversible.

(A little history: I have used this PC to program Arduino before, but it has frankly been nearly a year.)

I tried to update the serial driver from the Arduino software (as suggested in a different thread), but Windows XP Pro tells me it can't find the driver, so maybe it is just a driver problem, and not an Arduino problem.

However, I happen to have another Uno handy. I can upload a sketch to it (the ASCIItable example) and it runs fine on COM4. After I do that, I can look at it with gcodesender, and when I hit the reset, I get the full ASCII table output as expected.

My Instructables Uno, on the other hand only presents to Arduino and to gcodesender as COM3.

-Phlamingo
---
ShapeOko Batch 2, Number 571, dual-Y motors, Y belts outside, odd anchors. Not operational at the moment: needs rewiring.

edwardrford
Posts: 1250
Joined: Mon Apr 09, 2012 5:40 pm
Location: Dixon, IL
Contact:

Re: No response to $ prompt from Arduino

Post by edwardrford » Wed Oct 31, 2012 4:26 pm

Being on different COM ports makes sense. I know each time I plug in a new arduino to my machine, it's recognized under a new COM.

As for loading the hex: It's not an irreversable deal. If you mess it up (somehow) you can just try to re-load it.

My other thought is maybe your line endings just aren't set up correctly. In gcodesender, have you tried toggeling the line ending characters? There is a similar option in the arduino serial monitor.

-Edward
Shapeoko 1 #0 - a couple of upgrades.
Shapeoko 2 #0 - a couple of upgrades.
Shapeoko 3 #2 - Stock

phlamingo
Posts: 66
Joined: Fri May 25, 2012 10:42 pm

Re: No response to $ prompt from Arduino

Post by phlamingo » Wed Oct 31, 2012 4:53 pm

I was pretty sure I had tried both ways last night, and I just confirmed it.

Using the default setting (\r\n) the Uno echoes back the dollar sign and nothing else.

Using the alternate setting (\n\r) the Uno does not even echo back the dollar sign.

I'll try using the hex loader.
---
ShapeOko Batch 2, Number 571, dual-Y motors, Y belts outside, odd anchors. Not operational at the moment: needs rewiring.

phlamingo
Posts: 66
Joined: Fri May 25, 2012 10:42 pm

Re: No response to $ prompt from Arduino

Post by phlamingo » Wed Oct 31, 2012 5:30 pm

... and Xloader won't talk to it, either.

I guess it's time to look up the instructions for using one Arduino to refresh the boot loader on another.

-Phlamingo
---
ShapeOko Batch 2, Number 571, dual-Y motors, Y belts outside, odd anchors. Not operational at the moment: needs rewiring.

phlamingo
Posts: 66
Joined: Fri May 25, 2012 10:42 pm

Re: No response to $ prompt from Arduino

Post by phlamingo » Thu Nov 01, 2012 10:57 pm

I hunted up instructions for using a working Arduino to refresh the boot loader on a non-working Arduino (http://arduino.cc/en/Tutorial/ArduinoISP) and went through the process.

No dice.

So, I've tried different line endings, reloading Grbl, reloading the boot loader, and none of this works. I think the Arduino just has a bad Grbl load that has effectively bricked it.

Since the processor on the board is SMD, there is not an easy way to replace it, and if the boot loader is hosed, an in-system-programmer just won't work.

Are there any other things I could try?

-Phlamingo
---
ShapeOko Batch 2, Number 571, dual-Y motors, Y belts outside, odd anchors. Not operational at the moment: needs rewiring.

phlamingo
Posts: 66
Joined: Fri May 25, 2012 10:42 pm

Re: No response to $ prompt from Arduino

Post by phlamingo » Fri Nov 02, 2012 8:07 pm

Since we seem to be out of ideas, I will contact Inventables about a replacement Arduino.

-Phlamingo
---
ShapeOko Batch 2, Number 571, dual-Y motors, Y belts outside, odd anchors. Not operational at the moment: needs rewiring.

phlamingo
Posts: 66
Joined: Fri May 25, 2012 10:42 pm

Solution Found: Reload Driver! Plus: full history

Post by phlamingo » Fri Nov 16, 2012 11:51 pm

Lesson learned: Just because your PC talks to one Arduino, that doesn't mean you have the driver loaded for a new Arduino.

Here is the full history of this problem in one place for reference.

When I connected my Inventables-supplied Arduino to my PC, I did not expect any trouble. After all, I had done a couple of light-duty Arduino projects already, with “Arduino-compatible” and genuine Arduino boards. However, I had seen a few messages in the forum about people having trouble connecting their Arduinos to their PCs (http://www.shapeoko.com/forum/viewtopic ... no+connect), so I read through the answers.

One of the things I noticed was the recommendation to download the latest version of the Arduino software. This would assure the latest version of the USB serial driver. So, I removed the old version of the Arduino environment that I had (0022) and downloaded and installed version 1.0.1 before I ever hooked up my new board.

When I fired up gcodesender, it would not talk to the Arduino. I re-read the forum postings, and tried the different line endings available. I fired up the Arduino IDE, and its serial monitor, and tried that with a range of line ending settings and speeds. I tried connecting with PuTTY and HyperTerm over the serial connection. No dice.

I tried to reload the driver for the board, and Windows kept failing. Note: This is when I should have started digging more deeply into arduino.cc for a solution.

But, then I had no trouble with the old Arduino I had sitting on my desk, so I thought the driver situation was okay. Just to emphasize: It was not okay.

The Arduino IDE showed two COM ports available: COM3 and COM4. COM4 was greyed out, though. On the other hand gcodesender showed only COM4.

I started this thread in the forum about my connection problems. Edward Ford responded, and we tried several different things without success.

I was beginning to suspect a bad burn of the Grbl software, but I wasn't ready to commit to it. I hooked up a spare Arduino that I had to test it out. This was one of the Arduinos I had used in another project. Of course, it worked perfectly, on COM4. I was even able to to load the “ASCIItext” example sketch into it, after which both the serial monitor and gcodesender were able to receive the expected output from the program (a table of ASCII characters and codes.)

I tried loading that sketch into the Inventables Arduino, and it failed. I even tried setting up my older Arduino as an in-system-programmer for the new Arduino, using wiring instructions from http://arduino.cc/en/Tutorial/ArduinoISP.

At this point, I was convinced. After a couple of days, Inventables agreed to send me a replacement Arduino. I was excited that I would finally get to make my motors turn. I considered putting Grbl on the old Arduino that I had, but things were busy at home anyway, and I decided to just wait.

When the replacement board arrived, I hooked it up to gcodesender for a quick test.

Nothing. Ugh.

Logically, the possibilities were:
  • Inventables had sent me two bad boards. It seemed unlikely.
    One or both boards were good, and I had missed something in the configuration. This seemed much more likely.
So, this time, I cast a wider net in my search for a solution. I won't bore you with the details, but eventually I found a comment that opened my eyes: “If you don't have an 'Arduino UNO.inf' file, Windows won't load a driver.” I can no longer find that Arduino forum post, of course.

So, I looked in c:\local\arduino\drivers, and did not see the .inf file. Aha! So, I downloaded version 1.0.2 (which had become available since I had downloaded 1.0.1) removed the borked driver using the hardware manager, plugged in the Inventables Arduino, successfully loaded the driver, and gcodesender was happily chatting away with the Arduino. Both of the Inventables Arduinos, actually.

Did I get a bad download of the 1.0.1? No, I re-extracted it, and the .inf file is there. Was it a bad extract? Possibly. Maybe it was just Windows flakiness. I just don't know.

I do know that if I hadn't already had the Arduino IDE loaded, and if I hadn't had a spare Arduino that I could use to prove to myself that I knew what I was doing, I would certainly have spent more time digging into the connection problem on arduino.cc, and probably would have found the reference sooner, and never bothered Edward or Inventables about it at all.

Gerald Weinberg (http://www.geraldmweinberg.com/Site/Home.html) is fond of saying that if you are absolutely certain that the problem is not X, then the problem is almost certainly X. In this case, my X was “the serial driver.” In retrospect, the signs were there, but I was so sure that I knew what I was doing, and in such a hurry to spin the motors on my ShapeOko, that I couldn't see them.

I hope this little note will help someone else avoid that embarrassment.
---
ShapeOko Batch 2, Number 571, dual-Y motors, Y belts outside, odd anchors. Not operational at the moment: needs rewiring.

Post Reply