Pages: [1] 2 3 ... 9   Go Down
Author Topic: Loop Back Test - Sticky?  (Read 31860 times)
0 Members and 2 Guests are viewing this topic.
Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12744
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

One persistent question is "How do I perform a loop-back test?"  There are countless variations on the forum and just as many replies of the form, "I searched for instructions but couldn't find anything".  I think it is time to create easy to understand instructions and turn them into a sticky.

These are the instructions I've been providing...

Quote
1. Disable the processor.  The best option is to remove the processor from the board (with the power removed).  If you cannot or would prefer not to remove the processor, connect a jumper wire between RESET and GND.  This will hold the processor in reset preventing it from running.

2. Jumper TX to RX.

3. Apply power to the board.  Connect the board to the computer.  After a brief pause, Windows should produce a device insertion tone.  Linux may or may not produce a device insertion tone; an entry will be added to the system.

4. Start your favourite terminal application.  Serial Monitor will work fine.

5. Ensure your terminal application is connected to the correct serial port.  The baud rate is irrelevant.

6. Type.  As you type, the characters should be echoed to the screen.  Note: To send data, some terminal applications, like Serial Monitor, require pressing the Enter key or clicking a Send button.


Should "Loop Back Test Instructions" be made into a sticky?

In which forum section?

What should the instructions be?
« Last Edit: July 25, 2011, 04:59:20 pm by Coding Badly » Logged

Massachusetts, USA
Offline Offline
Tesla Member
***
Karma: 201
Posts: 8669
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Note that if your favorite terminal application is Serial Monitor then Step 6 should mention that you have to press Enter to send the text...  It will echo as you type and then appear again when you press enter.
Logged

Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12744
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Thanks.  Original post modified.

Anything else?  Answers to the questions?
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes please. Make it sticky.

It should be added to the troubleshooting guide as well. The playground also seems to lack a main category devoted to troubleshooting as well. If possible put it on the main page of arduino.cc as well ;-)

And if there's room on the PCB, why not add it to the bottom layer silkscreen as well?
Logged

• 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!

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Between steps 3 and 4 one might consider adding something about listening/checking for proper acknowledgment (the nice gong sound) that the PC detected a new USB device connection. A completely dead FTDI or 8u2 converter would fail at this step. Sometime I have them check the arduino IDE comm menu listing before and after plugging in the arduino to make sure a new comm port is created and displayed in the com port menu before proceeding to the serial monitor, to make sure they are selecting the proper comm number in the IDE or PC terminal application.

Lefty

Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12744
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


@retrolefty:  Thanks.  What does Linux do to acknowledge a device insertion?  MacOS?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


@retrolefty:  Thanks.  What does Linux do to acknowledge a device insertion?  MacOS?


Don't have a clue, but I'm sure somone around here can tell us.  smiley-wink

Lefty
Logged

"The old Europe"
Offline Offline
Edison Member
*
Karma: 1
Posts: 2005
Bootloaders suck!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Re: linux

Unless it is a mass storage device (camera, sd-card, disk...) usually nothing at all. I can't speak for ubuntu though. Of course it will be logged to system log, but the common user usually doesn't care much about that.

And simple things like serial adapters usually just work out of the box anyway ;-)

An FTDI adapter will create something like this in the syslog:

Code:
07/25/11 11:25:08 PM linuxbox kernel [25248.700042] usb 2-4: new full speed USB device number 3 using ohci_hcd
07/25/11 11:25:08 PM linuxbox kernel [25248.928051] usb 2-4: New USB device found, idVendor=0403, idProduct=6001
07/25/11 11:25:08 PM linuxbox kernel [25248.928062] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
07/25/11 11:25:08 PM linuxbox kernel [25248.928069] usb 2-4: Product: FT232R USB UART
07/25/11 11:25:08 PM linuxbox kernel [25248.928075] usb 2-4: Manufacturer: FTDI
07/25/11 11:25:08 PM linuxbox kernel [25248.928079] usb 2-4: SerialNumber: A6007nZC
07/25/11 11:25:08 PM linuxbox mtp-probe checking bus 2, device 3: "/sys/devices/pci0000:00/0000:00:02.0/usb2/2-4"
07/25/11 11:25:08 PM linuxbox mtp-probe bus: 2, device: 3 was not an MTP device
07/25/11 11:25:09 PM linuxbox kernel [25250.009207] usbcore: registered new interface driver usbserial
07/25/11 11:25:09 PM linuxbox kernel [25250.009240] USB Serial support registered for generic
07/25/11 11:25:09 PM linuxbox kernel [25250.009298] usbcore: registered new interface driver usbserial_generic
07/25/11 11:25:09 PM linuxbox kernel [25250.009302] usbserial: USB Serial Driver core
07/25/11 11:25:09 PM linuxbox kernel [25250.036587] USB Serial support registered for FTDI USB Serial Device
07/25/11 11:25:09 PM linuxbox kernel [25250.037636] ftdi_sio 2-4:1.0: FTDI USB Serial Device converter detected
07/25/11 11:25:09 PM linuxbox kernel [25250.037741] usb 2-4: Detected FT232RL
07/25/11 11:25:09 PM linuxbox kernel [25250.037747] usb 2-4: Number of endpoints 2
07/25/11 11:25:09 PM linuxbox kernel [25250.037753] usb 2-4: Endpoint 1 MaxPacketSize 64
07/25/11 11:25:09 PM linuxbox kernel [25250.037758] usb 2-4: Endpoint 2 MaxPacketSize 64
07/25/11 11:25:09 PM linuxbox kernel [25250.037763] usb 2-4: Setting MaxPacketSize 64
07/25/11 11:25:09 PM linuxbox kernel [25250.042236] usb 2-4: FTDI USB Serial Device converter now attached to ttyUSB0
07/25/11 11:25:09 PM linuxbox kernel [25250.042286] usbcore: registered new interface driver ftdi_sio
07/25/11 11:25:09 PM linuxbox kernel [25250.042291] ftdi_sio: v1.6.0:USB FTDI Serial Converters Driver

