Go to advanced search

by crosmax
Mon Aug 05, 2019 10:28 am
Forum: General discussion
Topic: Wrong date every booting
Replies: 10
Views: 583

Re: Wrong date every booting

That doesn't guarantee the battery is fine, but it does clear up the confusion. So your problem is that the Pi is not getting its time from the RTC until a few seconds after boot? Yes, after every boot, the first system log messages have wrong date, even my application that boot from systemd, his f...
by crosmax
Wed Jul 24, 2019 8:29 am
Forum: General discussion
Topic: Wrong date every booting
Replies: 10
Views: 583

Re: Wrong date every booting

How does that work? You turn the Pi off and remove 5v (pull the plug?) then wait a few minutes and type on the terminal of a turned off Pi? Or have I interpreted your statement incorrectly? Hehehe. Maybe obvious, maybe not... I turn the Pi ON and when the OS finished boot, I logged in and type sudo...
by crosmax
Wed Jul 24, 2019 8:08 am
Forum: General discussion
Topic: Wrong date every booting
Replies: 10
Views: 583

Re: Wrong date every booting

alphanumeric wrote:Is the battery in your RTC OK?
Yes, of course. If type

Code: Select all

sudo hwclock -r
after poweroff during a few minutes without 5V power connection, the hwclock date is correct. The problem is during first seconds when booting, because the OS don't get the date first of all.
by crosmax
Fri Jul 19, 2019 4:37 pm
Forum: General discussion
Topic: Wrong date every booting
Replies: 10
Views: 583

Re: Wrong date every booting

what's the systemd target for your RTC? If it's called hwclock-sync.service , put this line in the Unit section of your logrotate service file: After=hwclock-sync.service If you were using network time sync, waiting for time-sync.target will cause problems as that returns after time sync has starte...
by crosmax
Fri Jul 19, 2019 3:06 pm
Forum: General discussion
Topic: Wrong date every booting
Replies: 10
Views: 583

Wrong date every booting

Hi all! I need to get real date when boot because I run a custom logrotate service for my apps log. I've a RTC on my raspberry, but the correct date setting just happend after few seconds and the logrotate service think that today is another day and rotate files. On every booting I get Nov 3 18:16:4...
by crosmax
Mon Jul 08, 2019 7:12 am
Forum: Networking and servers
Topic: Modem dongle on a headless device
Replies: 2
Views: 425

Re: Modem dongle on a headless device

Hi.
Finally, I followed this guide and seems that works fine. For the record :D
https://gist.github.com/toke/52a10c6c59d0f1df2b4c
by crosmax
Thu Jun 20, 2019 5:59 pm
Forum: Networking and servers
Topic: Modem dongle on a headless device
Replies: 2
Views: 425

Modem dongle on a headless device

Hi everyone! Some years ago I configured some raspberrys with a 3g dongle modem (usb) to work in headless mode. Due to the instability of the 3g connection (or the modem itself) I ended up making a rather complex script to recover the connection in case of losing it. If the connection could not reco...
by crosmax
Tue Apr 09, 2019 1:25 pm
Forum: C/C++
Topic: How setting up a cross compiling in Debian PC for libnfc?
Replies: 0
Views: 249

How setting up a cross compiling in Debian PC for libnfc?

Hi, I've been doing raspberry applications for a while but I compiled them on raspberry itself. Now, I need to do a cross compile and I read a lot but I have found many different solutions. I've followed this article https://medium.com/@au42/the-useful-raspberrypi-cross-compile-guide-ea56054de187 an...
by crosmax
Thu Feb 14, 2019 10:43 pm
Forum: General programming discussion
Topic: Virtual machine for cross compiling
Replies: 5
Views: 962

Re: Virtual machine for cross compiling

Sorry, I just make changes to the userland code or kernel, and they work out of the box. For toehr development, not sure what you need to install to get appropraite libraries. I'd suggest Google for any arbitrary cross compiling tutorials, they shoudl all be relevent even if not talking about Pi in...
by crosmax
Thu Feb 14, 2019 10:22 am
Forum: General programming discussion
Topic: Virtual machine for cross compiling
Replies: 5
Views: 962

Re: Virtual machine for cross compiling

I use VirtualBox with an installation of Ubuntu in it. Do all my Pi dev work in that. Thanks, but I do that and install into ubuntu the raspberry tools from github. But I can't to compile my code because I use raspberry libraries like libnfc, libfreefare ans others. I'm trying with arm-linux-gnueab...
by crosmax
Thu Feb 14, 2019 9:00 am
Forum: General programming discussion
Topic: Virtual machine for cross compiling
Replies: 5
Views: 962

Virtual machine for cross compiling

Hi all! I always compiling on the raspberry pi, but now, I need create a virtual machine for setting up a cross compiling for rapsberry pi. I read a lot on internet and I've seen many alternatives (docker, vagrant, eclipse, qemu, etc...). I tried to try some of them, but none is fast and simple to s...
by crosmax
Fri Feb 08, 2019 10:35 am
Forum: Networking and servers
Topic: Run script after network is online
Replies: 6
Views: 722

Re: Run script after network is online

In that case running a script when your interface is up may not be the best solution, as there can be a lag between the interface is up, and internet is accessible. Getting an IP from a dhcp server takes time, filling up the ARP table takes time etc. Calling rsync from cron every 5 minutes may be a...
by crosmax
Wed Feb 06, 2019 9:40 am
Forum: Networking and servers
Topic: Run script after network is online
Replies: 6
Views: 722

Re: Run script after network is online

You have used both 'network and 'internet' in your post. The systemd config will wait for the network connection to come up and have an IP address - thats not the same as the internet being up. Can you please clarify which you need? Sorry if I've not been clear. I need internet connection to check ...
by crosmax
Tue Feb 05, 2019 11:30 pm
Forum: Networking and servers
Topic: Run script after network is online
Replies: 6
Views: 722

