Menu

Problems with LCDd 0.5.5 and BWCT USB Display (hd44780)

Help
mrjerk
2013-06-01
2013-06-02
  • mrjerk

    mrjerk - 2013-06-01

    Hi,
    When trying to use the BWCT USB device (http://www.bwct.de/lcd.html), LCDd won't start correctly, even when running it as root:

    Log says:

    Jun  1 23:12:29 raspbmc LCDd: LCDd version 0.5.5 starting
    Jun  1 23:12:29 raspbmc LCDd: Using Configuration File: /etc/LCDd.conf
    Jun  1 23:12:29 raspbmc LCDd: Listening for queries on 127.0.0.1:13666
    Jun  1 23:12:29 raspbmc LCDd: hd_init_bwct_usb: interface may be claimed by kernel driver, attempting to detach it
    Jun  1 23:12:29 raspbmc LCDd: hd_init_bwct_usb: unable to re-claim interface: No route to host
    Jun  1 23:12:29 raspbmc LCDd: Driver [hd44780] init failed, return code -1
    Jun  1 23:12:29 raspbmc LCDd: Could not load driver hd44780
    Jun  1 23:12:29 raspbmc LCDd: There is no output driver
    Jun  1 23:12:29 raspbmc LCDd: Critical error while initializing, abort.
    

    The section in LCDd.conf:

    ## Hitachi HD44780 driver ##
    [hd44780]
    
    # Select what type of connection. See documentation for types.
    ConnectionType=bwctusb
    
    # Port where the LPT is. Usual value are: 0x278, 0x378 and 0x3BC
    #Port=0x378
    
    # Device of the serial interface [default: /dev/lcd]
    #Device=/dev/ttyS0
    
    # Bitrate of the serial port (0 for interface default)
    Speed=0
    
    # If you have a keypad connected.
    # You may also need to configure the keypad layout further on in this file.
    Keypad=no
    
    # Set the initial contrast (bwctusb and lcd2usb) [default: 500; legal: 0 - 1000]
    Contrast=0
    
    # Set brightness of the backlight (lcd2usb only) [default: 0; legal: 0 - 1000]
    #Brightness=1000
    #OffBrightness=0
    
    # If you have a switchable backlight.
    Backlight=no
    
    # If you have the additional output port ("bargraph") and you want to
    # be able to control it with the lcdproc OUTPUT command
    OutputPort=no
    
    # Specifies if the last line is pixel addressable (yes) or it controls an
    # underline effect (no). [default: yes; legal: yes, no]
    #Lastline=yes
    
    # Specifies the size of the LCD.
    # In case of multiple combined displays, this should be the total size.
    Size=16x2
    
    # For multiple combined displays: how many lines does each display have.
    # Vspan=2,2 means both displays have 2 lines.
    #vspan=2,2
    
    # If you have an HD66712, a KS0073 or another 'almost HD44780-compatible',
    # set this flag to get into extended mode (4-line linear).
    ExtendedMode=yes
    
    # In extended mode, on some controllers like the ST7036 (in 3 line mode)
    # the next line in DDRAM won't start 0x20 higher. [default: 0x20]
    #LineAddress=0x10
    
    # Character map to to map ISO-8859-1 to the LCD's character set
    # [default: hd44780_default; legal: hd44780_default, hd44780_euro, ea_ks0073,
    # sed1278f_0b, hd44780_koi8_r, hd44780_cp1251, hd44780_8859_5, upd16314 ]
    # (hd44780_koi8_r, hd44780_cp1251, hd44780_8859_5 and upd16314 are possible if
    # compiled with additional charmaps)
    CharMap=hd44780_default
    
    # If your display is slow and cannot keep up with the flow of data from
    # LCDd, garbage can appear on the LCDd. Set this delay factor to 2 or 4
    # to increase the delays. Default: 1.
    #DelayMult=2
    
    # Some displays (e.g. vdr-wakeup) need a message from the driver to that it
    # is still alive. When set to a value bigger then null the character in the
    # upper left corner is updated every <KeepAliveDisplay> seconds. Default: 0.
    KeepAliveDisplay=2
    
    # If you experience occasional garbage on your display you can use this
    # option as workaround. If set to a value bigger than null it forces a
    # full screen refresh <RefreshDiplay> seconds. Default: 0.
    #RefreshDisplay=5
    
    # You can reduce the inserted delays by setting this to false.
    # On fast PCs it is possible your LCD does not respond correctly.
    # Default: true.
    DelayBus=false
    
    # If you have a keypad you can assign keystrings to the keys.
    # See documentation for used terms and how to wire it.
    # For example to give directly connected key 4 the string "Enter", use:
    #   KeyDirect_4=Enter
    # For matrix keys use the X and Y coordinates of the key:
    #   KeyMatrix_1_3=Enter
    KeyMatrix_4_1=Enter
    KeyMatrix_4_2=Up
    KeyMatrix_4_3=Down
    KeyMatrix_4_4=Escape
    SerialNumber=1297257800
    

    Any ideas? A bug in Fedora 16 (https://bugzilla.redhat.com/show_bug.cgi?id=508047) looks like the same problem, but it was closed without fixing.

    Thank you for your help,

    Best regards,
    Joerg

     
  • mrjerk

    mrjerk - 2013-06-02

    For the record:
    Found out that "usb_claim_interface" libusb call in the driver (server/drivers/hd44780-bwct-usb.c) always fails with error code -2, even if the display can be used normally - I managed to get it work by simply ignoring that error (remvoing the error checks in hd44780-bwct-usb.c and recompile lcdproc), but this certainly is very dirty :).

    I submitted a bug to deal with this issue (https://sourceforge.net/p/lcdproc/bugs/44/), maybe someone has an idea to solve it properly.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.