WB6DL: Serial connection glitches plus overal system questions.

485 views
Skip to first unread message

Marko Pagott

unread,
Jun 7, 2013, 5:37:05 PM6/7/13
to wand...@googlegroups.com
Good day,

 

I've question about having WB Dual Lite up.

 

The situation is that I've recently got this board, purely by accident, coz I was going for RasPi.

FreeScale CPU + all other features got me convinced that board is worth trying.

 

To make you right impresson, I've already:

  • Got WB Ubuntu distro insalled (in fact it's the only thing that ran rather good so far);
  • Got Ubuntu upgraded to 12.04.
  • Got lots of sex with EGL (compiling mesa, dri, then realising it's all wrong and I miss kernel modules etc.)
  • Got figured that my A4Tech mouse not working coz there is no module compiled.
  • Built toolchain
  • Figured out, that WB distro suxx coz it's armel (no hardware FP, which is 5-40% faster (C) ), no offence.
  • Figured out, that you should not start partitioning flash from the beginning, and ARM doesn’t care about boot sector flags.
  • Understand that recommended port speed for UART (COM port) is 115200 8N1
  • Already know by hard, that in 9 pin COM port, 2 & 3 pins are RX/TX.
  • Found SDK and compiled my own kernel (but that's further)
  • I AM using Ubuntu since 6.10 release.
  • Really downloaded all docs from freescale and WB websites (including wand-dev.pdf).

All above was said to state that I've already tried all simple methods of solving.

Now the questions:

  1. When I connect to RS232, I got lots of garbage symbols. The connection was made by means of two different cables: FT2232 (JTAG/COM) and Profilic 232.
    Also there were used two different computers with Ubuntu. I've tried: screen, minicom, microcom and putty. The result is pretty much the same: garbage in com port.
    Need to notice, that if I press key as it is advised in manual during first 3 seconds of boot, symbols stop spawning and everything freezes.
    Also tried playing with baud-rates with lack of success.
  2. Concerning u-boot, I've noticed, that it is recommended to set "bootargs" to configure startup parameters. How and where is it done, considering I'm building new "u-boot" loader, and with respect to fact that I have no console access (yet?). 
  3. Concerning SATA port, I didn't get it quite. It is said, that port is wired, but reserved for future use. Does this mean that my current WB6DL after software/firmware upgrade will be SATA-capable, or it's just marketing?

I'd suggest building new WB image with armhf toolchain for website. It was a bit shame, when code compiled for RasPi (ARM6) could not run on my i.MX6 (ARM7) because I had armel distro.

Thanks
in advance for any help.


Marko Pagott

unread,
Jun 8, 2013, 11:30:37 AM6/8/13
to wand...@googlegroups.com
Okay,
Here's the plan: As soon as UART fails to work properly, I desided to activate u-boot build-in feature "netconsole".
Done so far:
1. Added these lines to include/configs/wandboard.h
// Define addresses:
#define CONFIG_NETMASK 255.255.255.0
#define CONFIG_IPADDR 192.168.10.99
#define CONFIG_GATEWAYIP 192.168.10.8
#define CONFIG_SERVERIP 192.168.10.100


#define CONFIG_NETCONSOLE 1
#define CONFIG_SYS_CONSOLE_IS_IN_ENV 1
//#define CONFIG_SYS_CONSOLE_OVERWRITE_ROUTINE 1
then as usual (as root):
make -j3
dd if=u-boot.imx of=/dev/sdd bs=1k seek=1

then (for ubuntu users)
apt-get install nc.traditional
and 
nc.traditional -l -u -p 6666 & nc.traditional -u 192.168.10.99 6666

Then put flash into WB slot 1 (the one that's on CPU) and applied power.
No result, no echo replies either.
A little help from ppl with working COM interface would be appreciated. Could anyone build working u-boot with arm-linux-gnueabihf compilers and attach here? In perfect case compile in netconsole support. 
Also if developers could add CONFIG_STATUS_LED to u-boot (I've tried compiling with this flag, but was giving some errors and without proper debug interface it's pretty hard to make it work) it would be wonderful.

For now it's hard to figure out, which part of u-boot+kernel pair has errors.

Marko Pagott

unread,
Jun 8, 2013, 2:04:08 PM6/8/13
to wand...@googlegroups.com
By the way:

If you are running Linux on your host system we recommend either kermit or cu as terminal emulation programs. Do not use minicom, since this has caused problems for many users, especially for software download over the serial port. 

Form manual.  

Marko Pagott

unread,
Jun 8, 2013, 5:57:02 PM6/8/13
to wand...@googlegroups.com
Well, if noone to answer, here's more:
1. wandboard.h has parameters that can be adjusted to set precompiled bootargs to u-boot loader. That's wonderfull but haven't helped me with netconsole yet.
2. Somehow "wand-dev.pdf" missed one VERY important fact, that zImage is not compatible with u-Boot and needs to be converted by means of mkimage.
go to u-boot/tools, and issue the following comand (I copied kernel to that folder):
./mkimage -A arm -O linux -T kernel -C gzip -a 0 -e 0 -n Linux-3.0.35-wand3 -d 3.0.35-wand3.zImage 3.0.35-wand3.uImage
afterwards, you might want to check your kernel by:
./mkimage -l 3.0.35-wand3.uImage
You can also check your zImage and see the difference.

to be continued...

p.s. feel free to answer any questions of your choise as soon as you got right answers ;)

Robert Nelson

unread,
Jun 8, 2013, 6:06:36 PM6/8/13
to wand...@googlegroups.com
On Sat, Jun 8, 2013 at 4:57 PM, Marko Pagott <p0rc...@gmail.com> wrote:
> Well, if noone to answer, here's more:
> 1. wandboard.h has parameters that can be adjusted to set precompiled
> bootargs to u-boot loader. That's wonderfull but haven't helped me with
> netconsole yet.
> 2. Somehow "wand-dev.pdf" missed one VERY important fact, that zImage is not
> compatible with u-Boot and needs to be converted by means of mkimage.

or enable "#define CONFIG_CMD_BOOTZ" in include/configs/wandboard.h
and it will be..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

Marko Pagott

unread,
Jun 9, 2013, 5:51:31 PM6/9/13
to wand...@googlegroups.com
Thanks Robert.

Now, let's get serious.
Happy things first: I got everything up and running. It took a bit nerv.
First of all you have to edit your wandboard.h to "target" your board's data to your computer. I know it's a bit hash, but when one have toast serial, anything will do.
Here is pastebin of my wandboard.h (<- click) file.
/!\ WARINING! No raw usage, corrections needed!

Now, you have to be aware of iMX6 (and all u-boot) partitioning: first 512 bytes are FAT, don't touch it. Then after 1k goes u-boot with ~250kB weight. Then for some unknown reason ppl write raw kernel (which is really not what is described in wandboard.h file).

| 0-446: FAT | 447-1024: 0000000 | 1k-aprox 250k u-boot | 250k-1M: 0000000 | 1M-3M zImage |

In my case I desided to quit having headache with raw image (luckily wandboard.h file was aligned towards normal linux partitioning) and made simple structure.
/dev/sda1: boot (starts at 1MB of drive, we need to write u-boot, remember?)
/dev/sda2: root
/dev/sda3: swap
boot - contains: uEnv.txt, zImage (exaclty zImage named and packed so, unlike said above), and kernel config (just in case).
root - "/" partition.
swap - no comments.

Contents of uEnv.txt are:
#optargs=
mmcroot
=/dev/mmcblk0p2 ro
mmcrootfstype
=ext4 rootwait fixrtc
#video=
that's pretty much the same as there is in wandboard.h.

to connect net terminal I use ./ncb util from u-boot distributed with wandboard-sdk. (located in: /u-boot/tools/).

So, now I have normal kernel that can be copied and upgraded without means of "dd" tool. Such alignment has it's own pros and cons, but right now it's convinient.

Maxim Podbereznyy

unread,
Jun 10, 2013, 1:23:17 AM6/10/13
to wand...@googlegroups.com
Marko, with the serial garbage I would check the Ground connection first and serial port settings next


2013/6/10 Marko Pagott <p0rc...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Wandboard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wandboard+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--

Marko Pagott

unread,
Jun 10, 2013, 5:32:33 AM6/10/13
to wand...@googlegroups.com
Maxim,
Which ground should I check? 
I have: USB (standard 4 pin + ground) -> FT2232 (RX,TX,"-") -> RS232
Problem is that FT2232 USB-side negative doesn't have common ground with RS232-side.

p.s. armhf - works much faster.

понедельник, 10 июня 2013 г., 9:23:17 UTC+4 пользователь Maxim Podbereznyy написал:

Marko Pagott

unread,
Aug 30, 2013, 5:19:09 PM8/30/13
to wand...@googlegroups.com
Terminal gives me this:
����eo��%��''������eo��%��''������eo��%��''�����eo��-19'!9)���������������o��-1�5�9'!9)�����������o��=�9'!9)��������������o��9-�9'!9)��������������o��=/;�9'!9)����������������o��=-�9'!9)��������������o��5%-A'!�9'!9)����������o��779'!9)����������������o��7/9��9'!9)�������������o��7/9��9'!9)�������������o��7/9��9'!9)�������������o��7/9��9'!9)�������������o��#39�9'!9)���������������o��{!=��-�eOwgY!'!�Q=#7{!=��#)#!#�;!=�{!=�%9���������-#-��-#-�-75!�%93;��75�/7%-��������e���-3�[q{���;����-75!�%93;��!33�-75!�%93;��!33�3;%5%���e�%=''!9����e�=#7E�����%!7'5�����3�����������35���������E��������-#-��������������������7����������������5��������7�����������������������������7==��������������������37�����������)����;��������37=��������9==�����������){���5#'=;�����oQ='-1#�����a5������e-#a;+59�����������E�_5%-;'5�������E�9/57A9'!9)�����;-�=�����)o��!'-!#���1'=!#!�3!#7��-#1�7%%'5�7-=;'57��[51-57�7/9�-%���'9
What am I doing wrong?

Connection string is
screen  /dev/ttyUSB1  115200  8N1


Wand Board

unread,
Aug 31, 2013, 3:12:56 AM8/31/13
to wand...@googlegroups.com
looks like your USB to serial adaptor has issues.


Marko Pagott

unread,
Aug 31, 2013, 7:51:21 AM8/31/13
to wand...@googlegroups.com
I tried two, both have issues? What chip do you recommend to comunicate? Mine was FT2322

суббота, 31 августа 2013 г., 11:12:56 UTC+4 пользователь www.wandboard.org написал:

John Weber

unread,
Aug 31, 2013, 11:17:22 AM8/31/13
to wand...@googlegroups.com
Those serial settings ~look~ correct.  The noise you posted on appears to have a pattern, and that implies some sort of baud rate mismatch.

Not that screen doesn't work, but you might try minicom.

Marko Pagott

unread,
Aug 31, 2013, 3:03:56 PM8/31/13
to wand...@googlegroups.com
1200 bps:
��5��2���ݭ�$�-�������5U���,s�ϐu���

2400 bps:
j�^�/��g���5q��n���>�O��°�ORb$��h��)v1��s4�ᆲ���͠����t/n��{aEQ��

4800 bps:
������^*���:VU�}��/��yռ������i神��&���4gz`z8����$�ϟ�*��ܯO���0��m/9y���Zg��9���M�<���3��ǭ���z�+��k�F����iz^�)i{�m�;�����=���kiG���~���z{)+��z-{�o/Χ���#��C�����N

9600 bps:
/wo�ր������L�#��������Jƭ��<�ߊJ
                              ��+��[8b�H8�|�|^�X���������o΀ʜn�����Z�ʼμ������X�pz|o��8��x�Μ���ʠg��`��:����ކ�gg�k��r��ݬ,������ocƬ��.���

