Serial debug, how to ?

AmigaOne X1000 platform specific issues.
zzd10h
Posts: 546
Joined: Sun Sep 16, 2012 5:40 am
Location: France

Serial debug, how to ?

Post by zzd10h »

Hi,
I just received a USB to serial converter to show debug of my X1000 on another computer (MacOS or Windows)
http://www.trendnet.com/products/prodde ... -S9&cat=49

I have tested terminals on MacOS and Windows, the COM port is recognized. I have setted the baud rate at 115200...
But nothing is showed when I boot my computer or when I use kprintf (it works with Sashimi)

Is a special thing to do to enable the serial port ?

I don't change CFE settings, is it mandatory to make it works ?

Thank you by advance.
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: Serial debug, how to ?

Post by ssolie »

USB to serial port converters are not supported. They are also unreliable from my experience (doesn't matter what platform).

Use the built-in serial port on the X1000 instead.
ExecSG Team Lead
zzd10h
Posts: 546
Joined: Sun Sep 16, 2012 5:40 am
Location: France

Re: Serial debug, how to ?

Post by zzd10h »

Yes, I used the serial port of the X1000.
I have plugged a RS232 wire to the x1000.
Connected this wire to the adapter.
And plugged the adapter to my iMac in an USB port.

X1000 serial port -> female-female RS232 -> adapter -> iMac USB

It should work, no ?

Is somebody use this kind of adapter ?
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
User avatar
mechanic
Posts: 510
Joined: Sat Jun 25, 2011 9:22 pm

Re: Serial debug, how to ?

Post by mechanic »

zzd10h wrote:Yes, I used the serial port of the X1000.
First, check to make sure the adaptor and the X1000 have RX > TX and TX > RX. You will probable need to switch the wires on the X1000 connector. This is important, check first!

Second, make sure the Mac terminal program is running before the X1000.

Edit;
Computers usually transmit on pin 2 and receive on pin 3 so someplace along
the line the wires must crossover. A Null Modem adapter may solve the problem.
A-Eon A1X1000 ATI HD6850, Creative SB1570 PCIe, RTL8139 net PCI.
zzd10h
Posts: 546
Joined: Sun Sep 16, 2012 5:40 am
Location: France

Re: Serial debug, how to ?

Post by zzd10h »

Thank you Mechanic,
But sorry for my ignorance... How to check the wires ?

And you think that if I bought this adapter it will resolve my wires inversion ?

http://m.materiel.net/catalogue/connect ... -m-f-18265

X1000 serial port -> adapter male/female -> adapter RS232/USB -> iMac USB

And yes, I started the CoolTerm on my mac before to powerup my X1000.

Thank you again ;)
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 525
Joined: Sat Jun 18, 2011 4:06 pm
Location: North Florida, near the Big Bend

Re: Serial debug, how to ?

Post by LyleHaze »

All the information posted above is correct..
I may be able to add a bit more:
For the purpose of this document, "Amiga" will refer to the computer sending debug, and
"other computer" will refer to whatever computer is receiving debug. This other computer COULD be an Amiga, or windows, or Linux, or anything with a serial port and a display.
Any reference to "X1000" will be specific to that Amiga model, if that's what you are debugging.

The X1000 must have a serial breakout from Nemo to the backplate. Many people got one with their computer.
Inside the X1000, there are TWO serial headers, Numbered RS232#0 and RS232#1.. Debug comes from RS232#0. See sys:documentation/X1000_TRM.pdf page 18, table 10 for details.

