Go to advanced search

by jojopi
Sun Oct 08, 2017 11:06 am
Forum: Advanced users
Topic: Predicable names on stretch are confusing me
Replies: 29
Views: 1534

Re: Predicable names on stretch are confusing me

If you really want Pi3's wlan0 to be wlxb827ebxxxxxx, you must (delete and) create your own /etc/systemd/network/99-default.link and add the "mac" policy: [Link] NamePolicy=kernel database onboard slot path mac MACAddressPolicy=persistent The default version in / lib /systemd/network/99-default.link...
by jojopi
Mon Sep 25, 2017 1:02 pm
Forum: General discussion
Topic: dd vs cp for flashing sd cards on the Linux command line.
Replies: 23
Views: 826

Re: dd vs cp for flashing sd cards on the Linux command line.

Larger buffers results in lesser seek time and faster transfer speeds. You are assuming that the read or write size used by the application has any influence on the device driver. In Linux the default behaviour is for everything to go through the buffer cache in between. The kernel can read ahead u...
by jojopi
Sun Sep 24, 2017 5:19 pm
Forum: General discussion
Topic: dd vs cp for flashing sd cards on the Linux command line.
Replies: 23
Views: 826

Re: dd vs cp for flashing sd cards on the Linux command line.

Would you please explain this? In Linux you can open /dev/sdX, seek to an arbitrary byte, and read and write arbitrary bytes. Yes, the hardware is using blocks. You would not suggest that I use dd for all files, just because they are stored on drives that use blocks. It is no more efficient for the...
by jojopi
Sun Sep 24, 2017 3:25 pm
Forum: Troubleshooting
Topic: inconsistent boot results/renaming network interfaces
Replies: 5
Views: 167

Re: inconsistent boot results/renaming network interfaces

The /boot/cmdline.txt part is Pi-specific.

(On normal platforms you would use /etc/default/grub.)
by jojopi
Sun Sep 24, 2017 11:59 am
Forum: General discussion
Topic: dd vs cp for flashing sd cards on the Linux command line.
Replies: 23
Views: 826

Re: dd vs cp for flashing sd cards on the Linux command line.

GNU cp is fine. You can also use "cat IMAGE >/dev/sdX", but that is awkward to sudo. There is nothing special about dd, unless you use its count, skip, or seek operands, etc. If you forget to specify bs, the performance is disastrous. The GNU version does have one redeeming feature, however. "killal...
by jojopi
Sat Sep 23, 2017 3:30 pm
Forum: Beginners
Topic: Combining C and Python and launch at boot
Replies: 1
Views: 106

Re: Combining C and Python and launch at boot

Looking at the return code when launching the python from C, I get 256. That means the command executed, but exited with status 1. It is consistent with an uncaught Python exception. I have no logs at all. Any errors from the Python interpreter will go to the standard error stream, rather than your...
by jojopi
Sat Sep 23, 2017 2:23 pm
Forum: Troubleshooting
Topic: NFS server goes catatonic?
Replies: 2
Views: 131

Re: NFS server goes catatonic?

Ping replies are sent by the kernel, so they do not usually stop working unless the system is completely dead. One possibility in your case is that everything is still running but you have lost USB connectivity to Ethernet, keyboard, and mouse. When the system is working, I would suggest that you sw...
by jojopi
Mon Sep 18, 2017 4:22 am
Forum: Beginners
Topic: Crontab not working at reboot (split on request of pcmanbob)
Replies: 3
Views: 132

Re: Crontab not working at reboot

There is always an inherent danger when altering any of roots files, including the crontab. You can't create a boot-loop as the Pi user (well you can, but you need to craft it), as root it is all too easy. Surely you are not suggesting that "sudo reboot" in pi's crontab is somehow safer than "reboo...
by jojopi
Sat Sep 16, 2017 2:11 pm
Forum: C/C++
Topic: First c program write in raspberry pi.
Replies: 55
Views: 35886

