Go to advanced search

by jojopi
Sun Feb 16, 2020 7:20 pm
Forum: Troubleshooting
Topic: Daily reboot not working consistently (crontab)!
Replies: 6
Views: 114

Re: Daily reboot not working consistently (crontab)!

I just want to do a reboot every day at any time as one or more of my running PIs sometimes stops running for no apparent reason. If the Pi "stops running" somehow, then cron will likely stop too. And you said "for no apparent reason", rather than "never within 24 hours of boot", so I do not see ho...
by jojopi
Sun Feb 16, 2020 5:43 pm
Forum: Advanced users
Topic: enable/disable RS232 flow control
Replies: 4
Views: 129

Re: enable/disable RS232 flow control

Yes. Linux supports hardware flow control with RTS/CTS, and software flow control with XON/XOFF. These are terminal modes, which can be set using the same interface that you use for the baud and parity settings, etc. Exactly what that looks like depends on the language you are using. Note that the h...
by jojopi
Sat Feb 15, 2020 12:51 pm
Forum: Troubleshooting
Topic: Force a full fsck on reboot, ignoring the dirty flag
Replies: 23
Views: 52157

Re: Force a full fsck on reboot, ignoring the dirty flag

errors=continue to your fstab instead of FSCKFIX=yes. "errors=continue" is the default: [email protected]:~ $ sudo tune2fs -l /dev/mmcblk0p2 |grep -i error Errors behavior: Continue "fsck.repair=yes" is also the default in current images. No amount of ignoring or repairing errors can guarantee to keep the sy...
by jojopi
Tue Feb 11, 2020 4:28 am
Forum: Beginners
Topic: Creating an Operating System on the Raspberry Pi
Replies: 36
Views: 1149

Re: Creating an Operating System on the Raspberry Pi

The word "shall" above is interesting: since "long long" is guaranteed to exist, it implies that int64_t must also exist. "long long" could be 72 bits, include padding, or be stored sign-magnitude. In these cases, int64_t will either not exist, or it will be slower than the native types. Of course,...
by jojopi
Mon Feb 10, 2020 7:19 pm
Forum: Beginners
Topic: Creating an Operating System on the Raspberry Pi
Replies: 36
Views: 1149

Re: Creating an Operating System on the Raspberry Pi

Here's one from C99: "int64_t" works identically on all platforms regardless of hardware support. ISO/IEC 9899:* §7.[18|19|20].1.1.3 These types are optional. However, if an implementation provides integer types with widths of 8, 16, 32, or 64 bits, no padding bits, and (for the signed types) that ...
by jojopi
Mon Feb 10, 2020 10:48 am
Forum: Raspbian
Topic: Keyboard shortcut to force minimize / force maximize the current app?
Replies: 5
Views: 124

Re: Keyboard shortcut to force minimize / force maximize the current app?

In LXDE-pi and some other desktop environments, you can move a window by holding Alt and dragging any part of the window with the left mouse button.

This should allow you to move an oversized window until its resizing handles or minimize/maximize buttons are visible.
by jojopi
Sun Feb 09, 2020 8:46 pm
Forum: Raspbian
Topic: issue after upgrade to 20200205 release
Replies: 6
Views: 459

Re: issue after upgrade to 20200205 release

symptom is: after boot sequence, GUI login screen appears , I enter user 'pi' and my password, press 'login' then screen goes black and after a while GUI login screen reappears. One possible cause of the GUI failing to launch is that the root filesystem is full. Another is bad ownership in /home/pi...
by jojopi
Sun Feb 09, 2020 7:16 pm
Forum: Troubleshooting
Topic: Lost: Change keyboard layout
Replies: 2
Views: 104

Re: Lost: Change keyboard layout

perl: warning: Please check that your locale settings: LANGUAGE = (unset), LC_ALL = "en_GB.UTF-8", LANG = "en_GB.UTF-8" are supported and installed on your system. Those settings are valid. Rather than debug why the locale is selected but not generated, I suggest installing the locales-all package....
by jojopi
Sat Feb 08, 2020 3:10 pm
Forum: Troubleshooting
Topic: Mistakenly moved system folders in Raspbian Buster. System failure
Replies: 4
Views: 129

