WRTnode add support for RoboPeak Mini USB Display

From WRTnode Wiki Site
Jump to: navigation, search
This page contains changes which are not marked for translation.

Other languages:
English 100% • ‎中文(中国大陆)‎ 100%

RoboPeak Mini USB Display as an output device

一:Download RoboPeak Mini USB Display driver code

1:Click here to view the source code

Create a new directory robopeak in the directory drivers/video

Download driver source code and put it in the directory drivers/video/robopeak

But there will be some small problems.for example, the location of the header file incorrect or missing some header files, and so on.

2:here provide modified driver code

Download driver source code and put it in the directory drivers/video then decompressed.

$ tar -jxvf robopeak.tar.bz2

二:How to add robopeak driver to the kernel configuration

$(PATH) is the path where the driver

1: Edit the drivers/video/Kconfig and add source "drivers/video/robopeak/Kconfig"

$vi $(PATH)/driver/video/Kconfig
comment "Frame buffer hardware drivers"
    source "drivers/video/robopeak/Kconfig"
    depends on FB

2:在driver/video/Makefile添加 obj-$(CONFIG_FB_RPUSBDISP) += robopeak/

 vi $(PATH)/driver/video/Makefile
 obj-$(CONFIG_FB)               += fb.o
 obj-$(CONFIG_FB_RPUSBDISP)     += robopeak/

三:Configuration

̩ $make kernel_menuconfig

Device Drivers:
 USB Support:
   <*> Support for Host-side USB
 Graphics support:
   <*> Support for frame buffer devices:
   <*> Enable firmware EDID
   <*> Framebuffer foreign endianness support
   <*> Enable Video Mode Handling Helpers
   <*> Enable Tile Blitting Support
   <*> Robopeak USB Display  
   <*> Displaylink USB Framebuffer support
   [*]Bootup logo:
     <*> Standard 224-color Linux logo
 Character devices:
   <*> Virtual terminal
   <*> Enable character translations in console
   <*> Support for console on virtual terminal
   <*> Support for binding and unbinding console drivers
 Graphics support:    
   Console display driver support:
     <*> Framebuffer Console support
     <*> Map the console to the primary display device
     <*> Framebuffer Console Rotation
     <*> Select compiled-in fonts
     <*> VGA 8x16 font

四:compile

$ make V=s -j

五:Refresh firmware and do the following:

1:Once the driver recognizes the display, a framebuffer device will be created. (e.g. /dev/fb0)

#cat /proc/fb  
0

In the above example, /dev/fb0 is the related framebuffer device. To test whether the framebuffer device works, you may using the following command:

#cat /dev/urandom > /dev/fb0

You should see the display screen is filled with random color dots.

Show a picture on the screen.

Download picture.bmp and put it in the directory /tmp

#cat /tmp/picture.bmp > /dev/fb0

picture.bmp requirement is bmp format with a resolution of 320 * 240,16 bitmap.

Robopeak1.jpg

Clear the screen:

#dd if=/dev/zero of=/dev/fb0

Save the contents of the fb0

#dd if=/dev/fb0 of=fbfile

Write back in the screen

#dd if=fbfile of=/dev/fb0

Input string to display on screen

Let’s check if the virtual console of the frame buffer has been created:

# ls /sys/class/vtconsole/vtcon*
/sys/class/vtconsole/vtcon0:
bind       name       subsystem  uevent
/sys/class/vtconsole/vtcon1:
bind       name       subsystem  uevent

The console has been created. Let’s check that it belongs to the frame buffer:

# cat /sys/class/vtconsole/vtcon1/name

(M) frame buffer device

# cat /sys/class/vtconsole/vtcon1/bind
1

#echo hellowrtnode > /dev/vcs1

RoboPeak Mini USB Display as an input device

一:Therefore on the stage of configuration OpenWrt the following modules are to be selected:

$ make menuconfig
   Base system:
         <*> busybox:
   Linux System Utilities:
         <*> lsusb
   Kernel modules:
   USB Support:
         <*> kmod-usb-hid

二:compile

$make V=s -j

三:Refresh firmware and do the following:

A new device has to be created in the directory /dev:

#ls /dev/input/ -l
crw-r--r--    1 root     root       13,  64 Sep 17 18:44 event0
#cat /proc/bus/input/devices
I: Bus=0003 Vendor=0000 Product=0000 Version=0000
N: Name="RoboPeakUSBDisplayTS"
P: Phys=
S: Sysfs=/devices/virtual/input/input0
U: Uniq=
H: Handlers=event0
B: PROP=0
B: EV=b
B: KEY=400 0 0 0 0 0 0 0 0 0 0
B: ABS=1000003
#cat /dev/input/event0 |hexdump

Touch RoboPeak Mini USB Display, printed on the wrtnode

Robopeak2.png