Go to advanced search

by Aydan
Fri Apr 12, 2019 2:00 pm
Forum: Troubleshooting
Topic: Signficant Latency in Ethernet communication using MQTT
Replies: 2
Views: 93

Re: Signficant Latency in Ethernet communication using MQTT

I'd start with tcpdump-ing the MQTT port on the Mosquitto server and checking the delay between the incoming and outgoing messages.

Regards
Hendrik
by Aydan
Wed Apr 10, 2019 1:49 pm
Forum: Advanced users
Topic: Detecting USB activity.
Replies: 12
Views: 946

Re: Detecting USB activity.

Just thinking out loud here: If you use a partition/loop-file mounted via fuse passthrough and then mout a file inside this file system with g_mass_storage you should be able to implement a callback in the fuse passthrough module for any read/write access from the g_mass_storage module. No need to m...
by Aydan
Thu Feb 14, 2019 1:09 pm
Forum: Advanced users
Topic: Busting for Buster? Try it today!
Replies: 8
Views: 1292

Re: Busting for Buster? Try it today!

- CONFIG_INPUT_EVDEV=y Building evdev statically into the kernel instead of as module would have the advantage that you have working keyboard and mouse in X, even if modules fail to load. E.g. when updates go wrong, and you end up in a situation in which you do have a newer kernel, but not the matc...
by Aydan
Wed Feb 13, 2019 2:08 pm
Forum: Python
Topic: keep TCP socket server running?
Replies: 5
Views: 205

Re: keep TCP socket server running?

@rolgordijn:

once a socket has been closed, youcan't reopen it.
So move these three lines into the while loop and you should be good:

Code: Select all

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.bind((TCP_IP, TCP_PORT))
s.listen(1)
Regards
Aydan
by Aydan
Mon Feb 11, 2019 2:07 pm
Forum: General discussion
Topic: Best way to get data from C++ code into raspberry pi?
Replies: 4
Views: 203

Re: Best way to get data from C++ code into raspberry pi?

I have a C++ code that uses opencv to detect number of cars in an intersection, this code outputs the number of cars in each side, what is the best way to send this data to my pi in order to control the traffic lights? Is there a way to send them directly? Or should I upload them to the cloud and g...
by Aydan
Mon Feb 11, 2019 2:01 pm
Forum: General discussion
Topic: Completely Password protect Raspberry Pi Python Program
Replies: 4
Views: 156

Re: Completely Password protect Raspberry Pi Python Program

A LUKS encrypted container will protect against accessing files from the SD card, but it is still not impossible to get to the data. But the resources and knowledge needed to access the data probably makes it safe enough for your use case.

Regards
Aydan
by Aydan
Fri Feb 01, 2019 10:57 am
Forum: Advanced users
Topic: USB Boot Pi Zero(W) by Serial Number
Replies: 11
Views: 613

Re: USB Boot Pi Zero(W) by Serial Number

I did open an issue for this against usbboot, but there does not seem to be much interest to implement it.
by Aydan
Wed Jan 30, 2019 4:17 pm
Forum: Python
Topic: Sorting a dict by specific key and value [SOLVED]
Replies: 3
Views: 161

Re: sorting a dict by specific key and value

So you don't want to sort a dictionary, which is not possible, but a list of dictionaries. list.sort() allows to give a function which will be called onto the compared objects via the key parameter: https://docs.python.org/3/howto/sorting.html#key-functions So if you want to sort by value of "start"...
by Aydan
Wed Jan 30, 2019 9:33 am
Forum: General discussion
Topic: How many pieces of pi are too many?
Replies: 72
Views: 2263

Re: How many pieces of pi are too many?

DarkPlatinum wrote:
Wed Jan 30, 2019 9:14 am
But if each power socket only allows 13 Amps to be drawn, using a 12 way socket means that a maximum of 1A can be drawn from each socket.
That's 1A @ 120V/230V depending where you're at, which is still more than 100/200Watts
More than enough to supply your Raspberries
by Aydan
Wed Jan 30, 2019 9:03 am
Forum: General discussion
Topic: How many pieces of pi are too many?
Replies: 72
Views: 2263

Re: How many pieces of pi are too many?

Hmm, I "only" have 8 Pis: - 1B rev 2 as a mqtt data connector for my furnace controller and ny PV logger, also working as ethernet to wlan router for said devices to connect them from my garage to the house net - 2 original 1Bs currently unemployed - 3 Pi0Ws: 1 surveillance camera, 1 electronic micr...
by Aydan
Tue Jan 29, 2019 8:52 pm
Forum: Troubleshooting
Topic: Two dhcp servers for Wifi AP and BT AP
Replies: 3
Views: 155

Re: Two dhcp servers for Wifi AP and BT AP

Not only in theory, you definitely can. I'm running one isc-dhcpd server against three subnets. I just had a look at the dnsmasq man page and it looks like you are allowed to secify multiople ip ranges. This should enable you to give addresses to multiple subnets. see also here: http://www.robertpar...
by Aydan
Tue Jan 29, 2019 12:14 pm
Forum: Troubleshooting
Topic: Two dhcp servers for Wifi AP and BT AP
Replies: 3
Views: 155

Re: Two dhcp servers for Wifi AP and BT AP

I'm not sure how dnsmasq does it, but with isc-dhcpd you configure the IP ranges for the different subnets on the same server. The server then gives out IPs for the subnet where the DHCP request came from.

Regards
Aydan
by Aydan
Mon Jan 28, 2019 3:37 pm
Forum: General discussion
Topic: Run script at login of specific user only
Replies: 19
Views: 709

Re: Run script at login of specific user only

