Welcome! Log In Create A New Profile

Advanced

testing motherboard: no debug messages in console

Posted by rravinof 
testing motherboard: no debug messages in console
March 26, 2010 11:29AM
Dear all

Mendel hardware is all ready, and now I'm trying to complete the Testing Electronics instructions of the wiki.

I managed to upload the motherboard firmware using Arduino 018. The debug LED is happily flashing at 2hz
I set CommsDebug true in the reprap software preferences

But I see no messages scrolling or appearing in the RepRap Console window. It is the RepRap Console window where messages should be appearing, right?
Stepper Driver tests don't work either.

What could be wrong? What could I try?

Here are the tech details.
electronics: RepRap Motherboard v1.2 (preassembled by makerbot, did the mendel adaptions)
computer: MacBook Pro with Ubuntu 9.10 (bootcamp)
FTDI adaptor: Sparkfun FTDI basic

$ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 003: ID 05ac:820f Apple, Inc.
Bus 003 Device 002: ID 0a5c:4500 Broadcom Corp.
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 003: ID 05ac:0231 Apple, Inc.
Bus 007 Device 002: ID 05ac:8242 Apple, Inc.
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

$dmesg
[ 27.593010] eth1: no IPv6 routers present
[ 64.316168] CE: hpet increasing min_delta_ns to 15000 nsec
[ 124.556250] usb 5-1: new full speed USB device using uhci_hcd and address 2
[ 124.751051] usb 5-1: configuration #1 chosen from 1 choice
[ 124.820768] usbcore: registered new interface driver usbserial
[ 124.820800] USB Serial support registered for generic
[ 124.820901] usbcore: registered new interface driver usbserial_generic
[ 124.820905] usbserial: USB Serial Driver core
[ 124.836578] USB Serial support registered for FTDI USB Serial Device
[ 124.836797] ftdi_sio 5-1:1.0: FTDI USB Serial Device converter detected
[ 124.836857] usb 5-1: Detected FT232RL
[ 124.836862] usb 5-1: Number of endpoints 2
[ 124.836867] usb 5-1: Endpoint 1 MaxPacketSize 64
[ 124.836872] usb 5-1: Endpoint 2 MaxPacketSize 64
[ 124.836877] usb 5-1: Setting MaxPacketSize 64
[ 124.838892] usb 5-1: FTDI USB Serial Device converter now attached to ttyUSB0
[ 124.838924] usbcore: registered new interface driver ftdi_sio
[ 124.838928] ftdi_sio: v1.5.0:USB FTDI Serial Converters Driver


Thanks!
Thomas
Re: testing motherboard: no debug messages in console
March 26, 2010 07:31PM
stty 57600 raw ignbrk -hup < /dev/ttyUSB0; ( cat < &3 & cat > &3; kill $! ) 3<>/dev/ttyUSB0

replace 57600 with whatever baud rate the firmware is set to use. these commands let you send commands directly to the board and see its responses. M105 is usually a good test, it should send the temperature back.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: testing motherboard: no debug messages in console
March 26, 2010 07:32PM
oh, almost forgot: press ctrl+d to exit that command. if you ctrl+c instead by accident, you may have to killall cat before you can talk to the board properly.


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: testing motherboard: no debug messages in console
March 27, 2010 08:43AM
thanks! i tried using the commands you suggested, but I got back a few errors. so I tried simplifying the code to see if there would be more luck. I'm very new to reprap, ubuntu and serial communications, so I'm not sure where to start...


$ stty 19200 raw ignbrk -hup < /dev/ttyUSB0; (cat < &3 & cat > &3; kill $!) 3<>/dev/ttyUSB0
bash: !: event not found

$ stty 19200 raw ignbrk -hup < /dev/ttyUSB0
stty: standard input: unable to perform all requested operations


I don't know if it's useful information, but when I connected the motherboard to the computer this morning and started up the reprap software, the debug light started flickering irregularly. No messages in the console window though...
I tried nudging the Y-axis as a test, but this made the reprap software hang.

Any ideas?
Re: testing motherboard: no debug messages in console
March 27, 2010 12:38PM
I did some additional testing with ReplicatorG on MacOS X. This is with just the motherboard attached, no steppers, extruder controller. I'm thinking there must be something wrong with the Motherboard I got from Makerbot, or maybe I did something wrong doing the PCB adaptions. Are there any other tests I can run?

Loading machine: mendel
loading simulator
Loading driver: gen3.Sanguino3GDriver
Attempting to initialize driver replicatorg.drivers.gen3.Sanguino3GDriver@1ab600f
No serial port found.
WARNING:  RXTX Version mismatch
	Jar version = RXTX-2.2pre1
	native lib Version = RXTX-2.1-7
Reset.
No connection; trying to pulse RTS to reset device.
Unable to connect to firmware.
emt
Re: testing motherboard: no debug messages in console
March 27, 2010 01:20PM
Hi

Which firmware did you upload? Replicatorg and Host use totally different protocols. Provide a link to the firmware if you are not sure what you used.


Regards

