Go to advanced search

by n67
Wed Aug 22, 2018 5:54 pm
Forum: Python
Topic: Passing variables
Replies: 6
Views: 770

Re: Passing variables

Sounds like a job for shared memory.

Easy enough to do in C. Not sure if/how to do it in Python, but it should be possible.
by n67
Wed Aug 22, 2018 4:12 pm
Forum: Troubleshooting
Topic: Raspberry Pi Zero W - Cannot use / connect to USB OTG Ethernet
Replies: 9
Views: 2487

Re: Raspberry Pi Zero W - Cannot use / connect to USB OTG Ethernet

Try putting:

Code: Select all

ifconfig usb0 169.254.119.23
in /etc/rc.local (and rebooting the Zero).

Yes, the last two octets in the above command can be whatever you like...
by n67
Wed Aug 22, 2018 4:09 pm
Forum: Raspbian
Topic: How to increase the size of the virtual consoles (NOT X!!)
Replies: 4
Views: 387

Re: How to increase the size of the virtual consoles (NOT X!!)

@ejolson: I have no idea what you are talking about, but it probably belongs in some other thread. Meanwhile, ... I had used the "Set resolution" functionality in "rc_gui" to make the X screen small, but this, alas, has the side effect of also making the VCs small. I have fixed this, for the time be...
by n67
Wed Aug 22, 2018 4:03 pm
Forum: C/C++
Topic: sigwait doesn't catch ctrl+c
Replies: 11
Views: 1926

Re: sigwait doesn't catch ctrl+c

By the way, the canonical way to wait for a signal is to use pause(2).

man 2 pause
by n67
Wed Aug 22, 2018 1:35 am
Forum: Troubleshooting
Topic: Raspberry Pi Zero W - Cannot use / connect to USB OTG Ethernet
Replies: 9
Views: 2487

Re: Raspberry Pi Zero W - Cannot use / connect to USB OTG Ethernet

In my experience, the problem is that unless/until you fix it, the usb0 device on the Zero won't have an IP address. That is, if you can get to a shell prompt on the Zero and type: ifconfig usb0 you will see that it is "UP", but you won't see any (ipv4) IP address. I have developed ways to fix this,...
by n67
Tue Aug 21, 2018 11:55 pm
Forum: Raspbian
Topic: How to increase the size of the virtual consoles (NOT X!!)
Replies: 4
Views: 387

How to increase the size of the virtual consoles (NOT X!!)

The command to use to check this: (as root) stty size -F /dev/tty1 On most machines, this gives a pair of pretty big numbers - e.g., 61 228 This means that tty1 (and each of the other virtual consoles) is 61 rows and 228 columns in size. However, on one of my RPis, it returns 27 and 62. I need it to...
by n67
Mon Aug 20, 2018 9:42 pm
Forum: Python
Topic: How to change the value of a variable that is being used in a looped Python script in terminal window?
Replies: 6
Views: 559

Re: How to change the value of a variable that is being used in a looped Python script in terminal window?

I've always found named pipes to be more trouble than they are worth. The problem is that since they are actual, real files in the file system, you have to be careful to remove them when you're done. This makes things complicated - especially during the debugging process. Instead, I've always used T...
by n67
Mon Aug 20, 2018 5:43 pm
Forum: C/C++
Topic: Problem while accessing /dev/mem
Replies: 4
Views: 1179

Re: Problem while accessing /dev/mem

... 3) Make pi be in the kmem group (and reboot to make it take effect) I am pretty new to the linux environment. Could u help more? How to do that?? any link suggesting the same? Probably the simplest (if it works) is to follow the advice of another thread responder and use /dev/gpiomem instead. B...
by n67
Mon Aug 20, 2018 2:00 pm
Forum: C/C++
Topic: Problem while accessing /dev/mem
Replies: 4
Views: 1179

Re: Problem while accessing /dev/mem