Re: First c program write in raspberry pi.

On an embedded system and on most windows compilers on the market an include of a ".h" automatically marks the matching ".c" file to compile if it is in the same directory. GCC is different I have to add even the current directory to the include list or specifically pass the library file as well. I...
by jojopi
Sat Sep 16, 2017 9:05 am
Forum: Networking and servers
Topic: ssh key pairing between two pi's still requires password after setup
Replies: 28
Views: 1086

Re: ssh key pairing between two pi's still requires password after setup

I was able to compare permissions between the accounts and I discovered that my home directory /home/sking was set to 775. Turns out ssh wants 755. Actually it is fine for ~ to be 0775, as long as its group has the user as its only member. Any of the methods for creating a user should also create a...
by jojopi
Wed Sep 13, 2017 3:40 pm
Forum: General discussion
Topic: Using --password with ssh
Replies: 4
Views: 237

Re: Using --password with ssh

You are using "StaSh", a shell-like program written in Python for the Pythonista environment for iOS. Unlike bash, stash does not execute external commands directly, because they would not normally exist on iOS. It has a set of Python programs for the commands it knows how to emulate. You can see th...
by jojopi
Fri Sep 08, 2017 8:43 pm
Forum: Beginners
Topic: Long-running process and logging out of ssh
Replies: 17
Views: 586

Re: Long-running process and logging out of ssh

What do the programs do, that you want to keep running after you are logged out? If they use the terminal interactively (even just for printing progress messages) then the screen or tmux solution is the only way you will be able to reconnect to them later. (See also reptyr.) If the programs do not r...
by jojopi
Wed Aug 30, 2017 9:16 am
Forum: Troubleshooting
Topic: How to light single LEDs on the max7219?
Replies: 13
Views: 988

Re: How to light single LEDs on the max7219?

You have reopened an old thread, and it is not clear if your situation is really the same. Do you have the display working at all, and what libraries are you currently using? The MAX72xx fundamentally treats the display as eight digits of eight segments. For a matrix, that will be eight rows or colu...
by jojopi
Fri Aug 25, 2017 1:28 pm
Forum: Raspbian
Topic: New user: bash shell don't start automatically
Replies: 4
Views: 342

Re: New user: bash shell don't start automatically

useradd needs most of the parameters to be specified manually. Actually it is supposed to get them from /etc/default/useradd, which in the Foundation's images says SHELL=/bin/bash. This was working in jessie, but there is a bug in the version of useradd in stretch. The bug has been reported ( 86576...
by jojopi
Fri Aug 25, 2017 8:17 am
Forum: Troubleshooting
Topic: segfaults on cloned card, but not on original card
Replies: 7
Views: 325

Re: segfaults on cloned card, but not on original card

Different behaviour suggests that something is different. Try running the rsync again like this: rsync -avx / /mnt/root rsync -cavx / /mnt/root The first command just updates any files that have changed in the meantime (updated size or timestamp). The second command repeats all the checksums. Any fi...
by jojopi
Wed Aug 23, 2017 4:11 pm
Forum: Beginners
Topic: Identifying USB ports
Replies: 5
Views: 339

Re: Identifying USB ports

Are you sure your dongle can do SDR, and is supported by the software? http://gqrx.dk/supported-hardware refers to http://osmocom.org/projects/sdr/wiki/rtl-sdr#SupportedHardware The SDR programs will talk to the hardware directly using the files under /dev/bus/usb/. You may be better not to load a k...
by jojopi
Tue Aug 22, 2017 1:08 pm
Forum: Troubleshooting
Topic: [Solved] Raspbian stretch - how do I restore original Ethernet names
Replies: 22
Views: 3944

Re: Raspbian stretch - how do I restore original Ethernet names

