5

I've got a strange problem with serial output. Using Wheezy and 8 Databits, 1 Stopbit, NoFlowcontroll, NoParity (config as stated in eLinux Wiki). With 57600 Baud everything works fine but with 115200 Baud all I receive is gibberish. My RasPI is connected over a MAX232 and Prolific 2303 USB-to-Serial to the PC. I supply the different outputs and my inittab, config.txt and cmdline.txt for better understanding.

What's going wrong? I have no idea how to fix this.


RS232 Output (115200 Baud)

BDöNæ9Ãóqñ*è(:¿ÞÞPʸg~^>hÊ

                          HH
                            HóLþicMùT)ÈÚNx                                   J
~î7óv<¯                                  Ey:Jb HÕB¾    ¼sõH9SB!jøB"cùBFCþ¯yø _ñæü0~HBxþCNqCg¼C¨È8.ÖSBÌðÞ@OqaßØn^ã1XþC.!
        n;zÖCÖ?ãSºH ©üÖdÈ_ Qãl
                   ô      ì  ÜzTü*óHo
                                     Ì
                                      6B
év.­b0JNLYÆÿ¿iëd0U²(kßÞb!
                        ú]/xscB!ï¯!BoXûÿ1ïâÖCÿ6ÌAnè*íÌC)º¿BíÞØ.C.@ÆÃwHJÂs
"YE:ñ.èFðÌCÊ÷ÞÄ
               !x
                 H
w6@BtbHJ
        ̪
          Ì6ì
H¾a¿bH.">îvy®;f<ßBÌ
               p­L¨fæH­E
­þ¼MBÞI
                                                                                                                                                         üB¬JBXh@È~n
    !
P\!Þ
âPÞ
½Â]ßHóÿnHâØ]½øßØÆB5`Æ!Ö.)h=ìï(
CÌóo½B   WØXÌ   ¾yE!T1J"!ÞhQÌè>óa½CMÖ
|!ô%@
     8ýæPë÷HÊKhÖ6
                 @Stm:ãCî@Æö!Dö"f½Pó}ñØî?>HÈ) 6ö]zr!!o.àVBV2½Xóañ¨¾ó@
                                                                      Jö!f½Pó!!@¶C
yÐ~ÝHÄ1è?ÿyEûVOPvëÌ%qºzôßñÎòRN!ÐÎkp±Ä5ßÿ®öS                                       ¿á½PqC­úDaqp@¶VÈSXÆ?öH0CóöF=½CV9YvöJÈú({ï!
                                           ©
¾qÐ#á_þþqÄZq¾
Cßÿb/Ö
øHHCèß?ÿg
ÈJàçþ6
      õMR§þ:­X
              W~íPï!9>
                    HÆJ§þ9
                          æ1PöqÖXæ!È5`ÎüB(Öè¾ Îü@qóàÊH\Rô_
                                                          μöªBSIHLº~sH~ÖÈsH6*RLè~ó¾e
                                                                                     ">HHCÐÿþóFÿHløHHF[PÿÎü¾&ÌB
Hy
  ¬ñv¾!xÌÊK`ÎCBÁf¨f3@ר{
                        CÏhLH
ÞxLZA²RÊU_Þgú¸
              öÃ#C8Ôö\+\!6¾%@Õj¨Ü¾
                                  ¾§¿B\¿RS                                                                                                               _aösHB&ñSÈØùÞÃ_@©*ñÄ"²NÿyPþݶJÌ H¿ØnC.@ÆÃwjNs°C\¾Cá.ók~àOéaöü¶cLHܾB῾
¸lñw1A½NX¨RÜ¿B¥@nìúÓÞ¾                        ºO1@%ºâ.k8dÃw1A½NhÈHÜ¿R@l
Ö´)@NHï!3=¨IY<q8ìmñ7HC)º¿ÁÌ@I!
ߨ³!Büý_@9HJH8§¿BC!Öónè5Î8b翾¿î@ÆÃ+HC5º¿ê1ï!ókÿ9¨þcHøJJÈHïñó>k\æÊRÖ!N9ý8¿¾
§#­HÖáî`}Ë@9רqúe¦zÖ*ØS¨cºRÌ
                            éRÌóμ)øF-ß
C¾hÿböÌF=þg
           Ö&ö]~âÖXù{
.ìë[qB
    Övö¾²%JBX9!÷ÿsÌÌZ!c.èÆíC½BHB2c
                                  M]Ê]Bïñóú§UÌ¡H)CÌàXãß!F翾Bø
ÌØñ+ßCïí6Cñó
ë2HÌØñ+ßÃ]
          ç_)Jô]ÃHvñUÈÐ;Í>­3xcoÑHôøk
                                    àÂCG!k9ÌN¦)Ìuüý_ü"9Ì
                                                       ú`rüý_ü"ëàN
è
 ýðß"Vÿû¿
         ñÿFy
­H.s
èÌN
è
 ýðS.Ö"á¿Bg½­]JS¾
                 ßî0J9Ñ
                       ôøé¾
                           ¾§¿F\¿Rî¿ñ!JèØÝ
                                          B¨@9QJôøé¾
                                                    ¾§¿B\¿Rî¿áÝ಩
                                                                  ýÿ¿
                                                                     ¿Þ~%ð
Oýoú1@ú¾û.ò3JOÖk÷
iÓ]ÿC            'zyfþ[y:ãq
8aßÌ)àè,¬b}B!)!
              H¿Ð?
                  ÌiNJ>|H"@9
                            ÌûBÀóÈ>!)HÄsÀn
1HH
ifú­ÖkCÖrc!HD)fø
               ½9T~I@ýûHvÿ¼Hþ
iý!H í¾7CH
éýÊý¸
é`ÎA\98²ÌJH
=¶Hü9´B
M

