Go to advanced search

by scruss
Wed Apr 25, 2018 9:42 pm
Forum: Beginners
Topic: put headers on a text file
Replies: 9
Views: 117

Re: put headers on a text file

Looks like you're trying to create CSV - so why not use the csv module?
by scruss
Wed Apr 25, 2018 8:05 pm
Forum: Raspbian
Topic: Bash script: double ascii stream to hex .. and back
Replies: 12
Views: 150

Re: Bash script: double ascii stream to hex .. and back

or … #!/bin/bash # hexish.sh - ascii to hex and back again - scruss function tohex() { echo -e $(sed 's/\(..\)/\\x\1/g;' <<< "$1") |\ sed 's/\(..\)/0x\1 /g; s/ $//;' } function toasc() { echo -n "$1" | sed 's/ *0x//g;' | xxd -pu } # some test code: either first arg of script or canned example exampl...
by scruss
Tue Apr 24, 2018 2:00 pm
Forum: Beginners
Topic: Fetchmail - File /etc/fetchmailrc must be owned by you
Replies: 1
Views: 39

Re: Fetchmail - File /etc/fetchmailrc must be owned by you

what if you set the options in ~/.fetchmailrc, and call it without the '-f'? ~/.fetchmailrc is the default config file and will be owned by you.
by scruss
Tue Apr 24, 2018 1:53 pm
Forum: General discussion
Topic: is calibri & Helvetica font usable?
Replies: 14
Views: 402

Re: is calibri & Helvetica font usable?

Is there any trickery to installing these fonts on the rpi? Haven't had the need up till now Once installed, is there anything that needs set/changed so that the rpi will actually use them in all apps? Nope. Just sudo apt install fonts-texgyre They won't look identical, but they'll have the same me...
by scruss
Mon Apr 23, 2018 2:27 pm
Forum: General discussion
Topic: is calibri & Helvetica font usable?
Replies: 14
Views: 402

Re: is calibri & Helvetica font usable?

… The best replacements for Helvetica, Times etc. are the GS fonts, which can be used by installing "gsfonts-x11". That might've been true until recently, but the URW++ fonts for gs are a bit old. The TeX Gyre fonts (in the fonts-texgyre package) are more up to date, and quietly replace Helvetica, ...
by scruss
Mon Apr 23, 2018 1:34 am
Forum: Troubleshooting
Topic: Need Help with CUPS Printing
Replies: 20
Views: 397

Re: Need Help with CUPS Printing

rather than messing with CUPS config files, the graphical Printer Config tool is much more fun:

Code: Select all

sudo apt install system-config-printer
It should show you any printers it recognizes on your network.
by scruss
Mon Apr 23, 2018 1:01 am
Forum: General discussion
Topic: is calibri & Helvetica font usable?
Replies: 14
Views: 402

Re: is calibri & Helvetica font usable?

I know a bit about fonts … and it's a little complex. There's not much overlap between a stock Raspberry Pi and Windows in the font department. Microsoft pays a lot of money to develop typography, the Raspberry Pi Foundation uses whatever it can get. The list of fonts installed on a stock Raspberry ...
by scruss
Sun Apr 22, 2018 12:26 pm
Forum: Beginners
Topic: Retro OS?
Replies: 6
Views: 226

Re: Retro OS?

I think OpenGEM's x86 only.

There are a couple of projects to boot straight into Amiga OS via (some version of) UAE. I think Amibian is one of them. You may have to dig a bit to find ones for a non 3B/3B+ board, as the developers seem to be obsessed with running on the most recent hardware versions.
by scruss
Sun Apr 22, 2018 12:21 pm
Forum: Python
Topic: pytz timezone conversion help
Replies: 3
Views: 99

Re: pytz timezone conversion help

I know you're likely removed the packages now, but changing this

Code: Select all

#!/usr/bin/python
to this

Code: Select all

#!/usr/bin/python3
probably would have fixed the problem.

pip3 installs packages for Python 3, pip for Python 2. /usr/bin/python is Python 2
by scruss
Wed Apr 18, 2018 12:07 am
Forum: General discussion
Topic: Harware Add-on Suggestions
Replies: 7
Views: 269

Re: Harware Add-on Suggestions

1 used to be a thing: the PiHub!
pihub.jpg
PiHub
pihub.jpg (20.45 KiB) Viewed 251 times
As Eben recently said, by not making all of these addons, lots of support companies are doing well. I don't think the Foundation would gain much from making these.
by scruss
Mon Apr 16, 2018 10:01 pm
Forum: Troubleshooting
Topic: SOLVED Serial read from a bluethooth (rfcomm) connection
Replies: 21
Views: 443

Re: Serial read from a bluethooth (rfcomm) connection

Either way, you're likely to still need to do something with stty or a Device:SerialPort baud rate/character size call. You get garbage with serial unless you do that.
by scruss
Mon Apr 16, 2018 9:48 pm
Forum: Python
Topic: writing I32 to binary file: endian-ness on R-Pi
Replies: 12
Views: 270

Re: writing I32 to binary file: endian-ness on R-Pi

While I can't disagree with using Audacity as a large ADC data set viewer, once you get your import parameters sorted it I find it much quicker to use SoX (in the standard Raspbian repos: sudo apt install sox libsox-fmt-all ) to do the conversion. As it works from the command line, you can ferret th...
by scruss
Sun Apr 15, 2018 3:40 pm
Forum: Troubleshooting
Topic: SOLVED Serial read from a bluethooth (rfcomm) connection
Replies: 21
Views: 443