If they had provided well defined names alongside the traditional names there would have been no issue. Except for every existing program that deals with network interfaces, which would suddenly see twice as many and have no reason to suspect that half of them are duplicates. Your proposal requires...
by jojopi
Mon Aug 21, 2017 6:00 pm
Forum: Troubleshooting
Topic: lpstat issues - wrong architecture? [solved]
Replies: 3
Views: 173

Re: lpstat issues - wrong architecture?

The file is not for the wrong architecture, it is just full of junk, presumably because of some error updating the SD card. I do not think that CUPS is preinstalled in the lite images, so the problem must have occurred during or after installing it. You might try reinstalling the package, and hope t...
by jojopi
Mon Aug 21, 2017 1:13 pm
Forum: General discussion
Topic: 64bit vs 32bit benchmark. Eben was right
Replies: 65
Views: 13589

Re: 64bit vs 32bit benchmark. Eben was right

1) Floating point operations are up to 12 times faster in 64bits (see sysbench tests); "sysbench --test=cpu" is not a floating point test (except that it unnecessarily calls sqrt). It artificially favours 64bit systems by using 64bit integer division (remainder) on numbers that would all actually f...
by jojopi
Sun Aug 20, 2017 11:47 am
Forum: Troubleshooting
Topic: openssl version not compatible with easy-rsa - Stretch
Replies: 4
Views: 657

Re: openssl version not compatible with easy-rsa - Stretch

There is a Debian bug report about this issue: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=851059 The bug report is not perfect, but it is in the right place. The fact that such an obvious problem has not been addressed could indicate that the easy-rsa package is not being actively maintained ...
by jojopi
Sun Aug 20, 2017 4:19 am
Forum: Advanced users
Topic: Raspbian system-wide hang after using “reset” and logging-of
Replies: 2
Views: 356

Re: Raspbian system-wide hang after using “reset” and logging-of

Very interesting. The specific thing that "reset" does that triggers the problem is "stty -clocal". You can wake systemd back up after the hang by running from another terminal "sudo stty -F /dev/ttyAMA0 clocal" (or your device name). strace shows that after logout, systemd pid1 normally runs: open(...
by jojopi
Sat Aug 19, 2017 2:19 am
Forum: Troubleshooting
Topic: Odd Fishy Smell Coming From Pies?
Replies: 3
Views: 290

Re: Odd Fishy Smell Coming From Pies?

I would not recommend any use of acetone on a populated board. It can severely damage some common plastics (ABS, PVC), and we do not know what all the components are made of. Looking at the safety data sheets for commercial PCB flux cleaning solvents, they contain: hexanes/naphtha, isopropanol, prop...
by jojopi
Fri Aug 11, 2017 11:25 pm
Forum: Beginners
Topic: GPIO In bash not working (Solved)
Replies: 9
Views: 366

Re: GPIO In bash not working (Solved)

When I try to use pi@raspberrypi:~ $ gpio mode 21 up it doesnt change the mode of the pin when I use gpio readall they still show up as mode IN "gpio ... mode ... up" sets the pin as an input, but with the internal pull-up resistor enabled. The pull resistors are useful if you connect a switch to a...
by jojopi
Fri Aug 11, 2017 2:41 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: To "sudo echo..." or not to "sudo echo..." to /dev/spidev... ?
Replies: 18
Views: 973

Re: To "sudo echo..." or not to "sudo echo..." to /dev/spidev... ?

There is no permissions issue, because sudo would not fix that. Sorry. Just switching to printf does not help in this case, because it is not required to support hex escapes either. The only really portable solution is to use octal: printf "\017\001" > /dev/spidev0.1 Slightly less reliably, you coul...
by jojopi
Wed Aug 09, 2017 6:48 pm
Forum: General discussion
Topic: Re-purposing SPI lines to be GPIOs?
Replies: 12
Views: 816

Re: Re-purposing SPI lines to be GPIOs?

Many of the functions of the "gpio" binary expect wiringPi pin numbering by default.

Use "gpio -g mode 10 output" to indicate that you mean Broadcom numbering.

Go to advanced search