Run script after network is online

Hi. I need run a bash script when the connection network is online. The online connection can happen after 5 minutes, even more. I tried with systemd service like this [Unit] Description=APP Update After=network-online.target #After=networking.service Wants=network-online.target [Service] #Type=simp...
by crosmax
Wed Jan 16, 2019 12:18 pm
Forum: Raspbian
Topic: Set hostname from the /boot partition ?
Replies: 28
Views: 12119

Re: Set hostname from the /boot partition ?

What the service does is... Check if there is a file in the /boot partition called /boot/hostname (remember that the /boot will b emissing if looking at this from a Windows machine or partition mounted directly) If /boot/hostname exists, copy it over /etc/hostname Now ensure that /etc/hostname perm...
by crosmax
Wed Oct 03, 2018 11:37 am
Forum: Python
Topic: I can't run at boot a python (with kivy) application
Replies: 5
Views: 734

Re: I can't run at boot a python (with kivy) application

PipaOS has bash but must be a headless device and I need run the app automaticaly when system boot.
Is this possible with bash?
by crosmax
Wed Oct 03, 2018 11:16 am
Forum: Python
Topic: I can't run at boot a python (with kivy) application
Replies: 5
Views: 734

Re: I can't run at boot a python (with kivy) application

My systemd service file is: [Unit] Description=My Script spie_protocol After=multi-user.target [Service] Type=idle User=pi ExecStart=/usr/bin/python /home/pi/spie_protocol/main.py > /home/pi/spie_protocol.log 2>&1 [Install] WantedBy=multi-user.target But I've tested with some variants of them, like ...
by crosmax
Wed Oct 03, 2018 10:54 am
Forum: Python
Topic: I can't run at boot a python (with kivy) application
Replies: 5
Views: 734

I can't run at boot a python (with kivy) application

Hi. I got a kivy application that boot on startup. I used KivyPie OS on a pi 3 and i setting up with rc.local. All works fine. My problem comes when I use a pi 3B+. The KivyPie not boot because is incompatible. Then, I prepare a new sd card with PipaOS (nightly), I install Kivy and I run the applica...
by crosmax
Sun Aug 19, 2018 3:03 pm
Forum: Networking and servers
Topic: How I can do raspberry setup to showing IP camera from internet?
Replies: 5
Views: 480

Re: How I can do raspberry setup to showing IP camera from internet?

What is this mysterious IE plugin ? Silverlight ? I don't remember exactly, but only works with iexplorer, it does not even work with edge. Who manufactures the IP Camera ? Is a Dahua Dome camera. Belongs to my father and I'm trying to give him access from the internet. I will try to compile vlc, b...
by crosmax
Sun Aug 19, 2018 12:56 pm
Forum: Networking and servers
Topic: How I can do raspberry setup to showing IP camera from internet?
Replies: 5
Views: 480

Re: How I can do raspberry setup to showing IP camera from internet?

Ok. RealVNC I think is not for my in this case. The web browser to show the ip camera control panel is a few special and chrome, chromium, firefox, etc not work with them. Only iexplorer works if I install a specific plugin. For this reason I need a "raw" redirection like a iptables, reverse tunnel ...
by crosmax
Sun Aug 19, 2018 12:18 pm
Forum: Networking and servers
Topic: How I can do raspberry setup to showing IP camera from internet?
Replies: 5
Views: 480

Re: How I can do raspberry setup to showing IP camera from internet?

Hi. Now, I'm trying to do it with RealVNC. I was testing with iptables and ssh reverse tunnel but although the local port fordwaring works, the reverse tunnel didn't. sysctl net.ipv4.ip_forward=1 sudo iptables -t nat -A PREROUTING -p tcp --dport 1111 -j DNAT --to-destination 192.168.1.192:80 sudo ip...
by crosmax
Sun Aug 19, 2018 11:13 am
Forum: Networking and servers
Topic: How I can do raspberry setup to showing IP camera from internet?
Replies: 5
Views: 480

How I can do raspberry setup to showing IP camera from internet?

Hello everyone. I need to be able to access an IP camera that is on the same local network as a raspberry. I do not have access from the outside because it is a mobile data network that does not give me public IP or I can do NAT. I was thinking of creating a ssh reverse tunnel against a server on in...
by crosmax
Thu Aug 16, 2018 12:51 pm
Forum: Español
Topic: SSH tunel inverso?
Replies: 2
Views: 1030

SSH tunel inverso?

Hola a todos. Necesito poder acceder a una camara IP que está en la misma red local que una raspberry. No tengo acceso desde el exterior porque se trata de una red de datos moviles que no me dan IP publica ni puedo hacer NAT. Estaba pensando en crear un tunel ssh inverso contra un servidor en intern...
by crosmax
Tue Jul 03, 2018 12:20 pm
Forum: Advanced users
Topic: NFC reader SPI very slow
Replies: 5
Views: 332

Re: NFC reader SPI very slow

Do you know if the other reader might do PPS for the card and raise comm speed from 106kbs to 424kbs ? Yes, it does. But I've change the baud rate up to 847kbps onPN532. And no appreciable difference. Are we talking about the same thing, I'm not talking about bps between Pi and PN532 but bps betwee...
by crosmax
Tue Jul 03, 2018 11:55 am
Forum: Advanced users
Topic: NFC reader SPI very slow
Replies: 5
Views: 332

Re: NFC reader SPI very slow

For read all desfire it takes a 1 second , some times a little more. What does "read all" mean in this context ? It means read all the existing files on the card, 1KB aprox. Do you know if the other reader might do PPS for the card and raise comm speed from 106kbs to 424kbs ? Yes, it does. But I've...

Go to advanced search