Author

Topic: My rpi can’t connect to bitcointalk? (Read 247 times)

member
Activity: 193
Merit: 56
November 10, 2018, 07:35:00 AM
#8

I keep getting errors when going to sites like bitcointalk to say that my clock is set to the wrong time so I can’t access the site. I clearly am connected to the internet and configure my raspberry pi to the time zone (it doesn’t allow you to key in a specific date any more). It thinks we’re on Tuesday 9th October (not november)...
You won't be able to connect to any https site if the clock is off by that much. You need to find a way to set it to the correct date. Have you tried "date" or "ntpdate" in the command line?
I would like to add that in some cases auto synchronization is impossible, (if the difference between the actual time is more than 12 hours). It is necessary to manually reduce the gap.
legendary
Activity: 2730
Merit: 7065
November 10, 2018, 03:04:26 AM
#7
You are welcome jackg

You can try this for the npc server
https://www.pool.ntp.org/zone/uk


Here is another suggestion I managed to find.
Source: https://raspberrypi.stackexchange.com/questions/4370/where-does-the-raspberry-pi-get-the-time-from

Quote
Raspbian gets the time from an NTP Server (a "time server").

Unplug your Raspberry Pi completely, pull out the network cable and start the Raspberry Pi up again. You will see that the date and time are incorrect.

If you want/need the date and time to not be reset without being plugged into the internet, you'll need a Real Time Clock (RTC) - for example, something like this - which will keep the time current, by using a battery to run a clock. This is, also, how your computer keeps the time when it is not being powered.

UPDATE Just a side note that the above RTC clock is not the only way to keep the time accurate between power losses. You could also use a GPS module and hook that up to the GPIO pins.

Accuracy It's pretty accurate, although if your clock's time is off by quite a bit. It may take up to 3 hours to correct itself, as changes from the server are applied gradually to your local clock. Network stability has the biggest impact on the accuracy, as a unpredictable network (something more wireless, like 3G) will make it very hard to be accurate. To put it simply: The accuracy is pretty good, the time difference between your computer and the actual time (from the NTP Server) is normally less than 100ms.


Real Time Clocks (RTC)
http://www.hobbytronics.co.uk/raspberry-pi-real-time-clock
http://www.cjemicros.co.uk/micros/individual/newprodpages/prodinfo.php?prodcode=4D-RaspberryPi-RealTimeClock-RTC
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
November 09, 2018, 07:21:47 PM
#6
Aha, thanks pmalek!

Once I’ve installed bitcoin core I will give the python code a try. Is there an npc server I could use instead of my laptop? I’m in the uk with a time zone of gmt+1?
legendary
Activity: 2730
Merit: 7065
November 09, 2018, 06:35:19 PM
#5
Maybe some of these suggestions might do the trick.

source: https://stackoverflow.com/questions/25374570/how-to-update-date-and-time-of-raspberry-pi-with-out-internet

Quote
Remember that Raspberry Pi does not have real time clock. So even you are connected to internet have to set the time every time you power on or restart.

This is how it works:

Type sudo raspi-config in the Raspberry Pi command line
Internationalization options
Change Time Zone
Select geographical area
Select city or region
Reboot your pi
Next thing you can set time using this command

sudo date -s "Mon Aug  12 20:14:11 UTC 2014"
More about data and time

man date
When Pi is connected to computer should have to manually set data and time


What I did was,
1. I install meinberg ntp software application http://www.satsignal.eu/ntp/setup.html on windows 7 pc. (softros ntp server is also possible.)
2. change raspberry pi ntp.conf file (for auto update date and time)

Code:
server xxx.xxx.xxx.xxx iburst
server 1.debian.pool.ntp.org iburst
server 2.debian.pool.ntp.org iburst
server 3.debian.pool.ntp.org iburst
3. If you want to make sure that date and time update at startup run this python script in rpi,

Code:
import os

try:
    client = ntplib.NTPClient()
    response = client.request('xxx.xxx.xxx.xxx', version=4)
    print "===================================="
    print "Offset : "+str(response.offset)
    print "Version : "+str(response.version)
    print "Date Time : "+str(ctime(response.tx_time))
    print "Leap : "+str(ntplib.leap_to_text(response.leap))
    print "Root Delay : "+str(response.root_delay)
    print "Ref Id : "+str(ntplib.ref_id_to_text(response.ref_id))
    os.system("sudo date -s '"+str(ctime(response.tx_time))+"'")
    print "===================================="
except:
    os.system("sudo date")
    print "NTP Server Down Date Time NOT Set At The Startup"
    pass

Many more suggestions are available on the pi forum
https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=84723
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
November 09, 2018, 05:19:32 PM
#4
Is there any setting you can use to let it connect to an NTP server to check and set the date&time?
I'm not 100% sure, but as I remember, it should automatically set the correct time. Is it connected to the internet while it boots up?


I assume so. If that’s what it’s configured to do normally then yes.




I’ll try those commands also. I got onto github with https just fine...
hero member
Activity: 1442
Merit: 629
Vires in Numeris
November 09, 2018, 05:17:38 PM
#3
Is there any setting you can use to let it connect to an NTP server to check and set the date&time?
I'm not 100% sure, but as I remember, it should automatically set the correct time. Is it connected to the internet while it boots up?
legendary
Activity: 3654
Merit: 8909
https://bpip.org
November 09, 2018, 05:03:04 PM
#2
I keep getting errors when going to sites like bitcointalk to say that my clock is set to the wrong time so I can’t access the site. I clearly am connected to the internet and configure my raspberry pi to the time zone (it doesn’t allow you to key in a specific date any more). It thinks we’re on Tuesday 9th October (not november)...

You won't be able to connect to any https site if the clock is off by that much. You need to find a way to set it to the correct date. Have you tried "date" or "ntpdate" in the command line?
copper member
Activity: 2856
Merit: 3071
https://bit.ly/387FXHi lightning theory
November 09, 2018, 04:40:37 PM
#1
I keep getting errors when going to sites like bitcointalk to say that my clock is set to the wrong time so I can’t access the site. I clearly am connected to the internet and configure my raspberry pi to the time zone (it doesn’t allow you to key in a specific date any more). It thinks we’re on Tuesday 9th October (not november)...
Jump to: