WHAT I DID TO INSTALL ghpSDR3-Alex on my new ODROID-U2 card the 04/06/2013 - v4.3 on also my ODROID-X card by Pascal F6EHP it is my fifth complete installation I spent a few days to solve a few issues with a great help from Alex and Sid I tried to follow the wiki, but some points had to be found elsewhere and are marked with *** Odroid-U2 can be used as a server to run ghpSDR software with any hardware, but as a client I don't recommand it. !!! WARNING : You cannot use QtRadio and DSPserver at the same time on this setup. The U2 use as local audio output the hdmi channel, and this one is not connected here, so the audio will take hw:1 ( usb sound card), the same channel used for I/Q job by the dspserver... ODROID-U2 doesn't need any fan for this use. The procedure hereunder has worked 3 times. And it will probably work also with -X & -X2, with another initial image as the kernel of a -U2 is not compatible with the settings of -X2 I tried to copy all what I did ( mainly to give a help to my old memory), and hope nothing has been forgotten AS USUAL NO WARRANTY ___________________________________ IMAGE FOR U2 downloaded from Linaro-12.04_FullyLoaded-U2-HDMI.20130515.img.xz ( from this post http://forum.odroid.com/viewtopic.php?f=8&t=1102) Linaro IMAGE for -X may be found here http://forum.odroid.com/viewtopic.php?f=22&t=28 ( tested ok ) from the 28th of January Linaro IMAGE for -X2 may be found here http://forum.odroid.com/viewtopic.php?f=15&t=27 ( not tested) from the 25th of January copied on the (micro) SD-Card from a Linux UC with a usb socket. ___________________________________TO FLASH THE IMAGE on the SD-CARD Check your card: ~# fdisk -l Disk /dev/sda: 250.1 GB, 250059350016 bytes 255 têtes, 63 secteurs/piste, 30401 cylindres, total 488397168 secteurs Unités = secteurs de 1 * 512 = 512 octets Taille de secteur (logique / physique) : 512 octets / 512 octets taille d'E/S (minimale / optimale) : 512 octets / 512 octets Identifiant de disque : 0x0002e461 Périphérique Amorce Début Fin Blocs Id Système /dev/sda1 * 2048 486320127 243159040 83 Linux /dev/sda2 486322174 488396799 1037313 5 Étendue /dev/sda5 486322176 488396799 1037312 82 partition d'échange Linux / Solaris Disk /dev/sdb: 32.5 GB, 32462864384 bytes 128 têtes, 32 secteurs/piste, 15479 cylindres, total 63404032 secteurs Unités = secteurs de 1 * 512 = 512 octets Taille de secteur (logique / physique) : 512 octets / 512 octets taille d'E/S (minimale / optimale) : 512 octets / 512 octets Identifiant de disque : 0x0004f23a Upload: 1. Download the selected image (Android/Ubuntu/...). 2. Unpack it. (If its a .xz extension you can use xz -d image.img.xz on cmd line). 3. A good step is always to clear your destination media first! sudo dd if=/dev/zero of=/dev/sdb bs=4M 4. Flash your image: sudo dd if=xubuntu-13.04-desktop-armhf_odroidu2_20130503.img of=/dev/sdb bs=4M 5. Always type sync before removing the media to make sure that all data is written. Adjust the size of the card with gparted if necessary ~$ sudo gparted ___________________________________START the ODROID with the new uploaded Card dhcp and ssh server already started, ID= linaro PSW = linaro $ sudo apt-get install x11vnc $ x11vnc -storepasswd "adm" ~/.vnc_passwd # to setup vnc password if used $ x11vnc -many -rfbauth ~/.vnc_passwd > from WIKI QtRadio Installation page = http://napan.ca/ghpsdr3/index.php/QtRadio_Installation sudo apt-get install make gcc g++ (already done) sudo apt-get install autoconf automake autotools-dev libtool git subversion sudo apt-get install jackd2 libjack-jackd2-dev portaudio19-dev > answer "yes" to the question about real time... sudo apt-get install qjackctl sudo apt-get install make gcc g++ autoconf automake autotools-dev libtool git subversion (already done) sudo apt-get install libusb-0.1-4 libusb-dev libfftw3-dev libpulse-dev libsamplerate0-dev sudo apt-get install libusb-1.0-0-dev libconfig8-dev xdg-utils libortp-dev sudo apt-get install libevent-dev sudo apt-get install mesa-utils (already ok) sudo apt-get install mesa-common-dev sudo apt-get install libgl1-mesa-dev sudo apt-get install x11proto-xext-dev (already ok) sudo apt-get install libxrender-dev (already ok) > install codec: svn co https://freetel.svn.sourceforge.net/svnroot/freetel/codec2-dev cd codec2-dev autoreconf -i ./configure make sudo make install sudo ldconfig cd > Qt5 for ODROID ( special page in the wiki): sudo apt-get install mesa-utils mesa-common-dev libgl1-mesa-dev x11proto-xext-dev libxrender-dev (already ok) ***(Append to ~/.bashrc the following lines:.......file not found, so...nothing done ! export CPPFLAGS='-O2 -fPIC' export CXXFLAGS='-O2 -fPIC' export CFLAGS='-O2 -fPIC') ***(git clone git://gitorious.org/qt/qt5.git qt5) was not working in my case so I switched on this post from Sid : (odroid@odroid:~$ git clone git://gitorious.org/qt/qt5.git qt5 Cloning into 'qt5'... fatal: unable to connect to gitorious.org: gitorious.org[0: 87.238.52.168]: errno=Connection timed out gitorious.org[1: 2a02:c0:1014::1]: errno=Network is unreachable) > SEE https://groups.google.com/forum/#!topic/sdr-widget/xMo3-VREzDE%5B1-25-false%5D > Andrea has built a Qt5 deb package for ODROID available at https://www.box.com/s/abkzj93ac4xpou8x8tk5 and it installs in /usr/local/Qt-5.0.0 ( you need to extract the file somewhere and to copy the Qt-5.0.0 repertory found inside qt5_201..._armhf/usr/local into /usr/local) > install from the GUI window > to work root on a GUI make "Alt+F2" then enter : gksudo explorer_name_of_your_choice ( here : gksudo nautilus ) source set_Qt-5.0.0_path.src will set the correct Qt PATH export PATH=/usr/local/Qt-5.0.0/bin:$PATH ( see at end of file for more info about PATH ) (note : this instruction could be to repeat if you close the windows before using qmake) > Install the missing ssl lib : sudo apt-get install libevent-openssl-2.0-5 (already ok) sudo apt-get install libssl-dev > get the SSL certificate: do it from the repertory you will run the servers... openssl genrsa -out pkey 2048 openssl req -new -key pkey -out cert.req openssl x509 -req -days 365 -in cert.req -signkey pkey -out cert > back to Compiling QtRadio in QtRadio Installation page : cd git clone https://github.com/alexlee188/ghpsdr3-alex.git cd ghpsdr3-alex git checkout master sh ./cleanup.shcd ghp autoreconf -i sh ./alex-conf.sh > you will be required to install SSL lib if not already done as described in ***SSL, and to execute the 3 setting lines to get the SSL keys before starting the servers. make sudo make install ***SSL : SSL for the dspserver is now in ALL recent branches, including master. This allows any server to respond to BOTH non-ssl and SSL connections. The master branch's client QtRadio is non-ssl. The SSL branch QtRadio is SSL. sudo apt-get install libevent-openssl libssl-dev or Go on this site and download, then execute : http://pkgs.org/ubuntu-13.04/ubuntu-main-amd64/libevent-openssl-2.0-5_2.0.19-stable-3_amd64.deb.html or install from synaptic (best solution as it will tell you if a version is already installed) So just run those 3 SSL commands to generate the key certificates. You just have to do it once in the directory you run your dspserver in and then you can forget about it for a year (the cert expires in a year by default I think). in /odroid/ ( In the directory you will type dspserver or dsploop to run it ) if not done before : openssl genrsa -out pkey 2048 openssl req -new -key pkey -out cert.req openssl x509 -req -days 365 -in cert.req -signkey pkey -out cert > QtRadio not easy to start... ***added 127.0.0.1 linaro in hosts and 127.0.0.1 localhost odroid@odroid:/etc$ gksudo gedit hosts now working... ___________end of installation : no error ! just a few hours instead of 3 weeks for the first install made 6 months ago !!! _________________________dspserver.conf If using as a server, dspserver.conf must will created at first launch of dspserver and you must edit it and fill up with your own data. Don't forget to put a ; at end of each line ! ____________CONNECT YOUR HARDWARE ( here a softrock and a E-MU202 USB sound card) > check the sound card : $ cat /proc/asound/cards 0 [Ooroidmax98090 ]: Ooroid-max98090 - Ooroid-max98090 Ooroid-max98090 1 [USB ]: USB-Audio - E-MU 0202 | USB E-MU Systems, Inc. E-MU 0202 | USB at usb-s5p-ehci-3.1.4, high speed or odroid@odroid:~$ aplay -l **** List of PLAYBACK Hardware Devices **** card 0: Ooroidmax98090 [Ooroid-max98090], device 0: Playback max98090-aif1-0 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 0: Ooroidmax98090 [Ooroid-max98090], device 1: Capture max98090-aif1-1 [] Subdevices: 1/1 Subdevice #0: subdevice #0 card 1: USB [E-MU 0202 | USB], device 0: USB Audio [USB Audio] Subdevices: 1/1 Subdevice #0: subdevice #0 > Qjackctl is installed but not working on my ODROID-U2... > Thanks to Sid who gave me the solution to this issue with a shell to start softrock and jackd servers: _________________________shell to copy inside do_server.sh file, put it in your /home/odroid repertory, and allows it to run as executable file. ( I had to add "sudo") #!/bin/bash # define name used in the RMI registry export SDR_DEFRATE=96000 export JACK_BUFFER=1024 export LD_LIBRARY_PATH=/usr/local/lib #/usr/bin/jackd -s -T -dalsa -Chw:1 -Phw:1 -r$SDR_DEFRATE -p${JACK_BUFFER} -n3& jackd -s -T -dalsa -Chw:1 -Phw:1 -r$SDR_DEFRATE -p${JACK_BUFFER} -n3& sleep 1 sudo softrock --jack --si570 --iq --samplerate $SDR_DEFRATE > After first uses of this shell, you may get an error, and it may be neccessary to run only a simple line, if jackd has memorized the setup parameters: sudo softrock --jack --si570 --iq --samplerate 96000 > Make a second shell to start dspserver with a loop to restart automatically in case of crash : _________________________shell to copy inside dsploop1.sh file, put it in your /home/odroid repertory, and allows it to run as executable file. #!/bin/sh while [ 1 ] do dspserver --share --lo 9000 sleep 5 done START THE SERVERS : > open 2 tabs in a terminal and start one server in each, so you can see what happens: ./do_server.sh ./dsploop1.sh or only sudo softrock --jack --si570 --iq --samplerate 96000 ( it depends of jackd mood !!) ( with or without extension, as you want, but as you wrote them ) _________________________________Start a client QtRadio or glSDR on another UC....good luck ! or the QtRadio local client located in /home/odroid/ghpsdr3-alex/trunk/src/QtRadio/QtRadio _________________________________uploading another branch keeping the previous one running for tests. $ mkdir ~/KD0OSS $ cd ~/KD0OSS KD0OSS> git clone git://github.com/alexlee188/ghpsdr3-alex.git -b kd0oss KD0OSS> cd ghpsdr3-alex then: $ git checkout kd0oss $ git branch master * kd0oss $ sh ./cleanup.sh (you will probably need to set PATH for QT before the next line) $ autoreconf -i $ sh ./alex-conf.sh > you will be required to install SSL lib if not already done as described earlier in ***SSL, and to execute the 3 setting lines to get the SSL keys $ make If you don't want to install it right away, you can launch the servers in their directories, e.g /KD0OSS/ghpsdr3-alex/trunk/src/QtRadio/QtRadio Same in the softrock and dspserver directories. _________________________________________how to run a USB2SDR usb sound card from SV1EIA from Alex : post https://groups.google.com/forum/#!topic/sdr-widget/BPH6UEvPLvA "You build the usb2sdr branch and use the softrock server from that branch. The softrock server executable binary can be found most probably in the subdirectory called: path-of-your-ghpsdr3-alex/trunk/bin You rename that softrock server into something you remember, eg softrock-usb2sdr Then you can switch back to master or other branch to build the dspserver and QdRadio etc. When you start your server, use the aoftrock-usb2sdr instead of the usual softrock." ~/ghpsdr3-alex$ git checkout -b usb2sdr origin/usb2sdr _________________________________checking for QT5 PATH PATH given in the wiki is only for x86 64bits systems : For 32 bits systems PATH is this one in my x86 system : export PATH=/opt/Qt5.0.0/5.0.0/gcc/bin:/opt/Qt5.0.0/Tools/QtCreator/bin:$PATH check where Qt5 is installed and change set_Qt-5.0.0_path.src before doing ". set_Qt-5.0.0_path.src". Check /usr/local to see if there is a Qt-5.0.0 directory. That is where Adrea's package is installed. The setting would be "export PATH=/usr/local/Qt-5.0.0/bin:$PATH". e.g if it it was installed in /opt, "ls /opt" would show a qt directory, "ls /opt/qt5" would show other directories and you would have to search in that directory until you see "qmake" and the PATH to export would be something like /opt/qt5/....../bin, i.e the path has to point to wherever qmake is. _________________________________use of VNC To control the U2 from another computer I use ssh ( ssh-server is installed ) and x11vnc (to be installed) (initial ID/psw supplied in the image are linaro/linaro) to connect U2 as a client on another computer with an IP 192.x.x.x and "linaro" as user ID install ssvnc as ssh client > in a terminal odroid@odroid:~$ ssh linaro@192.x.x.x linaro@192.x.x.x's password: linaro@linaro-ubuntu-desktop:~$ x11vnc > in another tab: $ ssvnc (in the GUI) VNC host display : linaro@192.x.x.x VNC psw : yyy (psw given at setup of vnc) None or create an auto profile & load 192.x.x.x vnc auto profile with Automatic Find X Session ok ___________________________________jackd issues jackd and qjackctl can be installed without issue but in some cases jackd doesn't start or doesn't allow clients to connect or qjackctl doesn't run ... Odroid forum suggested to install the mali drivers, but I didn't test it , and as all what we need is included in the shell line given by Sid with the command lines included in do_server.sh if you didn't answer "yes" for RT when installing jackd, do: ~$ sudo dpkg-reconfigure -p high jackd2 ~$ sudo adduser linaro audio The user `linaro' is already a member of `audio'. reboot if jack doesn't stop properly, you have to kill it: >sudo netstat -antp or >ps -ejH or >ps -u linaro locate pid number of the running task "jackd" >sudo kill "pid" # _______________________set keyboard azerty (local settings doesn't work from a ssh/vnc terminal : setxkbmap fr _______________________________________________________________________________________________________ Pascal F6EHP www.f6ehp.fr pascal at f6ehp.fr - not an expert in linux, so no warranty... Enjoy 73