Go to advanced search

by jojopi
Tue Feb 25, 2020 6:28 am
Forum: Beginners
Topic: Reading variables from a text file into Bash variables
Replies: 13
Views: 462

Re: Reading variables from a text file into Bash variables

Arithmetic expansion with $(()) is a standard POSIX shell feature. Admittedly I think it came from the Korn shell originally, so it will not work in really old Bourne implementations. It only supports integers! There is no need to convert times and dates to epoch values for comparison. Formats like ...
by jojopi
Tue Feb 25, 2020 12:45 am
Forum: Python
Topic: termios.error and IOError when reading UART device
Replies: 4
Views: 273

Re: termios.error and IOError when reading UART device

Looking at the relevant source code for pyserial, that exception occurs in exactly the situation it describes. "select.select()" said that the port was ready to read, but then "os.read()" returned no data. As the message goes on to say, one possibility is that some other program had the port open, a...
by jojopi
Mon Feb 24, 2020 7:47 pm
Forum: Python
Topic: termios.error and IOError when reading UART device
Replies: 4
Views: 273

Re: termios.error and IOError when reading UART device

"Input/output error" generally indicates that something is wrong at the hardware or driver level. After seeing that error, you should run the "dmesg" command to display the kernel logs. Check whether there is any recent mention of serial or uart, or any other errors that seem relevant. There is no n...
by jojopi
Sun Feb 23, 2020 7:19 pm
Forum: Troubleshooting
Topic: Raspbian update: getting notification 'buster InRelease' doesn't support architecture 'i386'
Replies: 17
Views: 811

Re: Raspbian update: getting notification 'buster InRelease' doesn't support architecture 'i386'

rpdom wrote:
Sun Feb 23, 2020 7:07 pm
dpkg --print-architecture
That just prints the native architecture. You would need --print-foreign-architectures to see if i386 had been added.
by jojopi
Sun Feb 23, 2020 6:22 pm
Forum: Troubleshooting
Topic: Raspbian update: getting notification 'buster InRelease' doesn't support architecture 'i386'
Replies: 17
Views: 811

Re: Raspbian update: getting notification 'buster InRelease' doesn't support architecture 'i386'

The corresponding --add-architecture i386 tells the package management system that you want to be able to install foreign i386 packages alongside native armhf packages, using Debian/Raspbian Multiarch. When I do that, I get very similar errors to those in the first post, and when I remove the archit...
by jojopi
Tue Feb 18, 2020 4:46 pm
Forum: Raspbian
Topic: PubkeyAuthorization no, PasswordAuthorization no I changed these, now I am stuck
Replies: 11
Views: 403

Re: PubkeyAuthorization no, PasswordAuthorization no I changed these, now I am stuck

The mount command with the space will work. It is asking to mount the (nonsensical) device "rw" on directory "/", but because we also specified the "remount" option, the given device is ignored and the existing device is reused. The "rw" option is actually the kernel default, so omitting it does not...
by jojopi
Mon Feb 17, 2020 11:55 pm
Forum: Troubleshooting
Topic: Can't set the proper time zone for Rpi4
Replies: 12
Views: 364

Re: Can't set the proper time zone for Rpi4

Setting America & Vancouver is probably Vancouver, Washington. No, it absolutely is not. The first question is "Please select the geographic area in which you live", and "America" refers to the entire continent. You would only have to try it before posting to see that the options in that continent ...
by jojopi
Mon Feb 17, 2020 6:16 pm
Forum: Troubleshooting
Topic: Can't set the proper time zone for Rpi4
Replies: 12
Views: 364

Re: Can't set the proper time zone for Rpi4

Apparently I can't find Canada between the available options. I'm in Vancouver and I didn't even seem to find a close city that I could select even from other countries. (Seattle in USA would have worked as well). In the first list, select "America". In the second, "Vancouver". Were you confused th...
by jojopi
Sun Feb 16, 2020 7:20 pm
Forum: Troubleshooting
Topic: Daily reboot not working consistently (crontab)!
Replies: 6
Views: 195

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: 240

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: 52520

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: pi@beta:~ $ 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: 1537

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: 1537

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: 202

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: 663

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: 165

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: 173

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: 225057

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: 1315

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: 1315

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: 1315

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: 684

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: 799

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: 615

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 ...

Go to advanced search