14400 bps:
����L�#F�ߖ��N����ƭ���<�c���p�oJ8�ΐ�|�|��X����X��Γ�F���L8��ր��~ހgZʼ���ʄk����op����|�B8z��H<�p��ʠ���xR�Rܥ΀��
                           ���k�B���ގ�ր�^��n�Zo���ng�|����
                                                          ��x��

19200 bps
nnO�    o�      o�      o�����j��j�R�������������������ڽ�Ԡ��n8�Z��
                                                                  �ˁ�!��̽��)��ݭ)�oν�������o�o�����@)�=�)�o��D�����O9���R��=o��τO��?�~�=�@=�-¼K�t������=�p=��j�=�8�������o     o�5Ϡ=5����ܽ��@��}�9�@=p9��y�����9�,,-��н����ܽ�����Щ�)��=��ߥ�%���?�9-9o�y��o~�Ϲ�)��)z=)��o�9)��o���9=�o����������ώ�

28800 bps:
w��ր޿���H�L�ژvGV�<�.�x�Fn����og��T�����J�8|�|wX@����|NZ�{��Z��n�ʼ�μ�x�k|�o���3c��x���H<o��o��|7޼�����������n&��z�k����&������.���noc�X�o���

38400 bps:
?���a���������xass���7����5���?��;����|�;q�?�A�S�c���y�}q���[}q����s�ʀ�ڈ�|���A�S�c�A�S�c�A�S�c��A�S

