📜 ⬆️ ⬇️

Odroid-W + W Docking Board LCD

Hello! Maybe my article will look a bit “noob”, but I personally could not find a similar HOW TO in the Russian-language Internet. It will be a question of primary deployment of an operating system on the Odroid-W single-board computer from Hardkernel to which two articles of descriptive character were given on Habré already. A special feature will be the use in conjunction with the “ W Docking Board with TFT LCD ” board itself, without which, km. the possibilities of this piece of iron are not fully disclosed.

My nemilina

What I would like to tell you:
1) Preparation and installation of the operating system;
2) Display graphics on an external display;
3) Display graphics on the display “W Docking Board”;
4) Connecting a webcam;
5) Wi-Fi dongle connection.

What I plan to tell the next time, if this article does not fly into a black hole:
6) Connecting a 4G modem with the subsequent distribution of the Internet via Wi-Fi.

On Odroid, we will install the remainder Debian . All preparatory work to perform on a PC with Windows 7 installed. Preparatory work in nix-based operating systems is made much easier and does not require additional software.
')

Part one


So, let's begin. To get started, you need to acquire a micro-sd card with a size> 4 Gb, as well as a card reader for it (+ adapter). Here the main rule - the more the better. Well, of course, the higher the class of the card, the faster everything will work. First you need to download the latest Raspbian distribution kit, as well as the SDFormatter , Win32DiskImager , SSH-client utilities (for example, Putty ).
First, insert the SD card into the card reader and launch the SDFormatter, select the drive letter of our card, the QUICK FORMAT option and click Format. It is carried out quickly enough.
Next, start Disk Imager, select the downloaded distribution image and write it to the card. It is not very fast.
Next, insert the memory card into the Odroid-W, connect the W Docking Board network cable to the microcomputer. Then, after waiting a little, you need to determine the ip-address of the board (I connected to my router, and I saw the corresponding DHCP address in the web interface of the router). Then you need to connect the SSH client (I use the proprietary SecureCRT) from simple and free to Putty. I will not dwell on setting up SSH there, in the first place, everything is simple, and secondly there are plenty of articles on the Internet. To connect, you must use the username pi and the password raspberry. Immediately I recommend to execute sudo su and passwd and set your password for the root user and later go out from under it (although there may be many opponents of this method who use sudo).

Part two


To connect an external display, you also need: a monitor / TV with an HDMI connector, an HDMI-microHDMI cable, or other options, such as DVI-microHDMI and other perversions, depending on the capabilities. After connecting the monitor, most likely nothing will be displayed on the screen, but this is solved quite simply, you need to change the / boot / config.txt file using the nano editor, or immediately put mc, it will still be useful in the future. It is necessary to uncomment the string hdmi_safe = 1
A small part of the setting, such as running X, can be learned from the third part. I did not pay much attention to displaying the picture on the monitor, since A portable solution was proposed, using the built-in screen.

Part three


I did not invent this text myself, but found it in the official English-language wiki. Therefore, I provide a link to the original, further translation and some comments. In fact, even this instruction was not so easy to find (at least for me).
The correct file is /etc/modprobe.d/raspi-blacklist.conf, you need to comment out:

#blacklist spi-bcm2708 

Add to the / etc / modules file

 fbtft_device name=adafruit22a verbose=0 rotate=90 

In fact, I used rotate = 270, it turned out to be more convenient for me.
In off-manual it is written how to make autologin, but I don’t really like this idea.
I give as it is, in the / etc / inittab file
Add a line:

 #1:2345:respawn:/sbin/getty --noclear 38400 tty1 1:2345:respawn:/bin/login -f pi tty1 </dev/tty1 >/dev/tty1 2>&1 

Where pi is the user name.
And autorun IKS. To be honest, given the size of the screen, I would not recommend using them, but I’ll give for those who want to make glamor Odroid-W
Add to /etc/rc.local

 su -l pi -c "env FRAMEBUFFER=/dev/fb1 startx &" 

where pi is the user name.
And t.zh. disable the option in /usr/share/X11/xorg.conf.d/99-fbturbo.conf

 # Option "fbdev" "/dev/fb0" 

Which displays the picture on the external screen (via HDMI)
And the final touch, in / boot / cmdline.txt we add at the end of the line:

 fbcon=map:10 

And after the reboot, you will see a friendly blinking GUY LXDE.

Part four