Re: Mistakenly moved system folders in Raspbian Buster. System failure

sudo mv -r /* /etc/openvpn mv does not accept the -r option. It is always recursive because there is no way to move a directory without the contents also moving. Assuming you mean "mv /* /etc/openvpn/", that is easy to undo if you have root access to another Linux machine. Otherwise install a new R...
by jojopi
Sat Feb 08, 2020 1:33 pm
Forum: Troubleshooting
Topic: How to change keyboard language layout?
Replies: 30
Views: 221348

Re: How to change keyboard language layout?

I have the same problem as described in this post. You really do not, and it would have been better to start a new thread either way. sudo dpkg-reconfigure keyboard-configuration does not act, same as changing keyboard layout in raspi-config. No options presented. raspi-config/dpkg-reconfigure is f...
by jojopi
Tue Feb 04, 2020 4:57 pm
Forum: C/C++
Topic: ioctl
Replies: 9
Views: 387

Re: ioctl

Write to register error : Remote I/O error You need to remove the trailing newlines from your perror messages, so that the error descriptions go on the same line. The I2C_SLAVE ioctl does not actually communicate with the remote chip. It just tells the kernel what address to use for subsequent read...
by jojopi
Tue Feb 04, 2020 3:56 pm
Forum: C/C++
Topic: ioctl
Replies: 9
Views: 387

Re: ioctl

Incorrect the kernel prints that error when you try to IOControl a none existent device ... his code is being executed and that is the error message the kernel spits to the console which is by default STDERR output. No, that is not how Linux works at all. The kernel never writes to stderr except wh...
by jojopi
Tue Feb 04, 2020 9:41 am
Forum: C/C++
Topic: ioctl
Replies: 9
Views: 387

Re: ioctl

Google tells me there should be a /sys/ioctl.h file that shows options but this isn't found on my pi. It is not /sys/ioctl.h, it is <sys/ioctl.h> as in #include <sys/ioctl.h> . The angle brackets tell the compiler to look in the normal places, such as /usr/include/. The header file is not particula...
by jojopi
Mon Feb 03, 2020 4:37 pm
Forum: Troubleshooting
Topic: USB Permission Error
Replies: 7
Views: 160

Re: USB Permission Error

Link please (and report it). The question has been asked before but that doesn't make this a duplicate. OP shows two posts, but only one is available. So a duplicate has been deleted by now. This is not uncommon, because each user's first post to this forum is delayed by moderator checks against sp...
by jojopi
Mon Feb 03, 2020 2:41 pm
Forum: C/C++
Topic: Math Calculations Are Slightly Off
Replies: 3
Views: 263

Re: Math Calculations Are Slightly Off

My gut feeling is that floats are being used instead of doubles Not a terrible guess (the avr-gcc compiler used for Arduino does implement single-precision for performance reasons). However, all models of Raspberry Pi have double-precision floating-point in hardware. You mention cross compilation, ...
by jojopi
Sun Feb 02, 2020 8:22 am
Forum: Python
Topic: Python code not able to turn on GPIO
Replies: 3
Views: 150

Re: Python code not able to turn on GPIO

I can turn my PI zero w GPIO pins on and off by using "gpio write 17 1", Are you sure? The "gpio write" that I am familiar with is part of WiringPi, and it defaults to WiringPi numbering, unless you pass the -g or -1 options. But 17 in WiringPi numbering was on the extra P5 header, present only on ...
by jojopi
Sun Feb 02, 2020 7:30 am
Forum: C/C++
Topic: how to set and read register value in C for raspberry pi in linux enviroment?
Replies: 7
Views: 275

Re: how to set and read register value in C for raspberry pi in linux enviroment?

Read the rest of the page you linked. The SET register at +7 is for setting pins high (assuming they have already been configured as outputs). To read, you need the LEVEL register at +13. By the way, 0x6770696f are the ASCII codes for the letters "gpio", in big-endian byte order. That seems to be wh...
by jojopi
Mon Jan 27, 2020 6:03 pm
Forum: C/C++
Topic: How to Handle Multiple USB Devices of the Same Type
Replies: 2
Views: 178

Re: How to Handle Multiple USB Devices of the Same Type

There should already be symlinks in /dev/serial/by-path/ that are stable according to which ports the devices are plugged into. The path names are pretty cumbersome, but you can make permanent symlinks with your own names to them from anywhere outside of /dev, if you need to refer to them often. Thi...
by jojopi
Sun Jan 26, 2020 4:29 pm
Forum: Troubleshooting
Topic: FIXED: man <command> exits with code 1
Replies: 11
Views: 391

Re: man <command> exits with code 1

:~ $ ls -l /proc/$$/fd lrwx------ 1 pi pi 64 Jan 25 09:58 0 -> /dev/pts/1 lrwx------ 1 pi pi 64 Jan 25 09:59 1 -> /dev/pts/1 l-wx------ 1 pi pi 64 Jan 25 09:59 2 -> 'pipe:[5880175]' l-wx------ 1 pi pi 64 Jan 25 09:59 255 -> 'pipe:[5880175]' So, standard input and output (0 and 1) are connected to a...
by jojopi
Fri Jan 24, 2020 5:56 pm
Forum: Troubleshooting
Topic: [Fixed] Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used
Replies: 17
Views: 594

Re: Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used

Then I got to thinking maybe your pulling software from a bad mirror since it could be possible they would use different ones. Repository data is cryptographically signed to guard against tampering. apt will not install anything unless it can verify that the exact package file was approved by one o...
by jojopi
Fri Jan 24, 2020 8:00 am
Forum: Troubleshooting
Topic: [Fixed] Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used
Replies: 17
Views: 594

Re: Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used

'badblocks" is not as relevant as it was decades ago. Operating systems used to need facilities to find and work around defects in the media. All modern storage devices do this internally, and hide problems from the OS until they lose data. The fact that you can read the whole card is not a bad sign...
by jojopi
Fri Jan 24, 2020 6:04 am
Forum: Troubleshooting
Topic: FIXED: man <command> exits with code 1
Replies: 11
Views: 391

Re: man <command> exits with code 1

su -c '/bin/bash -i' pi In another thread I said that a "tcsetattr" error meant that bash thought it was interactive but had no terminal. Here, you are passing the -i flag to bash, forcing it to be interactive when it presumably does not want to be. According to the man page, bash should be interac...
by jojopi
Thu Jan 23, 2020 11:31 am
Forum: Troubleshooting
Topic: [Fixed] Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used
Replies: 17
Views: 594

Re: Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used

Curl uses many shared libraries, so it is possible the segfault occurs inside one of them. See "ldd /usr/bin/curl". You can reinstall a package without purging it first: sudo apt install --reinstall PACKAGE However, if our working theory is that the SD card is experiencing corruption issues, then I ...
by jojopi
Wed Jan 22, 2020 2:26 pm
Forum: Troubleshooting
Topic: [Fixed] Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used
Replies: 17
Views: 594

Re: Issue "tcsetattr: Inappropriate ioctl for device" in script where curl used

The error message is from bash. It does not mention curl, nor give a script name or line number. Somehow bash thinks it is interactive at that point; it tries to set terminal attributes and finds it has no terminal. I am not sure what could cause that, but suspect it may involve command substitution...
by jojopi
Tue Jan 21, 2020 1:22 pm
Forum: C/C++
Topic: Mouse position in C++ Not with X11 but DispmanX
Replies: 45
Views: 1627

Re: Mouse position in C++ Not with X11 but DispmanX

i can comfortably intercept the event and use the delta values to move my own cursor/objects in project but I need in this very specific instance to get hold of the position of the cursor displayed by Raspbian. It sounds like your application is taking over the whole screen with 3d graphics, readin...

Go to advanced search