The relevant files are:

'/var/log/messages' on openSUSE
'/var/log/syslog' on ubuntu (probably debian as well)

They can be viewed in a text console/terminal with (start this before inserting the device!):

Code:
sudo tail -f /var/log/syslog

I'm sure there are GUI tools to show this information as well, but they will vary (drastically) between distributions.
« Last Edit: August 04, 2011, 10:33:59 am by madworm » Logged

• 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!

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12744
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Between steps 3 and 4 one might consider adding something about listening/checking for proper acknowledgment (the nice gong sound) that the PC detected a new USB device connection.

How about a brief description of what to expect added to step #3?
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17261
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Between steps 3 and 4 one might consider adding something about listening/checking for proper acknowledgment (the nice gong sound) that the PC detected a new USB device connection.

How about a brief description of what to expect added to step #3?


Well considering now that not all OS make a new usb connection sound, how about this?

3. With board still not plugged in, open the arduino IDE and check the Tools/Serial Port menu and write down the avalible comm ports, and then close the IDE. Plug in the arduino board, open the IDE and again check the Serial Port menu, there should be a new port number avalible that wasn't listed before, and that is the port number you should select. Failure to see a new port number means either a PC USB driver software problem, or a hardware failure with the FTDI or 8u2 serial converter chip on the board, and no need to proceed any further with this test.

Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12744
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


I can't decide.  When I first started this topic, I envisioned a Loop Back Test as something that would be applied to a board that recently was working correctly but now had a suspect processor.

"Troublesome USB Cable" is also a common occurrence.  Your step #3 would certainly help diagnose that problem.

"Failed to Install Driver" is also common.  Your step #3 would help.

I prefer a short simple test (10 or fewer steps) with short simple steps (each step is a single action with an expected result; typically one or two sentences).  At this moment, I'm leaning towards your step #3 being a separate sticky.

Thoughts?
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
just learning the ropes.. err wires
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The connect power of the arduino was crossed out in the instructions above.
Does that mean the arduino does not need an external power supply when just the base unit is plugged into the computer?

It is not mentioned anywhere on the web site!
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12744
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The connect power of the arduino was crossed out in the instructions above.

Correct.  It's impossible to perform a loop-back test unless the board is connected to the computer.  If the board is connected to the computer, it is reasonable to use the computer as the source of power.

Quote
Does that mean the arduino does not need an external power supply when just the base unit is plugged into the computer?

I don't know what a "base unit" is but I'm going to say "yes".

Quote
It is not mentioned anywhere on the web site!

Of course it is.  Search for the Power section...
http://arduino.cc/en/Main/ArduinoBoardUno
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
just learning the ropes.. err wires
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for the answer.

And you are right about it being in the hardware board section.

Newbe -- just finding my way!
Logged

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 197
Posts: 12744
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Which instructions are better?  Set #1...

Quote
1. Disable the processor.  The best option is to remove the processor from the board (with the power removed).  If you cannot or would prefer not to remove the processor, connect a jumper wire between RESET and GND.  This will hold the processor in reset preventing it from running.

2. Jumper TX to RX.

3. Connect the board to the computer.  After a brief pause, Windows should produce a device insertion tone.  Linux may or may not produce a device insertion tone; an entry will be added to the system.

4. Start your favourite terminal application.  Serial Monitor will work fine.

5. Ensure your terminal application is connected to the correct serial port.  The baud rate is irrelevant.

6. Type.  As you type, the characters should be echoed to the screen.  To send data, some terminal applications, like Serial Monitor, require pressing the Enter key or clicking a Send button.


...or Set #2...

Quote
1. Disconnect power from the board

2. Remove all connections and shields from the board

3. Force the processor to remain in reset by connecting a jumper from RESET to GND

4. Connect a jumper from the TX pin (1 on the Uno) to the RX pin (0 on the Uno)

5. Connect the board to your computer.  After a brief pause Windows will produce a device-insertion tone if sound is enabled.  Linux may or may not produce a device-insertion tone; an entry is added to the system log.

6. Start your favourite terminal application.  Serial Monitor will work fine.

7. Connect the terminal application to the serial port for your board.  The baud rate is irrelevant.

8. Send data by typing.  Everything you type should be echoed back.  To send data, some terminal applications, like Serial Monitor, require pressing the Enter key or clicking a Send button.  If exactly what you send is echoed back then the board passes the test.  This means that the host computer hardware driver, USB cable, and USB to serial converter are all working.

9. Shutdown the terminal application

10. Disconnect the board from the computer

11. Remove the two jumpers
« Last Edit: August 05, 2011, 02:21:29 am by Coding Badly » Logged

Pages: [1] 2 3 ... 9   Go Up
Jump to: