Skip to content
  • Blog
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Community Forum

J

JohnDoe

@JohnDoe
About
Posts
7
Topics
1
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent

  • reading garbage from serial port PiTInfo
    J JohnDoe

    @Charles It works! Why, I don't know. stty wants odd parity, picocom no parity. This is beyond me for now.

    pi@raspberrypi ~ $ stty --file /dev/ttyAMA0 1200 cs7 ixon -parenb
    pi@raspberrypi ~ $ cat /dev/ttyAMA0 
    5
    ADCO 012345678901 L
    OPTARIF HC.. <
    ISOUSC 30 9
    HCHC 002698197 0
    HCHP 010687090 2
    PTEC HP..  
    IINST 003 Z
    IMAX 038 J
    PAPP 00680 /
    HHPHC A ,
    MOTDETAT 000000 B
    

    or with picocom:

    pi@raspberrypi ~ $ picocom --baud 1200 --flow x --parity n --databits 7 /dev/ttyAMA0
    picocom v1.7
    
    port is        : /dev/ttyAMA0
    flowcontrol    : xon/xoff
    baudrate is    : 1200
    parity is      : none
    databits are   : 7
    escape is      : C-a
    local echo is  : no
    noinit is      : no
    noreset is     : no
    nolock is      : no
    send_cmd is    : sz -vv
    receive_cmd is : rz -vv
    imap is        : 
    omap is        : 
    emap is        : crcrlf,delbs,
    
    Terminal ready
    &4Nc
        HCHC 002698197 0
    HCHP 010687195 8
    PTEC HP..  
    IINST 012 Z
    IMAX 038 J
    PAPP 02840 /
    HHPHC A ,
    MOTDETAT 000000 
    Thanks for using picocom
    
    PiTInfo

  • reading garbage from serial port PiTInfo
    J JohnDoe

    playing with code pages yields nothing - still only garbage - don't know where to look anymore

    PiTInfo

  • reading garbage from serial port PiTInfo
    J JohnDoe

    @Charles Sorry for the delay. I had a faulty SD card and couldn't figure out why making my bootable Wheezy SD card kept failing. Booted to Wheezy, adjusted the /boot/cmdline.txt file, /etc/inittab, and rebooted, but the cat command still yields the same results.

    Here's the output of picocom:

    picocom -b 1200 -d 7 -p e -f n /dev/ttyAMA0
    
     $8
     c 0[
     `08
        er 
           `rjE@8@a
                   @S@ @c
    "       @0|          P*
               $Rj
                  ,
                   &GT u @ cPT@3L623@1|
                                       gP0FPP8Ic 
                                                 d*.5 H |
    j                                                    $8j@6n$
      8
    1F 0[
      (p08
          er 
             drjE@8@a
                     @S@ @c
    "       @0jq           P*
    
     c!
       &GT q @ cPT@3L623@1|
                           G]JF8Ic!
                                   d*.5 H |
    j                                      $8j@6L$'
     $8
       0[   @ c
               (t08
                   er 
                      @rjE@8P@a
                               @` ec
    "       @0ja                     P*
    

    Now I'm testing if it's a locale/codepage issue. What local are you using in your configurations?

    PiTInfo

  • reading garbage from serial port PiTInfo
    J JohnDoe

    @Charles New PiTInfo arrived, thanks! Installed and still the same thing happening. I also changed the cable from the PiTInfo to the meter. Output is still:

    pi@raspberry ~ $ cat /dev/ttyAMA0 
    
    GT` @ cPT@3Yn623@1|
    gP0FP8Ic 
    @*.5 L |
    $8j@6N
    $8
    0H[	
            1F
    `08
    er 
    `rjE@1PVa
    @` ec
    D0Ba
    $@ 
    

    Next things to try: a different Raspberry, perhaps an A or B+ (I've been using a Raspberry Pi 1 Model A+) then also revert back to Wheezy OS.

    PiTInfo

  • reading garbage from serial port PiTInfo
    J JohnDoe

    Wonderful. I really am impressed with how much effort you help people trying to follow your foot steps.

    Some answers:

    • I'll check the cable length; I don't like the cable I'm using now or how much slack there is; but I didn't think this might be an issue;
    • there are no other devices - the PiTInfo connected is the only thing on the GPIO, and is directly connected to the EDF meter. There is nothing else;
    • I bought the PiTInfo fully assembled;

    Note that to check I just ordered a fully assembled PiTInfo v1.2 via Tindie from you - so we will see if this is a cable issue, a PiTInfo/hardware issue, or something else.

    Updates to follow.

    PiTInfo

  • Enable serial port on Raspberry Pi
    J JohnDoe

    @Charles Note that the latest version of Raspbian is based on Debian Jessie, which now uses Systemd, no longer SysVinit. So /etc/inittab doesn't exist anymore.

    Blog articles comments port raspberry enable arduipi

  • reading garbage from serial port PiTInfo
    J JohnDoe

    I'm trying to get a PiTInfo v1.0 to work on a freshly installed Jessie on my Raspberry PI, but for reasons that escape me, I can only read garbage.

    As far as I can tell, the console on serial port is disabled:

    cat /boot/cmdline.txt 
    dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
    

    I've got a link to ttyS0

    sudo ln -s /dev/ttyAMA0 /dev/ttyS0
    

    I've set the serial port:

    stty 1200 cs7 evenp cstopb -igncr -inlcr -brkint -icrnl -opost -isig -icanon -iexten -F /dev/ttyAMA0
    

    and yet what I read is not what I'm expecting:

    cat /dev/ttyAMA0
    BPT@3L623@1|
    G]JF8Ic 
    @*.5 |
    8j@6M&S
    8
    0LS c
    .@*|
    @rjE@1Va
    @` @c
    @0Ka
    ^C
    

    Any pointers or help would be greatly appreciated.

    PiTInfo
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Blog
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups