Чат

🕑 ↗
За да пишеш, трябва да си влязъл в профила си.

Raspberry Pi проблем с дата и час

Започната от gogotogo, 19-12-2014, 00:35

« назад - напред »

0 Потребители и 1 гост преглеждат тази тема.

gogotogo

Здравейте имам проблем с расбери пи:
около 2-3 месеца распберито беше прибрано в шкафа на топло.
преди 3 дни реших да го пусна отново в действие, преинсталирах най новия распбиян всичко тръгна дори и оскам, но забелязъх нещо странно.
При рестарт на пи-то когато се логвам с юсер и пас пише дата 09 09 2014 година, оскама реве 4е му е стара датата.
5 пъти преинсталвах и все тая не ъпва дата и 4ас , рових по сайтовете за инфо но никъде не намирам решение на проблема.
Накрая намерих 1 скрип който 4овека постнал го казва 4е проблема се решава, да датата стана верна , но часа е Current Time: 14.12.14 | 15:12:51,а в момента е 03:12.
ето и скрипта :
#!/bin/bash
# Visit http://www.timeapi.org to find the correct url for your timezone. Then replace the url in the first line


time=$(wget http://www.timeapi.org/utc/in+two+ho...%25I:%25M:%25S -q -O -)
echo "Time set to:"
sudo date -s "`echo $time`"

някой ако може да помага да решим проблема.
1.60см парабола-75E-30W;Telesystem 100cм-36E;Vivacom 80cм-45Е-30W;Bulsatcom 80см-39Е;Офсет 1.30см-45Е-30W;Debian-8.7.1;Zgemma H7s 4К;Zgemma H9Twin 4k;Octagon SF4008 4К

рйонков

rm /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Sofia /etc/localtime
;;650
HONDA - The Power Of Dreams![SIGPIC][/SIGPIC]KATHREIN - The Power Of HD!

gogotogo

Цитат на: рйонков;349227rm /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Sofia /etc/localtime
;;650

Колега резултата е 0
Last login: Fri Dec 19 19:30:28 2014
команда date връща това:
root@raspberrypi:~# date
Fri Dec 19 19:32:15 EET 2014
а сега е e 09:15 часа
1.60см парабола-75E-30W;Telesystem 100cм-36E;Vivacom 80cм-45Е-30W;Bulsatcom 80см-39Е;Офсет 1.30см-45Е-30W;Debian-8.7.1;Zgemma H7s 4К;Zgemma H9Twin 4k;Octagon SF4008 4К

рйонков

"да датата стана верна , но часа е Current Time: 14.12.14 | 15:12:51,а в момента е 03:12."
От предишния ти пост става ясно, че само таймзоната ти не е вярна, а сега излиза, че не е верен часовника?? Има ли интернет на малинката?
HONDA - The Power Of Dreams![SIGPIC][/SIGPIC]KATHREIN - The Power Of HD!

gogotogo

#4
Цитат на: рйонков;349233"да датата стана верна , но часа е Current Time: 14.12.14 | 15:12:51,а в момента е 03:12."
От предишния ти пост става ясно, че само таймзоната ти не е вярна, а сега излиза, че не е верен часовника?? Има ли интернет на малинката?

таим зоната е Europe/Sofia постоянно има нет даже и оскам има активен шерва линии.
Имам 2 ра сд карта довечера ще преинстална наново всичко и ще сложа твойте команди да видим дали ще се оправи , че какво ли не пробах в сегашната карта, че вече забравих какво съм правил.
1.60см парабола-75E-30W;Telesystem 100cм-36E;Vivacom 80cм-45Е-30W;Bulsatcom 80см-39Е;Офсет 1.30см-45Е-30W;Debian-8.7.1;Zgemma H7s 4К;Zgemma H9Twin 4k;Octagon SF4008 4К

рйонков

рестартира ли ntp?
/etc/init.d/ntp restart
после дай
ntpd -gq
да видим какво ще искара
и виж дали имаш в ntp.conf зададени сървъри
server 0.debian.pool.ntp.org iburst
...
HONDA - The Power Of Dreams![SIGPIC][/SIGPIC]KATHREIN - The Power Of HD!

gogotogo

Цитат на: рйонков;349237рестартира ли ntp?
/etc/init.d/ntp restart
после дай
ntpd -gq
да видим какво ще искара
и виж дали имаш в ntp.conf зададени сървъри
server 0.debian.pool.ntp.org iburst
...

това има в нтп.конф:
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help

driftfile /var/lib/ntp/ntp.drift


# Enable this if you want statistics to be logged.
#statsdir /var/log/ntpstats/

statistics loopstats peerstats clockstats
filegen loopstats file loopstats type day enable
filegen peerstats file peerstats type day enable
filegen clockstats file clockstats type day enable


# You do need to talk to an NTP server or two (or three).
#server ntp.your-provider.example

# pool.ntp.org maps to about 1000 low-stratum NTP servers.  Your server will
# pick a different set every time it starts up.  Please consider joining the
# pool: <http://www.pool.ntp.org/join.html>
server 0.debian.pool.ntp.org iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst


# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
# details.  The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
# might also be helpful.
#
# Note that "restrict" applies to both servers and clients, so a configuration
# that might be intended to block requests from certain clients could also end
# up blocking replies from your own upstream servers.

# By default, exchange time with everybody, but don't allow configuration.
restrict -4 default kod notrap nomodify nopeer noquery
restrict -6 default kod notrap nomodify nopeer noquery

# Local users may interrogate the ntp server more closely.
restrict 127.0.0.1
restrict ::1

# Clients from this (example!) subnet have unlimited access, but only if
# cryptographically authenticated.
#restrict 192.168.123.0 mask 255.255.255.0 notrust
леле след тези комади който си ми написал стана още по трагично.
pi@raspberrypi ~ $ date
Sat Dec 20 05:25:36 EET 2014
1.60см парабола-75E-30W;Telesystem 100cм-36E;Vivacom 80cм-45Е-30W;Bulsatcom 80см-39Е;Офсет 1.30см-45Е-30W;Debian-8.7.1;Zgemma H7s 4К;Zgemma H9Twin 4k;Octagon SF4008 4К

Онджичек

До сега да си го префлашнал. Търси в гугъл RPI + oscam. Има ръководство стъпка по стъпка как става във линукссъпорт
TOR90 - 1,9E,9Е,13E,16E,19E,36E,39E,45Е;GS120 rotor; Zgemma H9 twin;RPI;

рйонков

Нещо си омазал тотално.. виж в логовете какво дава.
HONDA - The Power Of Dreams![SIGPIC][/SIGPIC]KATHREIN - The Power Of HD!

gogotogo

Цитат на: Онджичек;349332До сега да си го префлашнал. Търси в гугъл RPI + oscam. Има ръководство стъпка по стъпка как става във линукссъпорт
Оскама си е на ред проблема е дата и 4ас
1.60см парабола-75E-30W;Telesystem 100cм-36E;Vivacom 80cм-45Е-30W;Bulsatcom 80см-39Е;Офсет 1.30см-45Е-30W;Debian-8.7.1;Zgemma H7s 4К;Zgemma H9Twin 4k;Octagon SF4008 4К

gogotogo

Цитат на: рйонков;349337Нещо си омазал тотално.. виж в логовете какво дава.

ще инстална на ново и ще пиша.
1.60см парабола-75E-30W;Telesystem 100cм-36E;Vivacom 80cм-45Е-30W;Bulsatcom 80см-39Е;Офсет 1.30см-45Е-30W;Debian-8.7.1;Zgemma H7s 4К;Zgemma H9Twin 4k;Octagon SF4008 4К

Онджичек

#11
Не съм казал, че имаш проблем с оскам. Опитах се да те насоча към едно упътване. Писал го е някой си @musogeek. Ето го, излиза първо, като напишеш това което дадох горе:

ЦитатThis guide assumes you have a Windows PC for downloading the image and transferring it to a correctly formatted SD card.
Items needed;
Raspberry Pi with power supply connected to the network.
SD card (suggested minimum 4GB) with Raspbian "wheezy" (can use other flavours or modifications but you might need to install more packages).
Either a SSH client connected to the network, or Input device direct to the Raspberry Pi connected to a display.

If you have not got an SD card preinstalled with Raspbian, then I would suggest the following.
SD card format tool.
Code:
https://www.sdcard.org/downloads/formatter_3/
Unpack and install.

Disk imaging tool
Code:
http://www.softpedia.com/get/CD-DVD-Tools/Data-CD-DVD-Burning/Win32-Disk-Imager.shtml
Unpack.

Insert SD card and format the card with SDformatter, ensuring that you turn format size adjustment on.

Download the raspbian "wheezy" image from;
Code:
http://www.raspberrypi.org/downloads
Scroll down about halfway for the Raspbian Wheezy image and select torrent or direct download.

Unpack image.

Run Win32DiskImager.exe - I get an error message but I ignore it and it works.
Ensure the letter underneath where it says 'Device' is the same as your SD card.
Click the blue folder icon at the top right of the Win32DiskImager.exe app - and browse for the raspbian wheezy image.
When you are happy that you have found the file and you have selected the right device, click 'Write', and 'Yes' to confirm.
Once you get the 'Write Successful" message then you can go to the next stage.

Insert the SD card in your Raspberry Pi, turn on and wait a couple of minutes.

If you are connecting remotely using SSH, then you need to find the IP address of the Raspberry Pi.
You are best doing this anyway because you need to fix the IP address, usually you can do this in your router, the method depends on your router.
You can also do this direct on the Raspberry Pi if you have an imput device and the Rpi is connected to a display.
If you are connected to a display then the raspi-config will auto run on first boot, you can set timezone, etc.
I would suggest changing the memory split if you are using this as a dedicated Oscam server and nothing else - so that only 16mb is alocated to VideoCore.

To do this from an SSH client, then log in as user 'pi' and password 'raspberry' - and then do;
Code:
sudo raspi-config
after you have changed the settings to how you want (I at this stage have only set timezone and memory split), then finish and reboot.

Once it reboots then log in as 'pi' and 'raspberry' again
Enable root password;
Code:
sudo passwd root
Then enter preferred password twice.
log out as current user.
Log in as 'root' using your chosen password.

Now we are ready to compile Oscam.

Thanks to the respective authors for guides on how to do this ('dui' for getting the info from another forum and 'pr2' for tweaking it) - but I want to put a clear one together for the benefit of all.
For the sake of this, we are going to compile Oscam with Smartreader and PCSC Support.

First, you need to get your packages;
Code:
apt-get update
apt-get -y install apt-utils dialog usbutils
apt-get -y install gcc g++ wget
apt-get -y install build-essential subversion libpcsclite1 libpcsclite-dev
apt-get -y install libssl-dev cmake make
apt-get -y install libusb-1.0-0-dev nano
apt-get install pcscd pcsc-tools

Then create the following symbolic link so Smartreader support is added during the compile;
Code:
ln -s /usr/lib/arm-linux-gnueabihf/libusb-1.0.a  /usr/local/lib/libusb-1.0.a
Get the Oscam sources;
Code:
cd /usr/src
svn co [url]http://www.streamboard.tv/svn/oscam/trunk[/url] oscam-svn

Compile Oscam (note the two dots after the 5th line are there because they need to be).
Code:
cd oscam-svn
mkdir build
chmod 755 build
cd build
cmake -DHAVE_LIBUSB=1 -DHAVE_PCSC=1 -DWEBIF=1 -DHAVE_LIBCRYPTO=1 -DWITH_SSL=1 ..
make

Make yourself a coffee - you have a bit of time and deserve one!

Now it is installed - we need to move it;
Code:
cd /usr/src/oscam-svn/build
cp oscam /var/local/
and move the list_smargo tool;
Code:
cd /usr/src/oscam-svn/build/utils
cp list_smargo /var/local/

They are both now in /var/local - now we need to change permissions;
Code:
cd /var/local
chmod 755 oscam
chmod 755 list_smargo

Now oscam needs to start at boot by adding it to rc.local, and you can edit with nano;
Code:
nano /etc/rc.local
arrow down to a line just above 'exit 0' and below 'fi', and add the following;
Code:
/var/local/oscam &
To save, exit with 'CTRL' and 'x' - select 'y' and 'enter'.
Oscam will now run at boot.

To get it to restart daily at 5.45 am and to free memory every hour, edit the crontab file;
Code:
nano /etc/crontab
add the following two new lines;
Code:
05 * * * * root echo 3 > /proc/sys/vm/drop_caches
45 05 * * * root /sbin/reboot

and to save, exit with 'CTRL' and 'x' - select 'y' and 'enter'.


I won't go on about log files here because Oscam runs without them, and can be added later if you need them. Your config files (oscam.conf, oscam.user and oscam.server) go in /usr/local/etc

If you want, you can now delete the sources, which are found in /usr/src - just delete the oscam.svn folder.

you need to forward the port to the internal IP address of your Raspberry pi - this should have been fixed in your router as I went over earlier on, alternatively edit the /etc/network/interfaces file. Take care in doing this if you haven't got an input device and display for your Raspberry Pi as if you set this wrong then you will have no means to connect to your device. See the following for more info on this

Code:
[url]http://wiki.debian.org/NetworkConfiguration[/url]
From this point, I prefer to use an scp client to edit and add my config files. As a start - you can create an oscam.conf file in /usr/local/etc and add;
Code:
[webif]
httpport                      = 8888
httprefresh                   = 5
httpallowed                   = 127.0.0.1,192.168.0.0-192.168.255.255

Save this.
Reboot your Raspberry Pi. You should now have Oscam running on reboot and you will be able to access the webinterface as well.
You can log on to webinterface locally on the Raspberry Pi if you use startx to run GUI and after running a web browser, use;
Code:
127.0.0.1:8888
or from a remote computer by using the local IP address of the Raspberry Pi and port 8888 again
From this you can do all the setting up of your server - rather than add files to /usr/local/etc you can also cut and paste the info from your configs in the files section of webinterface if you prefer

This works with 2 Omnikey readers, one in each USB port and with a Hub, as tested by myself. For further info about card configs etc, this info is all over the forum so the search bar is your next step!

Enjoy!
TOR90 - 1,9E,9Е,13E,16E,19E,36E,39E,45Е;GS120 rotor; Zgemma H9 twin;RPI;

gogotogo

Благодаря колега  ще пробвам и така.
1.60см парабола-75E-30W;Telesystem 100cм-36E;Vivacom 80cм-45Е-30W;Bulsatcom 80см-39Е;Офсет 1.30см-45Е-30W;Debian-8.7.1;Zgemma H7s 4К;Zgemma H9Twin 4k;Octagon SF4008 4К

gogotogo

#13
преинсталирах мотамо по туторияла който ми каза колегата Онжичек.
резултата е :
Last login: Tue Sep  9 11:15:32 2014 from 192.168.1.103
root@raspberrypi:~# date
Tue Sep  9 12:01:52 EEST 2014
накрая направих и стъпките на колегата рйонков
rm /etc/localtime
ln -s /usr/share/zoneinfo/Europe/Sofia /etc/localtime
/etc/init.d/ntp restart
ntpd -gq
и резултата е:
Last login: Tue Sep  9 11:14:20 2014
pi@raspberrypi ~ $ date
Tue Sep  9 12:13:18 EEST 2014
Ето и оскам какво казва:
Starttime:      09.09.2014 12:10:46
Version:        oscam-1.20-unstable_svn-r10090
10 пъти вече преинсталирах резултата е 1 и същи.:c040:
:s104:hammer:
1.60см парабола-75E-30W;Telesystem 100cм-36E;Vivacom 80cм-45Е-30W;Bulsatcom 80см-39Е;Офсет 1.30см-45Е-30W;Debian-8.7.1;Zgemma H7s 4К;Zgemma H9Twin 4k;Octagon SF4008 4К

Онджичек

А компютрите ти в къщи с каква дата и час са? Рутера?
TOR90 - 1,9E,9Е,13E,16E,19E,36E,39E,45Е;GS120 rotor; Zgemma H9 twin;RPI;

SatShop.bg
Ъплоуд център DishPointer Сателитни изстрелвания