I hope I understood your intention correctly: You want to be able to connect to a remote raspberry which only has internet over mobile broadband. What I did in this situation was to run an openVPN client on the raspberry, which would automatically connect to my openVPN server at home. This way I cou...
by Aydan
Mon Jan 21, 2019 5:15 pm
Forum: Troubleshooting
Topic: GPS via USB data gets corrupted if the program loop delay exceeds incoming rate. Is this a TTYUSB0 Cache problem?
Replies: 18
Views: 494

Re: GPS via USB data gets corrupted if the program loop delay exceeds incoming rate. Is this a TTYUSB0 Cache problem?

Weeeelllllll, if you want to do it old school, then you can still do it in C :D
Python just provides so many high level libraries that it kind of hurts to see code not using what python can offer.

Regards
Aydan
by Aydan
Sun Jan 20, 2019 8:24 pm
Forum: Troubleshooting
Topic: GPS via USB data gets corrupted if the program loop delay exceeds incoming rate. Is this a TTYUSB0 Cache problem?
Replies: 18
Views: 494

Re: GPS via USB data gets corrupted if the program loop delay exceeds incoming rate. Is this a TTYUSB0 Cache problem?

Your code probably works relatively stable, but is far from optimal: #1 If you want to average the speed, why do you discard samples which were received during your display update? #2 why do you use individual variables for the speed samples? Please read up on python lists. #3 you are again using sl...
by Aydan
Fri Jan 18, 2019 4:13 pm
Forum: Troubleshooting
Topic: GPS via USB data gets corrupted if the program loop delay exceeds incoming rate. Is this a TTYUSB0 Cache problem?
Replies: 18
Views: 494

Re: GPS via USB data gets corrupted if the program loop delay exceeds incoming rate. Is this a TTYUSB0 Cache problem?

Thanks for further hints. Once you guys mentioned the serial was buffered I found a solution. Just adding to the end of the loop :- ser.flushInput() did the trick. It flushes the buffer so when I start the next loop I get the latest NMEA string Now I get the latest NMEA string regardless of how lon...
by Aydan
Thu Jan 17, 2019 1:36 pm
Forum: Troubleshooting
Topic: GPS via USB data gets corrupted if the program loop delay exceeds incoming rate. Is this a TTYUSB0 Cache problem?
Replies: 18
Views: 494

Re: GPS via USB data gets corrupted if the program loop delay exceeds incoming rate. Is this a TTYUSB0 Cache problem?

If the serial data is put into a ring buffer, how can I disable it, so that I read GPS NMEA strings live as they arrive and not out of some buffer. I guess what I have at present is a FIFO type buffer and what I need is a LIFO one. cheers There is always a buffer. You can reduce it to 1 byte, but t...
by Aydan
Thu Jan 17, 2019 1:22 pm
Forum: Troubleshooting
Topic: Rpi3 hangs after 3 hours
Replies: 11
Views: 334

Re: Rpi3 hangs after 3 hours

@jamesh: would it be possible to include the status of the undervoltage flags into the kernel oops report? This might make things easier for debugging USB faults due to undervoltage.
by Aydan
Thu Jan 17, 2019 1:15 pm
Forum: General discussion
Topic: New SystemD Vulnerabilities
Replies: 14
Views: 1309

Re: New SystemD Vulnerabilities

DirkS wrote:
Thu Jan 17, 2019 12:21 pm
I think they were already in the Raspbian updates I installed yesterday.
Yes, the fix is available since yesterday.
by Aydan
Thu Jan 17, 2019 12:17 pm
Forum: General discussion
Topic: New SystemD Vulnerabilities
Replies: 14
Views: 1309

Re: New SystemD Vulnerabilities

Debian has rolled out the fix already, so Raspian should not be far behind.
by Aydan
Thu Jan 17, 2019 9:46 am
Forum: Advanced users
Topic: can i Replace Matlab & Simulink -with Octave - since the later one is Open Source
Replies: 2
Views: 203

Re: can i Replace Matlab & Simulink -with Octave - since the later one is Open Source

the octave package for armhf is in the debian stretch repos, so it should be in the raspbian repos as well.
"sudo apt install octave" should be enough.

Regards
Aydan
by Aydan
Thu Jan 17, 2019 8:37 am
Forum: Advanced users
Topic: (solved) Disable red power led on 3B+
Replies: 11
Views: 3619

Re: (solved) Disable red power led on 3B+

barsznica wrote:
Thu Jan 17, 2019 12:10 am
viewtopic.php?t=91440#p639363,
says, the Power LED is connect to gpio 35 (BCM numbering).
This is for the B+. not the 3B+
by Aydan
Thu Jan 17, 2019 8:33 am
Forum: Advanced users
Topic: Setuping up on Virtual Box then Converting back to IMG
Replies: 3
Views: 194

Re: Setuping up on Virtual Box then Converting back to IMG

I think the easiest way is to use multiarch and qemu on a debian base system and chroot into the raspbian root file system.
I did this for setting up the sd card for my Pine64 on an Intel Laptop.
for reference see here:
https://wiki.debian.org/Arm64Qemu
Should work the same for armhf

Regards
Aydan
by Aydan
Wed Jan 16, 2019 4:28 pm
Forum: Troubleshooting
Topic: Clone and “Error: Can't have a partition outside the disk!”
Replies: 38
Views: 1711

Re: Clone and “Error: Can't have a partition outside the disk!”

Just to clarify:
what is the filesystem size of your original SD card? (df -h)
If that is bigger than what fits on your new sd card, then you have to resize at least the file system before cloning.

fixing the partition table will not magically fix/resize your broken filesystem.

Go to advanced search