57600 bps:
���o�-��*khk�ocJk��j=��{�댐��5�

115200 bps:
VV6Z�%��''������eo��%��''������eo��%��''������eo��%��''�����eo��-1�9'!9)���������������o��-1�5�9'!9)�����������o��=�9'!9)��������������o��9-�9'!9)��������������o��=/;�9'!9)����������������o��=-�9'!9)��������������o��5%-A'!�9'!9)����������o��77�9'!9)����������������o��7/9��9'!9)�������������o��7/9��9'!9)�������������o��7/9��9'!9)�������������o��7/9��9'!9)�������������o��#39�9'!9)���������������o��{!=��-�eO�wg�Y!'!�Q=#7{!=��#)#!#�;!=�{!=���������I_a[�E��{!!�w5-95��Yw��w[Z�a����%9���������-#-��-#-�-75!�%93;��75�/7%-��������e���-3�[q{���;����-75!�%93;��!33�-75!�%93;��!33�3;%5%���e�%=''!9����e�=#7335����������E�����%=''!9����9�����������3��������������������E�����'!%5%�����������������9������E�����)%=�������35��������������������E�����%!7'5�����3�����������35�������������E��������-#-���������������������������7�������������������E��������7==��������������������37�����E���������;��������37=��������9==������E�YgU{��q5#'=;�����oQ='-1#�����a5������e-#a;+5%9�E�5#=;'57��'�!�1-57�3!�qYe�%!75%����!����!'5�I��;-�=�����)o��!'-!#����#���55

I take liberty using only standard baudrates.
Well it may be because of that COM port on WB and USB on laptop do not have common ground, because they are powered from different power sources. BUT I never had similar problem with this particular USB-2-COM communicating any other UART equipment, and I guess FT2322 asumes no need for common ground on "in" and "out" by design.
Are there any readings that I can measure on WB RS232 to tell it works fine?


Marko Pagott

unread,
Aug 31, 2013, 3:30:17 PM8/31/13
to wand...@googlegroups.com
minicom gives more garbage, but result's the same. 
Tried playing with options, nothing helped so far. 

John Weber

unread,
Aug 31, 2013, 4:19:20 PM8/31/13
to wand...@googlegroups.com
Serial ports are really simple. The signals are single-ended, with a swing for
up to +/-12V. There is a ground between the ports. You can probe them. I think
the data pins are 2 and 3 and the ground is 5, but that is from memory.
Fortunately the Wandboard used a through-hole connector and these signals are
easily probed. Wikipedia has some good data on this, I think.

FTDI-based USB-serial converters are rock-solid in my experience.

I would check your USB to RS-232 converter with something that provides
known-good serial data besides Wandboard to make sure your board's RS232 port is
not malfunctioning and that you're setting things up correctly.

On 8/31/13 2:30 PM, Marko Pagott wrote:
> minicom gives more garbage, but result's the same.
> Tried playing with options, nothing helped so far.
Reply all
Reply to author
Forward
0 new messages