In general, you will need to be running as root in order to access /dev/mem. 0 crw-r----- 1 root kmem 1, 1 Jun 16 21:44 /dev/mem (Or be in group kmem; pi is not in that group [by default]) So, you have a few choices: 1) Run the program via "sudo" (this will be the most common advice given on this fo...
by n67
Sun Aug 19, 2018 6:27 am
Forum: Off topic discussion
Topic: Longest Raspberry Pi uptime
Replies: 99
Views: 77736

Re: Longest Raspberry Pi uptime

Thanks You can also use "uptime -p" to get a "prettier" display. Also, "uptime -s" will show you the time the machine was booted. Note, BTW, that Linux just keeps track of uptime (by basically constantly updating a counter), so the string displayed by "uptime -s" is "calculated". I.e., they just ta...
by n67
Sun Aug 19, 2018 12:18 am
Forum: Raspbian
Topic: RASPBIAN STRETCH auto login as root not working
Replies: 28
Views: 11556

Re: RASPBIAN STRETCH auto login as root not working

Actually autologin as pi isn't more secure than autologin as root, as long as pi is allowed to run any programm with sudo. You don't need autologin as root, to run programs with root privileges. So people who could find the answer to this question, wouldn't search it. I don't think these people's c...
by n67
Sat Aug 18, 2018 10:07 pm
Forum: HATs and other add-ons
Topic: ETA for Official POE Hat for 3B+
Replies: 66
Views: 14477

Re: ETA for Official POE Hat for 3B+

Just for completeness, does anyone have good recommendations as to what to use as "the other end" - i.e., as the Power Injector side of it?
by n67
Sat Aug 18, 2018 10:05 pm
Forum: Raspbian
Topic: RASPBIAN STRETCH auto login as root not working
Replies: 28
Views: 11556

Re: RASPBIAN STRETCH auto login as root not working

LenG wrote:
Sat Aug 18, 2018 7:27 pm
Can someone **PLEASE stop preaching*** and just answer the question?
Actually, amid all the noise and haste, a few posters have given good answers.

You should just put all the "preachers" on your foes list and be done with them.
by n67
Sat Aug 18, 2018 11:23 am
Forum: Raspbian
Topic: copy install to new SD-card
Replies: 16
Views: 29838

Re: copy install to new SD-card

copy install to bigger (or smaller) microSD card.. I always use SD Card Copier in Raspbian Desktop... much easier with just a few clicks of the mouse. I haven't tried it yet but there is a CLI version that is also available (not the dreaded "dd") https://github.com/billw2/rpi-clone Yes. The now bui...
by n67
Fri Aug 17, 2018 4:16 pm
Forum: Beginners
Topic: New Tutorial for Disabling Login.
Replies: 4
Views: 3944

Re: New Tutorial for Disabling Login.

What do you mean? I can think of at least two possibilities: 1) disable the 'pi' user from logging in. "man passwd" and look for the word "lock". 2) Prevent pi from automatically logging in on boot. You can disable the boot to desktop via the config program. However, regardless of how you have the "...
by n67
Thu Aug 16, 2018 12:51 pm
Forum: Beginners
Topic: No connectivity to internet
Replies: 7
Views: 499

Re: No connectivity to internet

A key question is:

What does the OP mean by "lost connection to the internet"?

What are the symptoms?
by n67
Wed Aug 15, 2018 5:08 pm
Forum: Networking and servers
Topic: scp transfer of .PNG photos---something doesn't work
Replies: 14
Views: 1259

Re: scp transfer of .PNG photos---something doesn't work

I guess I am confused. In the python library picamera, the function capture.sequence() requires that the image format must be specified as an option "format='png' ". The first bit of code below did not work, but I've just rewritten it with your suggestion and (the second bit of code) now works and ...
by n67
Wed Aug 15, 2018 2:50 pm
Forum: Networking and servers
Topic: scp transfer of .PNG photos---something doesn't work
Replies: 14
Views: 1259

Re: scp transfer of .PNG photos---something doesn't work

Well, that pretty much answers that, doesn't it?
by n67
Wed Aug 15, 2018 2:26 pm
Forum: Troubleshooting
Topic: Bash Script when reboot
Replies: 10
Views: 592

Re: Bash Script when reboot

Is it possible/useful to invoke screen during the startup process?
Yes. I (and others) do it all the time.
by n67
Wed Aug 15, 2018 2:20 pm
Forum: Troubleshooting
Topic: Bash Script when reboot
Replies: 10
Views: 592

Re: Bash Script when reboot

Well, first of all, ignore any/all advice about systemd. systemd may be good for the experts (it was designed for and by experts), but is useless for us ordinary folk. This question is the most frequently asked of FAQs. There should be (but isn't) a straightforward, RPI-approved, answer to it. There...
by n67
Sat Aug 11, 2018 8:12 pm
Forum: General discussion
Topic: Desktop less (Linux based) OS for RPI
Replies: 19
Views: 1950

Re: Desktop less (Linux based) OS for RPI

Why not? Do we have a terminology problem here? Traditionally "headless" referred to a system with no user interface. No display, keyboard, mouse, etc. That is how most of my Pi installations work. Mostly using Raspbian Lite. "Headless" is a description of a hardware configuration, not of an OS. Fo...
by n67
Fri Aug 10, 2018 12:53 am
Forum: Raspbian
Topic: Removing systemd on Jessie
Replies: 5
Views: 4038

Re: Removing systemd on Jessie

(and the Pi boots faster with sysvinit than with systemd).
I thought the whole point (and the main selling point) of systemd was that it booted faster than sysvinit. At least that's what everybody claims...

Without that, what have you got?
by n67
Thu Aug 09, 2018 8:30 pm
Forum: Advanced users
Topic: Pi Zero as a USB keyboard (HID gadget)
Replies: 34
Views: 24067

Re: Pi Zero as a USB keyboard (HID gadget)

There really doesn't seem to be any "solution".

It just works for some people and not for others.
by n67
Thu Jul 26, 2018 5:13 pm
Forum: Troubleshooting
Topic: RPi3 with Ubuntu Mate shows "WiFi Networks device not ready"
Replies: 12
Views: 2838

Re: RPi3 with Ubuntu Mate shows "WiFi Networks device not ready"

DougieLawson wrote:
Wed Jul 25, 2018 9:28 pm
Can I recommend adding N67 to your forum "foes" list, it makes the whole forum experience a lot nicer not having to read N67's junk unless someone quotes it.
Yes, please do. Everyone will benefit from your having done so.
Excellent advice.

(100% serious. no joking)
by n67
Thu Jul 26, 2018 4:20 pm
Forum: Beginners
Topic: SSH different ports
Replies: 23
Views: 2706

Re: SSH different ports

You're probably the exception covered by my use of the word "most".

Go to advanced search