Go to advanced search

by deepo
Thu Nov 25, 2021 10:14 pm
Forum: Networking and servers
Topic: NTP server using GPS
Replies: 3
Views: 208

Re: NTP server using GPS

Good one!
Nice to hear about your success.
by deepo
Thu Nov 25, 2021 9:18 am
Forum: Networking and servers
Topic: Sending commands over the internet
Replies: 8
Views: 258

Re: Sending commands over the internet

I'd suggest using sockets when your goal is to have an RC car. Sockets can provide a direct open connection where you can send command any time you like. You need to search for guides on how to use sockets from whatever programming language you are using. Sockets are a stream of data so you need to ...
by deepo
Tue Nov 23, 2021 10:38 pm
Forum: General programming discussion
Topic: Broadcast device name while advertising iBeacon - Raspberry Pi OS
Replies: 1
Views: 115

Re: Broadcast device name while advertising iBeacon - Raspberry Pi OS

If there was any space unused by iBeacon or AltBeacon in the advertisement frame, then it would be fine to add EIR_NAME_COMPLETE 0x09 or EIR_NAME_SHORT 0x08 to the broadcast, but both specifications use the complete payload. Another way could be to switch between advertisement messages, i.e. switchi...
by deepo
Mon Nov 22, 2021 8:00 pm
Forum: Troubleshooting
Topic: Why are my cron jobs not running?
Replies: 5
Views: 183

Re: Why are my cron jobs not running?

Create a dummy cronjob to figure out if it is the bluetooth or cron. */30 6-22 * * * /bin/date >>/home/pi/logdate.txt Check the file to see if cron added the date in logdate.txt I can do that, but... I can see from syslog, that the line is called (search for "/usr/local/bin/sbfspot.3/daydata&q...
by deepo
Mon Nov 22, 2021 6:51 pm
Forum: Troubleshooting
Topic: Why are my cron jobs not running?
Replies: 5
Views: 183

Re: Why are my cron jobs not running?

How and/or where are you installing those cronjobs? This system has been working for a few years now, but has recently been acting funny. So it's not a question whether I have installed something wrong. The two cronjobs are installed as the pi user: pi@sbfspot:~ $ crontab -l ## SBFspot */30 6-22 * ...
by deepo
Mon Nov 22, 2021 5:45 pm
Forum: Troubleshooting
Topic: Why are my cron jobs not running?
Replies: 5
Views: 183

Why are my cron jobs not running?

What's my RPi up to when I'm not home? :) I have a Raspberry Pi Zero W setup for delivering data from my PV panels + inverter to pvoutput.org using SBFSpot . Data is extracted via cronjobs and uploaded via a service named SBFspotUpload. I have two user=pi cronjobs: */30 6-22 * * * /usr/local/bin/sbf...
by deepo
Mon Nov 22, 2021 12:30 pm
Forum: Networking and servers
Topic: NTP server using GPS
Replies: 3
Views: 208

Re: NTP server using GPS

Maybe this video/guide can help you?
https://www.youtube.com/watch?v=sLSSg_-mwuE
by deepo
Sat Nov 20, 2021 8:40 pm
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1139

Re: C++: extension of a class (e.g., string class)

ok, then please show me composition! but the readStringUntil() must be able to be called like str.readStringUntil() i.e. "like" a method of a class, just like e.g. str.substr() or str.length() Something like this (compiles with g++): #include <string> class stringstuff { public: stringstu...
by deepo
Thu Nov 18, 2021 10:18 am
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1139

Re: C++: extension of a class (e.g., string class)

You are painting yourself further and further into a corner. Why not follow the advice of the good folks that have answered your questions, and stop inheriting from std::string. Instead create a class that holds a std::string internally, and does work on that internal std::string. It will be a lot e...
by deepo
Thu Nov 18, 2021 8:52 am
Forum: General discussion
Topic: Booting Rpi without overclock in 10 seconds
Replies: 4
Views: 324

Re: Booting Rpi without overclock in 10 seconds

Have a look at this article on how to see what takes time during boot: https://itsfoss.com/check-boot-time-linux/ yes I did everything which is mentioned in that article and i got the same commands from some other articles The idea is that you can see which tasks are taking (too much?) time. And th...
by deepo
Wed Nov 17, 2021 10:34 pm
Forum: Networking and servers
Topic: Pi4 - Restart WiFi without Reboot
Replies: 8
Views: 377

Re: Pi4 - Restart WiFi without Reboot

Have you tried to restart the wpa_supplicant.service and the dhcpcd.service?

Code: Select all

sudo systemctl restart wpa_supplicant.service
sudo systemctl restart dhcpcd.service
But maybe that's not enough?