MCs翲BHÄ&v]@@p!ðo-JìøãBHïûó~EsC!éÚ¶B
@
pá
  BN
}!c¼áàÈ=ÜJÑÍÖ.ó+~ís§C¿O!á@9JLøaoBX_az
           f
            Búú@9q´LþMw°6ñSȸCù~óö²Jb!
                                      UwHöc½H¸¿nòvÿ@9ý&SH6ÃsÃk>þ²þÖHÖ¿®B+@9ôêXã:!avÄ{Âíþßüs§C¿¹þ
Ô6g8ÏýñøgÏýñ9ªB}ü!]             dúí~½F
f]ܦrÞbcØÞóÃ{:Ì@Iô1X&À*C:¿hø@I!¨
            P"?EF¨^s
ü{ØH!x*ìX>÷H
'9Ôøé¾
üaüE@zç¿^C¼HáSs~çr-Ê"^!v!Yè2_k«ñCû¾Bcrê"Y½kÃ
ùS~^~X@LHqóÚ!199HÆCð                È&ÖH{hø@H²c¾¿¾
                    î
                     !@H
ðÿC!@9JÎùCoHoÎÃxwâ9rø@HNHøS<c
B]ÈB9Ìc@9ÙÈû(pCø@9úHiu9xgozEí+~HH=9!HøcJhº£Mg*R=*¡Jè¸L!|cBEmkÊß÷¿ø!xá
ÉzaÊU9[~
}!HvD1@9
        Êø
AB!·9HH
ѽ.
  _aúL!ÁqC9Ì¿
=®
  Axoú­
Ök
Nýû¸J@9B¸
1øbx/
     b7~ÿb
^vø¼9´R}éCH;@9
              zi=²ZÈh¢
                      çG!)VØøéºzìéÈHXJB{HJ)ZÄ°BÖ~XhXN¨BocB1íkÈîQÌí@Îjoº`â1ßEkpn9L÷ÄJÜJY®XáÂÌþþÌ@g
Â!anß"þB!oÞhg

/etc/inittab

[…]
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100

/boot/config.txt

[…]
init_uart_baud=115200

/boot/cmdline.txt

dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

RS232 Output (57600 Baud)

[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Linux version 3.2.27+ (dc4@dc4-arm-01) (gcc version 4.7.2 20120731 (prerelease) (crosstool-NG linaro-1.13.1+bzr2458 - Linaro GCC 2012.08) ) #160 PREEMPT Mon Sep 17 23:18:42 BST 2012
[    0.000000] CPU: ARMv6-compatible processor [410fb767] revision 7 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: BCM2708
[    0.000000] Memory policy: ECC disabled, Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 60960
[    0.000000] Kernel command line: dma.dmachans=0x7f35 bcm2708_fb.fbwidth=656 bcm2708_fb.fbheight=512 bcm2708.boardrev=0x5 bcm2708.serial=0xda366958 smsc95xx.macaddr=B8:27:EB:36:69:58 dwc_otg.lpm_enable=0 console=ttyAMA0,57600 kgdboc=ttyAMA0,57600 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 240MB = 240MB total
[    0.000000] Memory: 237748k/237748k available, 8012k reserved, 0K highmem
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xcf800000 - 0xe8000000   ( 392 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xcf000000   ( 240 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc04c1ec8   (4840 kB)
[    0.000000]       .init : 0xc04c2000 - 0xc04e1930   ( 127 kB)
[    0.000000]       .data : 0xc04e2000 - 0xc050dba0   ( 175 kB)
[    0.000000]        .bss : 0xc050dbc4 - 0xc05b4ae8   ( 668 kB)
[    0.000000] NR_IRQS:330
[    0.000000] sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 4294967ms
[    0.000000] timer_set_mode: unhandled mode:1
[    0.000000] timer_set_mode: unhandled mode:3
[    0.000000] Console: colour dummy device 80x30
[    0.000000] console [tty1] enabled
[    0.000937] Calibrating delay loop... 697.95 BogoMIPS (lpj=3489792)
[    0.060155] pid_max: default: 32768 minimum: 301
[    0.060632] Mount-cache hash table entries: 512
[    0.061120] Initializing cgroup subsys cpuacct
[    0.061213] Initializing cgroup subsys devices
[    0.061249] Initializing cgroup subsys freezer
[    0.061280] Initializing cgroup subsys blkio
[    0.061421] CPU: Testing write buffer coherency: ok
[    0.061769] hw perfevents: enabled with v6 PMU driver, 3 counters available
[    0.062981] devtmpfs: initialized
[    0.073166] NET: Registered protocol family 16
[    0.074848] vc_mem_connected_init: called
[    0.074932] bcm2708_vcio: bcm_mailbox_property failed (-19)
[    0.074976] vc_mem_update: success=-19 resp 0, vcbase=0 vcsize=0 armbase=0 armsize=0
[    0.075021] vc-mem: mm_vc_mem_phys_addr = 0x00000000
[    0.075052] vc-mem: mm_vc_mem_size      = 0x00000000 (0 MiB)
[    0.075532] hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
[    0.075588] hw-breakpoint: maximum watchpoint size is 4 bytes.
[    0.075626] mailbox: Broadcom VideoCore Mailbox driver
[    0.075719] bcm2708_vcio: mailbox at f200b880
[    0.075811] bcm_power: Broadcom power driver
[    0.075850] bcm_power_open() -> 0
[    0.075876] bcm_power_request(0, 8)
[    0.576558] bcm_mailbox_read -> 00000080, 0
[    0.576598] bcm_power_request -> 0
[    0.576624] Serial: AMBA PL011 UART driver
[    0.576777] dev:f1: ttyAMA0 at MMIO 0x20201000 (irq = 83) is a PL011 rev3
[    1.228115] console [ttyAMA0] enabled
[    1.256566] bio: create slab <bio-0> at 0
[    1.265798] SCSI subsystem initialized
[    1.273510] usbcore: registered new interface driver usbfs
[    1.284707] usbcore: registered new interface driver hub
[    1.295632] usbcore: registered new device driver usb
[    1.306668] Switching to clocksource stc
[    1.314827] FS-Cache: Loaded
[    1.320939] CacheFiles: Loaded
[    1.340222] NET: Registered protocol family 2
[    1.349474] IP route cache hash table entries: 2048 (order: 1, 8192 bytes)
[    1.364399] TCP established hash table entries: 8192 (order: 4, 65536 bytes)
[    1.378932] TCP bind hash table entries: 8192 (order: 3, 32768 bytes)
[    1.392039] TCP: Hash tables configured (established 8192 bind 8192)
[    1.404779] TCP reno registered
[    1.411067] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    1.422788] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    1.435841] NET: Registered protocol family 1
[    1.445363] RPC: Registered named UNIX socket transport module.
[    1.457390] RPC: Registered udp transport module.
[    1.466832] RPC: Registered tcp transport module.
[    1.476263] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    1.489427] bcm2708_dma: DMA manager at cf808000
[    1.498807] bcm2708_gpio: bcm2708_gpio_probe c04e9c18
[    1.509395] vc-mem: Videocore memory driver
[    1.518581] audit: initializing netlink socket (disabled)
[    1.529502] type=2000 audit(0.850:1): initialized
[    1.651482] VFS: Disk quotas dquot_6.5.2
[    1.659640] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    1.673659] FS-Cache: Netfs 'nfs' registered for caching
[    1.685304] msgmni has been set to 464
[    1.694937] io scheduler noop registered
[    1.702801] io scheduler deadline registered (default)
[    1.713321] io scheduler cfq registered
[    1.738254] Console: switching to colour frame buffer device 82x32
[    1.755657] kgdb: Registered I/O driver kgdboc.
[    1.774083] brd: module loaded
[    1.787933] loop: module loaded
[    1.797789] vcos: [1]: vchiq_init_state: slot_zero = 0xffd80000, is_master = 0
[    1.815288] vcos: [1]: vchiq_init_state: called
[    1.827971] vcos: [1]: vchiq: initialised - version 2 (min 2), device 252.0
[    1.845352] usbcore: registered new interface driver smsc95xx
[    1.859615] cdc_ncm: 04-Aug-2011
[    1.868877] usbcore: registered new interface driver cdc_ncm
[    1.882861] dwc_otg: version 3.00a 10-AUG-2012 (platform bus)
[    2.097242] Core Release: 2.80a
[    2.106296] Setting default values for core params
[    2.118759] Finished setting default values for core params
[    2.332821] Using Buffer DMA mode
[    2.342162] Periodic Transfer Interrupt Enhancement - disabled
[    2.356630] Multiprocessor Interrupt Enhancement - disabled
[    2.370569] OTG VER PARAM: 0, OTG VER FLAG: 0
[    2.382055] Dedicated Tx FIFOs mode
[    2.392064] dwc_otg bcm2708_usb: DWC OTG Controller
[    2.404687] dwc_otg bcm2708_usb: new USB bus registered, assigned bus number 1
[    2.422019] dwc_otg bcm2708_usb: irq 32, io mem 0x00000000
[    2.435786] Init: Port Power? op_state=1
[    2.446341] Init: Power Port (0)
[    2.455582] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.471968] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.489230] usb usb1: Product: DWC OTG Controller
[    2.501427] usb usb1: Manufacturer: Linux 3.2.27+ dwc_otg_hcd
[    2.515809] usb usb1: SerialNumber: bcm2708_usb
[    2.528506] hub 1-0:1.0: USB hub found
[    2.538882] hub 1-0:1.0: 1 port detected
[    2.550551] usbcore: registered new interface driver uas
[    2.564001] Initializing USB Mass Storage driver...
[    2.576777] usbcore: registered new interface driver usb-storage
[    2.591536] USB Mass Storage support registered.
[    2.603758] usbcore: registered new interface driver libusual
[    2.618392] mousedev: PS/2 mouse device common for all mice
[    2.633165] bcm2835-cpufreq: min=700000 max=700000 cur=700000
[    2.644723] bcm2835-cpufreq: switching to governor powersave
[    2.658801] bcm2835-cpufreq: switching to governor powersave
[    2.672940] cpuidle: using governor ladder
[    2.686525] cpuidle: using governor menu
[    2.697029] sdhci: Secure Digital Host Controller Interface driver
[    2.711972] sdhci: Copyright(c) Pierre Ossman
[    2.723533] sdhci: Enable low-latency mode
[    2.734310] bcm_power_open() -> 1
[    2.744784] Indeed it is in host mode hprt0 = 00021501
[    2.759246] mmc0: SDHCI controller on BCM2708_Arasan [platform] using platform's DMA
[    2.795692] mmc0: BCM2708 SDHC host at 0x20300000 DMA 2 IRQ 77
[    2.827088] sdhci-pltfm: SDHCI platform and OF driver helper
[    2.865457] usbcore: registered new interface driver usbhid
[    2.892131] usbhid: USB HID core driver
[    2.906418] mmc0: new high speed SDHC card at address b368
[    2.930275] TCP cubic registered
[    2.940164] mmcblk0: mmc0:b368 F0F0F 15.0 GiB
[    2.951803] Initializing XFRM netlink socket
[    2.964098] NET: Registered protocol family 17
[    2.975860] Registering the dns_resolver key type
[    2.988381]  mmcblk0: p1 p2
[    2.996776] VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 5
[    3.019120] registered taskstats version 1
[    3.030188] drivers/rtc/hctosys.c: unable to open rtc device (rtc0)
[    3.045560] usb 1-1: new high-speed USB device number 2 using dwc_otg
[    3.062356] Indeed it is in host mode hprt0 = 00001101
[    3.122999] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[    3.164651] VFS: Mounted root (ext4 filesystem) on device 179:2.
[    3.203562] devtmpfs: mounted
[    3.213409] Freeing init memory: 124K
[    3.324982] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[    3.342402] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.361747] hub 1-1:1.0: USB hub found
[    3.372518] hub 1-1:1.0: 3 ports detected
[    3.664851] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[    3.795227] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[    3.795250] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[    3.798370] smsc95xx v1.0.4
[    3.890164] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:36:69:58
[    4.705538] udevd[137]: starting version 175
[   11.566227] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   12.023872] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[   12.753712] bcm2835 ALSA card created!
þþ
Debian GNU/Linux wheezy/sid raspberrypi ttyAMA0

raspberrypi login:

/etc/inittab

[…]
#Spawn a getty on Raspberry Pi serial line
T0:23:respawn:/sbin/getty -L ttyAMA0 57600 vt100

/boot/config.txt

[…]
init_uart_baud=57600

/boot/cmdline.txt

dwc_otg.lpm_enable=0 console=ttyAMA0,57600 kgdboc=ttyAMA0,57600 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait

  • I assume you're serial input device is set to expect the correct baud? – Jivings Nov 1 '12 at 22:55
  • Yes, you assume right. – Mose Nov 1 '12 at 22:59
5

The config looks OK, and both ends should support 115.2k and the RS232/USB cable certainly will.

Have you tried putting a 'scope on the Tx/Rx lines just to be sure that the data is getting out? This could help narrow down the problem.

Another possible check is that, depending on the version of the MAX232 and the capacitors around the device, you may be limited to 64kbps (see the datasheet) rather than 120kbps of the higher spec devices.

  • 1
    I used 1µF caps. So as far as I could find it in the datasheet this should be ok with up to 120kbps? What do you mean by "putting a 'scope on"? – Mose Nov 2 '12 at 9:20
  • Yes... that should be OK to 120kbps – Andrew Nov 2 '12 at 9:21
  • By "putting a scope on" I mean use an oscilloscope to get a trace of the data lines - either tagging onto the connectors, or maybe using a break-out box. You can then see if they are at the right speed, shape etc – Andrew Nov 2 '12 at 10:24
  • Thanks for your interest in this problem. Even it's not the answer in this case, I add a upvote for you for pointing out this capacitor thing. Maybe someone else didn't know this if one sumbles upon this. – Mose Nov 2 '12 at 11:32
4

The Problem in this setup is the "Prolific" USB-to-Serial Interface. I managed to get everything to work with a borrowed Notebook with native serialport. I further investigated with a tool from Prolific to check chip version. It stated that it's a PL2303HXA. On their website it states:

Please be warned that counterfeit (fake) PL-2303HX (Chip Rev A) USB to Serial Controller ICs using Prolific's trademark logo, brandname, and device drivers, were being sold in the China market. Counterfeit IC products show exactly the same outside chip markings but generally are of poor quality and causes Windows driver compatibility issues […]

I guess I got one of these and that's all the problem in this case.

  • 2
    That's a bit of a bummer... glad you got to the bottom of it, though. – Andrew Nov 2 '12 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.