I have an AVR ATMega16 board talking RS232 serial that I want to connect to my Bubba 2.
So I bought a USB to serial adapter which was recognized by the system.
Trying out a small test program:
#!/usr/bin/perl
$|=1;
open(AVR,"+</dev/ttyUSB0"); #Both read and write
print AVR "p";
while(<AVR>) { print; last if /Unkown command/;}
I get the expected output (a few lines from the AVR) - BUT I also get the following in my syslog:
Apr 27 16:47:00 kalle kernel: ------------[ cut here ]------------
Apr 27 16:47:00 kalle kernel: Badness at d1190510 [verbose debug info unavailable]
Apr 27 16:47:00 kalle kernel: NIP: d1190510 LR: c015c240 CTR: d11904e0
Apr 27 16:47:00 kalle kernel: REGS: cf835d90 TRAP: 0700 Tainted: G W (2.6.26.5)
Apr 27 16:47:00 kalle kernel: MSR: 00029032 <EE,ME,IR,DR> CR: 24002082 XER: 00000000
Apr 27 16:47:00 kalle kernel: TASK = cf81e000[4] 'events/0' THREAD: cf834000
Apr 27 16:47:00 kalle kernel: GPR00: 00000001 cf835e40 cf81e000 cedabc00 cedabc00 cee991af 00000008 ae7c17a3
Apr 27 16:47:00 kalle kernel: GPR08: c90c7660 d1190000 08000000 00000800 24002084 1001a7f0 0ffbf000 cedabcd4
Apr 27 16:47:00 kalle kernel: GPR16: c0352594 c02e05b0 cf835e78 cedabcb8 cedabd84 cedabd1c c0340000 c02be6cc
Apr 27 16:47:00 kalle kernel: GPR24: c0346128 00000000 cee990af 00000001 cee991b0 cedabc00 00000055 cef34600
Apr 27 16:47:00 kalle kernel: Call Trace:
Apr 27 16:47:00 kalle kernel: [cf835e40] [00009032] (unreliable)
Apr 27 16:47:00 kalle kernel: [cf835e50] [c015c240]
Apr 27 16:47:00 kalle kernel: [cf835e60] [c0159ccc]
Apr 27 16:47:00 kalle kernel: [cf835e70] [c015afb8]
Apr 27 16:47:00 kalle kernel: [cf835f50] [c0155d14]
Apr 27 16:47:00 kalle kernel: [cf835f70] [c002dbd8]
Apr 27 16:47:00 kalle kernel: [cf835f90] [c002e1b0]
Apr 27 16:47:00 kalle kernel: [cf835fd0] [c0031ba0]
Apr 27 16:47:00 kalle kernel: [cf835ff0] [c000fb4c]
Apr 27 16:47:00 kalle kernel: Instruction dump:
Apr 27 16:47:00 kalle kernel: 9421fff0 7c0802a6 3d20d119 93e1000c 90010014 80095664 83e30138 2f800000
Apr 27 16:47:00 kalle kernel: 409e0040 801f0070 7c000034 5400d97e <0f000000> 817f0000 7fe3fb78 812b0004
Apr 27 16:47:00 kalle kernel: ------------[ cut here ]------------
Apr 27 16:47:00 kalle kernel: Badness at d11905b8 [verbose debug info unavailable]
Apr 27 16:47:00 kalle kernel: NIP: d11905b8 LR: c0155254 CTR: d1190568
Apr 27 16:47:00 kalle kernel: REGS: cf835d80 TRAP: 0700 Tainted: G W (2.6.26.5)
Apr 27 16:47:00 kalle kernel: MSR: 00029032 <EE,ME,IR,DR> CR: 24002082 XER: 00000000
Apr 27 16:47:00 kalle kernel: TASK = cf81e000[4] 'events/0' THREAD: cf834000
Apr 27 16:47:00 kalle kernel: GPR00: 00000001 cf835e30 cf81e000 ffffffed cf835e58 00000001 00000008 ae7c17a3
Apr 27 16:47:00 kalle kernel: GPR08: c90c7660 d1190000 00000000 c71a0c00 24002084 1001a7f0 0ffbf000 cedabcd4
Apr 27 16:47:00 kalle kernel: GPR16: c0352594 c02e05b0 cf835e78 cedabcb8 cedabd84 cedabd1c c0340000 c02be6cc
Apr 27 16:47:00 kalle kernel: GPR24: c0346128 00000000 cee990af 00000001 cee991b0 cf835e58 00000001 cef34600
Apr 27 16:47:00 kalle kernel: Call Trace:
Apr 27 16:47:00 kalle kernel: [cf835e30] [cedabc00] (unreliable)
Apr 27 16:47:00 kalle kernel: [cf835e50] [c0155254]
Apr 27 16:47:00 kalle kernel: [cf835e60] [c0159d48]
Apr 27 16:47:00 kalle kernel: [cf835e70] [c015afb8]
Apr 27 16:47:00 kalle kernel: [cf835f50] [c0155d14]
Apr 27 16:47:00 kalle kernel: [cf835f70] [c002dbd8]
Apr 27 16:47:00 kalle kernel: [cf835f90] [c002e1b0]
Apr 27 16:47:01 kalle kernel: [cf835fd0] [c0031ba0]
Apr 27 16:47:01 kalle kernel: [cf835ff0] [c000fb4c]
Apr 27 16:47:01 kalle kernel: Instruction dump:
Apr 27 16:47:01 kalle kernel: 817f0000 812b0000 80090014 2f800000 419e0040 3d20d119 80095664 2f800000
Apr 27 16:47:01 kalle kernel: 409e0044 801f0070 7c000034 5400d97e <0f000000> 812b0004 7fe3fb78 7fa4eb78
Which I don't really like.
Any hints, tips, etc what to do?
I'm thankfull for any help.
Anders
Please note the new address for this forum : forum.excito.org. The old address redirects here but I don't know for how long. Thanks !
New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
USB <-> Seriell
Hi Anders,
Which cable is this? And when does this occur? When plugging the cable or when executing your perl script?
/Tor
Which cable is this? And when does this occur? When plugging the cable or when executing your perl script?
/Tor
Co-founder OpenProducts and Ex Excito Developer
Tor,tor wrote:Hi Anders,
Which cable is this? And when does this occur? When plugging the cable or when executing your perl script?
/Tor
It is from Kjell o Co item 38885: USB till seriell adapter DB9ha - USB A ha
(Sorry haven't got any more info ...) -- Recommendations for a better one?
Error messages occur each time I execute the script.
Syslog entry when I plugging the cable:
Apr 26 20:34:56 kalle kernel: usb 1-1.1: new full speed USB device using fsl-ehci and address 8
Apr 26 20:34:56 kalle kernel: usb 1-1.1: configuration #1 chosen from 1 choice
Apr 26 20:34:56 kalle kernel: pl2303 1-1.1:1.0: pl2303 converter detected
Apr 26 20:34:56 kalle kernel: usb 1-1.1: pl2303 converter now attached to ttyUSB0
Anders
Hi again AArdo,
I have not the exakt same cable but another one based on pl2303. And i unfortunately can't reproduce your problem. I however connect the other end to a PC.
Can you get the same results when connecting Bubba via this to your PC? I installed minicom on Bubba and ran a terminal on the pc. That worked ok.
Further more i see no serial port setup code in your example. Could this maybe be the thing triggering this behavior?
/Tor
I have not the exakt same cable but another one based on pl2303. And i unfortunately can't reproduce your problem. I however connect the other end to a PC.
Can you get the same results when connecting Bubba via this to your PC? I installed minicom on Bubba and ran a terminal on the pc. That worked ok.
Further more i see no serial port setup code in your example. Could this maybe be the thing triggering this behavior?
/Tor
Co-founder OpenProducts and Ex Excito Developer
Tor!
Thanks for your help!
Anders
You're probably right. Installing minicom and running towards my AVR works OK, and after that my Perl script works OK aswell.tor wrote:Hi again AArdo,
...
Further more i see no serial port setup code in your example. Could this maybe be the thing triggering this behavior?
/Tor
Thanks for your help!
Anders