There's also something here:
viewtopic.php?t=198274
by deepo
Wed Nov 17, 2021 10:31 pm
Forum: General programming discussion
Topic: Raspberry Pi for Retail Display
Replies: 4
Views: 198

Re: Raspberry Pi for Retail Display

Its for showing my costumer’s how it looks before buying in the store, I’ve tried a usb hub but power ain’t enough they need data to turn on, there is no display connected to the pi just the “show” keyboard and mouse. If the RPi is not connected to anything, then you could just leave it be and not ...
by deepo
Wed Nov 17, 2021 10:28 pm
Forum: C/C++
Topic: Thread Synchronization
Replies: 7
Views: 383

Re: Thread Synchronization

There is a queue producer/consumer example here:
https://riptutorial.com/pthreads/exampl ... er-example
Yes, it uses mutexes and condition signaling as you point out yourself.

I can't help you with shared mem synchronization.
by deepo
Wed Nov 17, 2021 10:17 pm
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1139

Re: C++: extension of a class (e.g., string class)

thank you, this now works with stringX t="", t1=""; and even when assigning sth like from string.cstring() ! edit: I also implemented a similar copy method for passing std::strings next issue: concat by + doesn't become inherited: stringX t="5678", t1="", t2=...
by deepo
Wed Nov 17, 2021 8:25 pm
Forum: General discussion
Topic: I need to hack a Pi4
Replies: 32
Views: 1420

Re: I need to hack a Pi4

The 169.254.x.x addresses are APIPA Automatic Private IP Addresses When DHCP requests fails an address in that range is selected automatically by your computer in order to have an IP address. It will try to obtain a valid IP address from the configured DHCP server at regular intervals. https://wiki....
by deepo
Wed Nov 17, 2021 1:31 pm
Forum: General discussion
Topic: Booting Rpi without overclock in 10 seconds
Replies: 4
Views: 324

Re: Booting Rpi without overclock in 10 seconds

Have a look at this article on how to see what takes time during boot:
https://itsfoss.com/check-boot-time-linux/
by deepo
Wed Nov 17, 2021 8:17 am
Forum: General programming discussion
Topic: Raspberry Pi for Retail Display
Replies: 4
Views: 198

Re: Raspberry Pi for Retail Display

I don't quite understand your setup... You want to have both mouse and keyboard powered to have the RGB working, but you don't want the input from either - correct? So what is the purpose of the Raspberry Pi? Does it have a screen attached? What does it display? Why not just have a powered USB hub a...
by deepo
Tue Nov 16, 2021 8:57 pm
Forum: Advanced users
Topic: Minimalist
Replies: 3
Views: 284

Re: Minimalist

I think you need to google "bare metal programming for Raspberry Pi".
by deepo
Tue Nov 16, 2021 8:38 pm
Forum: Networking and servers
Topic: Connect to MySQL database stored on the raspberry pi
Replies: 14
Views: 307

Re: Connect to MySQL database stored on the raspberry pi

If you are not sure how to protect your Raspberry Pi when it's exposed to the internet, or how to "poke a hole" in your home router, then you could simplify your project a little by using a hosted database. You can get those for free: https://www.hostingadvice.com/how-to/best-free-database...
by deepo
Tue Nov 16, 2021 8:14 pm
Forum: C/C++
Topic: C++: extension of a class (e.g., string class)
Replies: 36
Views: 1139

Re: C++: extension of a class (e.g., string class)

Have a look at this code where the std::string class is extended with a few functions: http://cplusplus.com/forum/general/47349/ Note all the calls to the functions in std::string to make things work. And note the post at the end: NEVER DERIVE FROM STD::STRING!!! Generally, it is a very bad idea to ...
by deepo
Tue Nov 16, 2021 7:55 pm
Forum: SDK
Topic: Example code for passing 32bit data to a queue
Replies: 4
Views: 267

Re: Example code for passing 32bit data to a queue

Blocking usually means that the thread that calls the function is blocked until there's something to do. So a blocking call to "get data" on a queue will block the calling thread until there is data to get. Non-blocking is of course the opposite, which means that the caller is not blocked ...
by deepo
Mon Nov 15, 2021 8:49 pm
Forum: C/C++
Topic: Counting button pressed
Replies: 5
Views: 222

Re: Counting button pressed

Have a look at pigpio for C
http://abyz.me.uk/rpi/pigpio/cif.html

What kind of display were you thinking of?
by deepo
Mon Nov 15, 2021 11:26 am
Forum: Networking and servers
Topic: Automatically mapping and sharing a drive?
Replies: 7
Views: 284

Re: Automatically mapping and sharing a drive?

OP: Are you talking about a RAID controller where you can swap disks (depending on selected RAID configuration).
Or are you talking about auto mounting from a file server somewhere on your net?
Or are you talking about a simple USB disk that auto mounts when plugging it in?

Go to advanced search