Ian
Re: testing motherboard: no debug messages in console
March 27, 2010 06:24PM
For ReplicatorG (mac) I tried all 3 versions of the firmware: 1.4, 1.5 and 1.6 - installed those from the ReplicatorG update firmware menu item. When starting up ReplicatorG, I see the debug LED flickering for a while. Some kind of communication is going on...

For Host I used the latest Mendel firmware from svn.

About Host (ubuntu): I understand now that the commdebug messages appear in the terminal window. But this window only appears if you choose run in terminal when opening reprap software from GNOME. Before I always choose run, which only shows the RepRap grid and Reprap Console windows. This probably is most evident but it puzzled me for some time. The wiki (testing electronics page) describes that debug messages appear in the console window, and the reprap sofware has a Reprap Console window, so I expected debug messages to appear there.

This is what I get as commdebug messages in the Host software:

Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyUSB0
comms: G-code: N0 T0 *26 dequeued and sent [0.000s/-1269727605132ms]
Re: testing motherboard: no debug messages in console
March 27, 2010 09:43PM
rravinof Wrote:
-------------------------------------------------------
> $ stty 19200 raw ignbrk -hup < /dev/ttyUSB0; (cat
> < &3 & cat > &3; kill $!) 3<>/dev/ttyUSB0
> bash: !: event not found

you need a space after the ! for this to work- it's an annoying bash quirk that $! means one thing, and !blah means something else, and bash goes for the latter when both are possibilities

> $ stty 19200 raw ignbrk -hup < /dev/ttyUSB0
> stty: standard input: unable to perform all
> requested operations

hm, I wonder which operation didn't work. they all work with the FT232RL on my arduino. what kernel are you using? (uname -a). should work anyway


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Re: testing motherboard: no debug messages in console
March 28, 2010 02:40PM
some good news: I tried windows xp and it worked 'out of the box': there's communication between the motherboard and host software. smiling smiley So the electronics should be good!

I would like to make it work on Ubuntu though.

An oddity I encountered is that when I don't plug in any FTDI cable, the host software debug messages are:
DEBUG: The distribution preferences file and yours match.  This is good. [0.006s/-1269798955118ms]
DEBUG: GCode opening port /dev/ttyUSB0 [0.182s/176ms]
Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
Error opening port: /dev/ttyUSB0
DEBUG: bufferQueue: attempt to queue: T0; select new extruder to a non-running output buffer. [2.773s/2591ms]
DEBUG: bufferQueue: attempt to queue: M113; set extruder to use pot for PWM to a non-running output buffer. [2.773s/0ms]
DEBUG: queueRespond: attempt to queue: M105; get temperature to a non-running output buffer. [2.774s/1ms]
(etc etc - running)

when having the cable and motherboard attached, debug messages are:
DEBUG: The distribution preferences file and yours match.  This is good. [0.007s/-1269799085406ms]
DEBUG: GCode opening port /dev/ttyUSB0 [0.151s/144ms]
Experimental:  JNI_OnLoad called.
Stable Library
=========================================
Native lib Version = RXTX-2.1-7
Java lib Version   = RXTX-2.1-7
RXTX Warning:  Removing stale lock file. /var/lock/LCK..ttyUSB0
DEBUG: Attempting to initialize Arduino/Sanguino [0.171s/20ms]
comms: G-code: N0 T0 *26 dequeued and sent [4.795s/4624ms]
(and there it stops)

Does this indicate a driver problem maybe?

Question: is it necessary to have an FTDI driver installed, or is it included into Ubuntu 9.10? On the driver install help from the FTDI website I found that the driver name for ftdi should be named 'ftdi_sio.h'. But when doing
find / -iname 'ftdi_sio.h'
on my system there is no match.


@ Triffid_Hunter
kernel is:
2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12 05:23:09 UTC 2010 i686 GNU/Linux

tried with the extra space, but no luck:
$ stty 19200 raw ignbrk -hup < /dev/ttyUSB0; (cat < &3 & cat > &3; kill $! ) 3<>/dev/ttyUSB0 
bash: syntax error near unexpected token `&'
Re: testing motherboard: no debug messages in console
March 28, 2010 10:53PM
rravinof Wrote:
-------------------------------------------------------
> @ Triffid_Hunter
> kernel is:
>
> 2.6.31-20-generic #58-Ubuntu SMP Fri Mar 12
> 05:23:09 UTC 2010 i686 GNU/Linux

this version works for me..

> tried with the extra space, but no luck:
>
> $ stty 19200 raw ignbrk -hup < /dev/ttyUSB0; (cat
> < &3 & cat > &3; kill $! ) 3<>/dev/ttyUSB0
> bash: syntax error near unexpected token `&'

ah, you can't have spaces between < > and the &3- in most situations, bash doesn't care about whitespace, but with this particular trickery, it's very finicky :/

( cat <&3 & cat >&3; kill $! ) 3<>/dev/ttyUSB0

check out mendel_talk() function in my func.sh on github


-----------------------------------------------
Wooden Mendel
Teacup Firmware
Sorry, only registered users may post in this forum.

Click here to login