Warning! Hereinafter, links to additional equipment will be presented, but: a) are not advertising, b) do not contain referrals, c) is not recommended for purchase.
I used the simplest Chinese noname webcam , which was subjected to some mechanical modifications upon receipt. To work with it, it was necessary to install the following packages: libv4l and fswebcam for installing and defining features, and mjpg-streamer for streaming images from the camera.
The first 2 packages are in the repository, install them aptitude install libv4l-0 fswebcam
And we download mjpg-streamer from SF and unpack it into * your * convenient folder (for me, this is just / root).
When you connect a camera in lsusb, something related to the camera should appear (especially when using branded devices):

 pi:~# lsusb Bus 001 Device 007: ID 1871:0101 Aveo Technology Corp. 

And in dmesg:

 pi:~# dmesg [ 1182.284021] usb 1-1.4: new high-speed USB device number 8 using dwc_otg [ 1182.394987] usb 1-1.4: New USB device found, idVendor=1871, idProduct=0101 [ 1182.395067] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 1182.395087] usb 1-1.4: Product: USB2.0 Camera [ 1182.395135] usb 1-1.4: Manufacturer: AVEO Technology Corp. [ 1182.403956] uvcvideo: Found UVC 1.00 device USB2.0 Camera (1871:0101) [ 1182.408696] input: USB2.0 Camera as /devices/platform/bcm2708_usb/usb1/1-1/1-1.4/1-1.4:1.0/input/input4 

Next, run fswebcam:

 pi:~# fswebcam --verbose 

And we determine that (in this case, mine) the camera works in YUYV mode and supports 2 resolutions:

 Using palette YUYV Adjusting resolution from 384x288 to 352x288. 

Next, you need to prepare the startup script mjpg-streamer A large set of examples with the description is actually in ./mjpg-streamer/start.sh
In principle, you can not use this file, and run directly from the console. My version is:

 pi:~# ./mjpg_streamer -i "input_uvc.so -d /dev/video0 -r 384x288 -f 10 -y -q 100" -o "./output_http.so -w ./www" MJPG Streamer Version: svn rev: 3:172M i: Using V4L2 device.: /dev/video0 i: Desired Resolution: 384 x 288 i: Frames Per Second.: 10 i: Format............: YUV i: JPEG Quality......: 100 

Where is the device, resolution, number of frames per second, camera mode, quality jpeg and output file (embedded web server).
You can enter the browser at http: // [odroid.w.ip.address]: 8080 and watch the stream from your camera. Done!
The Odroid-W has a mipi-csi interface for connecting the matrix directly to the SoC, but working with these cameras remains behind the scenes (their cost is not very convenient).

Part five


I bought a Wi-Fi dongle on the well-known Chinese e-market for quite ridiculous money, the main thing is not to pierce, and not to buy a dong, which does not know how to support AP.

Oops! While writing this article, my handkerchief chuka strongly infuriated, and refused to be included. But in order to finish the job, I will simply provide links to 2 manuals, by which you can configure the Wi-Fi dongle on this board:

http://hizz.livejournal.com/3817.html
https://blog-agents.rhcloud.com/wifi-pi-point/

Part 9¾


Initially, I really wanted to tame my CBR KB 477W portable keyboard for this board, but this was not possible. This is caused by the clumsily Linux utility. In fact, I spent a lot of time to make this bundle work, my Chinese bt-dongle wound up with almost a half-kick, and even it came to authorizing the keyboard in the system, but it didn't go further. I freaked out and bought a A4Tech GK-85 wireless keyboard that works flawlessly (and at least why shouldn’t it work there?).

Unwritten part 6. In the near future I want to finish the work of a 4G modem in the system (I have already tested the performance in a large Debian, plus I played with the firmware of the whistle into a virtual network card ( Huawei E3272 )). After completion of the work should be a portable Internet access point for external devices with the ability to broadcast the signal from the camera.

As a conclusion

It is a pity that Hardkernel was forced to curtail the production of this microcomputer, because The project turned out to be quite interesting. In view of this, the number of manuals dedicated to this board will remain at an extremely low level, it makes me very sad and depressed. And not happy owners will have to tread their own path in the world of miniature computers. Good luck everyone!

PS


In distant plans (with the initial ones, up to an idea with a portable Internet point) to attach this bundle to my project of a radio-controlled car on the Arduino. Odroid should take on FPV and alternative control using a smartphone. True, this project is moving rather slowly, but I hope that it will be possible to finish it and publish it on this resource.
My bmw


UPD 11/17/14 Added a couple of pictures. No photographer from me. And from the iPhone no camera. If anyone shows interest in the project, then at the weekend I will try to make more sensible pictures in daylight and on the photo soap box.

Thanks to everyone who read.

Source: https://habr.com/ru/post/243407/


All Articles