The Serial Cable from Amiga to the other computer must be a null-modem cable, meaning that pins 2 and 3 should swap. (there are other pins that swap in a NULL cable, but that's not important now). This can be checked with a meter set to Ohms, or better, to "Beep" if the wires touch. The pin numbers are printed in TINY letters on the face of the connector, or you can google it.

The other computer serial port should be set for 115200 baud, 8 bits, no parity, 1 stop bit, NO handshaking, NO XON/XOFF. These settings really reduce the serial port to TX, RX and Ground, nothing else matters. What terminal software for the other computer? Term4.8 if it's an Amiga, I like TeraTerm on Winblows, For a MAC it's up to you to figure out.

To test the serial link and the other computers ability to receive, Download Term4.8 onto your Amiga, Open Settings/Serial, and adjust as above. Also, turn OFF local echo, and make sure serial.device unit zero is selected.
There are two notes to using Term:
Every time you start with the above settings, it will warn you that you should turn handshaking on, and offer to do it for you. The correct answer is always NO.
Every time you start term, it will have problems with a font. In the Term directory, rename the Fonts drawer to anything else, this problem will then stop.

Once term is up and running, you should be able to type into the term window, and the text should appear on the other computer. Until that works, you are not set up correctly.

Got that working? Leave the other computer set up to receive. Shut down term, it was only needed for testing. Now as a simple test, you can cold_reboot the Amiga. Open a shell and type "reboot", when the Amiga reboots, you should get some debug text appearing on the other computer. NOTE: "reboot fast" is not enough. it should be just "reboot" to drive the Amiga all the way back to the power_on state.

Finally, with all that done, Your Boot Menu on the X1000 should offer each boot volume with or without debug. (well, mine did). If you choose the Debug option, then everything should work. If your boot menu does not offer debug options, reply and we'll figure out how to add them.

Have Fun,
Lyle
xenic
Posts: 1185
Joined: Sun Jun 19, 2011 12:06 am

Re: Serial debug, how to ?

Post by xenic »

zzd10h wrote:Thank you Mechanic,
But sorry for my ignorance... How to check the wires ?
And you think that if I bought this adapter it will resolve my wires inversion ?
http://m.materiel.net/catalogue/connect ... -m-f-18265
Short answers to connect 2 computers from serial port to serial port:

If you have a standard RS232 serial cable you can buy a null modem adapter, attach it to the standard serial cable and connect the 2 computers.

Second option is to just buy an RS232 null modem cable and connect the 2 computers.

Unless you are an electronic buff and have a multimeter and soldering iron, ignore information about wiring a
null modem cable. Serial cables are somewhat outdated and therefore cheap to buy.
X1000 serial port -> adapter male/female -> adapter RS232/USB -> iMac USB
PROBABLY WRONG! Null modem adapter or null modem cable is normally only used to connect directly between serial ports like: serial port -> serial port. Unless instructions that came with your serial/USB adapter specifically states that you need a null modem adapter, you need: X1000 serial port -> adapter RS232/USB -> iMac USB.
And yes, I started the CoolTerm on my mac before to powerup my X1000.
None of the above will work unless you set your system to use the serial port for debugging. By default, the serial dubug information is sent to a memory buffer. You need to change it to serial console to get any debug output from the serial port. I'm not sure if it's necessary to enable serial output from the boot menu. My interpretation of the KDebug documetation is that you can set serial debug output from AmigaDOS. Refer to SYS:Documentation/kernel/Tools/KDebug.readme for instructions to set serial debug output.
AmigaOne X1000 with 2GB memory - OS4.1 FE
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 525
Joined: Sat Jun 18, 2011 4:06 pm
Location: North Florida, near the Big Bend

Re: Serial debug, how to ?

Post by LyleHaze »

xenic wrote: PROBABLY WRONG! Null modem adapter or null modem cable is normally only used to connect directly between serial ports like: serial port -> serial port. Unless instructions that came with your serial/USB adapter specifically states that you need a null modem adapter, you need: X1000 serial port -> adapter RS232/USB -> iMac USB.
This is a bit confusing. It sounds like you don't think a NULL cable is needed when connecting to a USB to serial converter. You DO need a null modem cable in any case.

A USB to Serial adapter creates a standard serial port on the receiving computer.

The RS232 breakout from AmigaKit creates a standard serial port on the X1000.

To connect a standard serial port to a standard serial port, you must use a NULL modem cable, or a regular serial cable with a NULL modem adapter on it.

At least this demonstrates the advantage of testing using a terminal program at both ends. Much easier to confirm the serial link first before going on to debug setup.
zzd10h
Posts: 546
Joined: Sun Sep 16, 2012 5:40 am
Location: France

Re: Serial debug, how to ?

Post by zzd10h »

Thank you for all your advices.

I just tried Term between my X1000 and my Mac.

I'm unable to enter some characters to the terminal (I have renamed the Fonts drawer otherwise Recoverable alert ).

I'm just able to use my mouse, therefore I have tested a file upload and it freezes everytime my system.
And of course, I received nothing on my Mac.

http://zzd10h.amiga-ng.org/Divers/Term.jpg

I have tried too, kdebug "debuglevel 20 console serial" but no more debug output

For the female/male adapter do you think that it can be helpful ?
http://m.materiel.net/catalogue/connect ... -m-f-18265

Thank you again !
http://apps.amistore.net/zTools
X1000 - AmigaOS 4.1.6 / 4.1 FE
User avatar
LyleHaze
AmigaOS Core Developer
AmigaOS Core Developer
Posts: 525
Joined: Sat Jun 18, 2011 4:06 pm
Location: North Florida, near the Big Bend

Re: Serial debug, how to ?

Post by LyleHaze »

zzd10h wrote:Thank you for all your advices.

I just tried Term between my X1000 and my Mac.

I'm unable to enter some characters to the terminal (I have renamed the Fonts drawer otherwise Recoverable alert ).
If you type into Term on the Amiga, and it does NOT come up on the MAC terminal screen, then the
computers are not yet connected properly. WHen you say "unable to enter characters" I assume you mean that
when you type characters in they do not show up on the Mac. But the next line sounds like maybe
you have no keyboard on the Amiga:
zzd10h wrote: I'm just able to use my mouse, therefore I have tested a file upload and it freezes everytime my system.
And of course, I received nothing on my Mac.
Just typing into term should be good enough.. All the debug information is just more text anyway.
Everything in that picture is correct. Please also check the "Device" tab for serial.device and unit 0.
zzd10h wrote: For the female/male adapter do you think that it can be helpful ?
http://m.materiel.net/catalogue/connect ... -m-f-18265
Yes. That device is a "NULL modem adapter" it will take a regular serial cable and make it
into a NULL modem cable. Funny web page though, they don't speak english! :shock:

Once you get the right connections, things will get MUCH easier!

Lyle
Post Reply