Re: Serial read from a bluethooth (rfcomm) connection

@scruss: <$file_handle> is Perl-slang for readline ($file_handle) - a blocking read that fetches data up to and including the next newline character … Yes, I know. I've been a Perl programmer since … well, before cgi-lib.pl was a thing. I'm still learning, though. The thing about serial devices is,...
by scruss
Sun Apr 15, 2018 2:58 pm
Forum: General discussion
Topic: OTG device mode with external power
Replies: 2
Views: 104

Re: OTG device mode with external power

Even with Vbus cut, you'll likely get your Zero rebooting when you unplug the OTG cable.
by scruss
Sun Apr 15, 2018 12:52 am
Forum: Troubleshooting
Topic: SOLVED Serial read from a bluethooth (rfcomm) connection
Replies: 21
Views: 443

Re: Serial read from a bluethooth (rfcomm) connection

Yes, use Device::SerialPort . How would you expect your <$in_fid> to know when the end of a string was received with no timeout set in your code? I don't know if there are newer serial modules for Perl. It looks like the tied filehandle methods are the most idiomatic ways to read serial data under m...
by scruss
Sat Apr 14, 2018 8:05 pm
Forum: Troubleshooting
Topic: SOLVED Serial read from a bluethooth (rfcomm) connection
Replies: 21
Views: 443

Re: Serial read from a bluethooth (rfcomm) connection

please just do the minimal code: serial is serial, and the more code you give the less chance I'll understand it.
by scruss
Sat Apr 14, 2018 8:03 pm
Forum: General discussion
Topic: Simple Terminal
Replies: 5
Views: 317

Re: Simple Terminal

other small options: screen, cu (from uucp), picocom, com, miniterm (part of pyserial), …
by scruss
Sat Apr 14, 2018 7:44 pm
Forum: Linux Kernel
Topic: Issue installing Linux Headers
Replies: 5
Views: 268

Re: Issue installing Linux Headers

uname gives the version of the running kernel. If you haven't rebooted since updating, you'll still be running the old kernel.

The package the OP wants is raspberrypi-kernel-headers: no version required.
by scruss
Fri Apr 13, 2018 11:51 pm
Forum: Troubleshooting
Topic: SOLVED Serial read from a bluethooth (rfcomm) connection
Replies: 21
Views: 443

Re: Serial read from a bluethooth (rfcomm) connection

Drop a minimal example here, please. I'm an old Perlmonger.
by scruss
Wed Apr 11, 2018 2:39 am
Forum: Off topic discussion
Topic: Eugene’s fishing line header hack for Raspberry Pi Zero
Replies: 0
Views: 999

Eugene’s fishing line header hack for Raspberry Pi Zero

Eugene ‘thirtytwoteeth’ Andruszczenko (of Game Boy Zero – Handheld Edition fame) posted a neat idea to help your Raspberry Pi Zero take jumper wires without soldering. He threaded fishing line through the 40 hole header, making an interference fit for male header pins. I tried it with 0.38 mm Trilen...
by scruss
Mon Apr 09, 2018 7:41 pm
Forum: openSUSE
Topic: Installing OpenSUSE 64-bit on RPi3b+
Replies: 8
Views: 376

Re: Installing OpenSUSE 64-bit on RPi3b+

gilius wrote:
Mon Apr 09, 2018 7:15 pm
So you can see the problem with such Linux rhetoric? Nothing is properly documented anywhere...
Maybe the lack of user-friendly documentation is a sign that this process is not quite ready for public consumption?
by scruss
Mon Apr 09, 2018 2:19 pm
Forum: Beginners
Topic: Need a 3d model Raspberry pi 3B
Replies: 7
Views: 246

Re: Need a 3d model Raspberry pi 3B

In the Exported Versions folder, there's an STL.ZIP file. It contains the models as STL, which load happily into Meshlab.
by scruss
Mon Apr 09, 2018 2:49 am
Forum: Beginners
Topic: What are all these partitions?
Replies: 15
Views: 350

Re: What are all these partitions?

Yes, it's possible to use one partition on Linux. Just not on a Raspberry Pi that needs to boot from µSD, though. It's getting harder to do the single partition thing with EFI “BIOS”¹, though. This is my desktop computer: Filesystem Size Used Avail Use% Mounted on /dev/nvme0n1p2 468G 310G 135G 70% /...
by scruss
Sun Apr 08, 2018 10:13 pm
Forum: Troubleshooting
Topic: RASPBIAN STRETCH PROBLEMS
Replies: 23
Views: 3947

Re: RASPBIAN STRETCH PROBLEMS

Are you running a full (not lite), recent (sudo apt update ; sudo apt dist-upgrade) version of Stretch? If you cat /etc/os-release , it should show something like PRETTY_NAME="Raspbian GNU/Linux 9 (stretch)" and some other stuff. What's the output of vcgencmd get_camera ? On a Zero W running Stretch...
by scruss
Sun Apr 08, 2018 2:23 am
Forum: Troubleshooting
Topic: RASPBIAN STRETCH PROBLEMS
Replies: 23
Views: 3947

Re: RASPBIAN STRETCH PROBLEMS

… I went into the configuration menu on the gui selected enable for the camera, rebooted. and the camera still wasn't enabled. Have you checked the cable is inserted properly? Sounds like the Stretch installation can't find it. Enabling from command line is easier than the graphical way: sudo raspi...

Go to advanced search