Go to advanced search

by jojopi
Mon Feb 11, 2019 5:32 am
Forum: Debian
Topic: Porting Debian ARM to the Raspberry Pi
Replies: 6
Views: 189

Re: Porting Debian ARM to the Raspberry Pi

This thread is about porting vanilla Debian (not Raspbian) to the Raspberry Pi. My goal is to provide an armel image that boots on all Pi models, an armhf image that boots on the Pi 2 and 3, and an arm64 image that boots on the Pi 3. I would not call that porting Debian to the Raspberry Pi. I would...
by jojopi
Fri Feb 08, 2019 5:32 pm
Forum: Advanced users
Topic: Device Names of USB Serial ports
Replies: 4
Views: 114

Re: Device Names of USB Serial ports

There are standard udev rules that create predictably-named symlinks under /dev/serial/by-id/, based on the USB descriptors, and /dev/serial/by-path/, based on the physical port numbering. You will need to use by-path if the two devices are otherwise identical. The predictable names are a bit cumber...
by jojopi
Fri Feb 08, 2019 11:20 am
Forum: Beginners
Topic: how to delete accidently named files?
Replies: 5
Views: 133

Re: how to delete accidently named files?

Also: rm udo, then press [Tab⭾].

Tab completion is something you always want to be using for long file names, independent of whether they contain odd characters.

rm "udo or rm 'udo before pressing Tab will try to complete using quotes, instead of backslash escapes.
by jojopi
Fri Feb 08, 2019 8:36 am
Forum: Beginners
Topic: Remotely Changing Website Passwords
Replies: 2
Views: 57

Re: Remotely Changing Website Passwords

The key fob you are referring to would be something like RSA SecurID . That is a form of two-factor authentication, where to log in you need to both know the user's password and be in possession of their physical token. The token is designed so that it is impractical to extract the internal secret k...
by jojopi
Thu Feb 07, 2019 5:34 pm
Forum: Python
Topic: Deleting directory created by other user
Replies: 5
Views: 137

Re: Deleting directory created by other user

Write permission on a file allows you to modify the file. To remove or rename the file, you need write access to the containing directory. Similarly, write permission on a directory allows you to create and remove files inside it. To remove the directory itself you need write access to its parent. N...
by jojopi
Mon Feb 04, 2019 5:43 am
Forum: Python
Topic: Keyboard input
Replies: 13
Views: 436

Re: Keyboard input

Installation should be basically: sudo apt update sudo apt install python3-pip sudo pip3 install evdev The type field tells you if it is a key event or something else. The value field indicates whether a key event is up (0), down (1), or hold (2). I do not think there exist symbolic names for those ...
by jojopi
Sun Feb 03, 2019 2:23 pm
Forum: Troubleshooting
Topic: Cron Job running twice
Replies: 1
Views: 57

Re: Cron Job running twice

It is not running twice. The way the job is phrased, it requires two bash processes; one to set up the redirections and another to actually run the script. You could probably avoid that, but it is really not a significant cost. A bigger problem is that running cron jobs every single minute will prod...
by jojopi
Sat Feb 02, 2019 1:06 pm
Forum: Raspbian
Topic: Will there be a Devuan port for RPi1?
Replies: 23
Views: 4570

Re: Will there be a Devuan port for RPi1?

The images that will boot on Pi1/Zero are still armel, however. Expect them to be noticeably slower than Raspbian for anything that uses floating point. I also wonder whether Pi-specific stuff like the camera and various GPIO libraries will work. RPF/T have not supported armel userspace since the da...
by jojopi
Mon Jan 28, 2019 2:23 pm
Forum: Python
Topic: Keyboard input
Replies: 13
Views: 436

Re: Keyboard input

Python's struct module does not have a format character for the C type time_t. This makes it difficult to write a portable format string for parsing the event structure—we need to know whether time_t is 32bit or 64bit. The code in the original blog post will only work on 64bit Linux, and even then i...
by jojopi
Sun Jan 06, 2019 8:43 pm
Forum: Troubleshooting
Topic: Accidentally deleted Pi directory
Replies: 7
Views: 278

Re: Accidentally deleted Pi directory

I have accidentally deleted “Pi” directory inside ~/home Now I cannot login with user name pi and password “raspberry” You may not be able to log in using the GUI, but you should still be able to login in text mode. Press Ctrl+Alt+F2 to get to a text console: Raspbian GNU/Linux 9 raspberrypi tty2 r...
by jojopi
Sat Dec 29, 2018 4:23 am
Forum: C/C++
Topic: Little doubt on floating point precision
Replies: 7
Views: 498

Re: Little doubt on floating point precision

The Pi/Raspbian use IEEE754 binary floating point representation. The float type has 24 bits of precision, which is equivalent to around 7 significant digits in decimal. The double type has 53 bits, equivalent to 15 digits. A number such as 18736.845869 will be accurate enough if you calculate and s...
by jojopi
Tue Dec 18, 2018 3:05 pm
Forum: Bare metal, Assembly language
Topic: Unable to read directory content properly
Replies: 5
Views: 907

Re: Unable to read directory content properly

I added an entry point: entry: ldr r0, =slash bl list_entries mov r7, #1 // _exit svc #0 slash: .asciz "/" Now strace shows: open("/", O_RDONLY) = 3 getdents(3, /* 16 entries */, 272) = 260 write(1, " 4 bin\0\n", 15) = 15 getdents(3, /* 5 entries */, 272) = 88 write(1, " 4 lost+found\0\275\n", 23) =...
by jojopi
Mon Dec 17, 2018 4:26 am
Forum: Bare metal, Assembly language
Topic: Unable to read directory content properly
Replies: 5
Views: 907

Re: Unable to read directory content properly

How are you building this? There are undefined references to "utostr10" and "close_all", and no obvious entry point. If you have a complete binary, just run it in GDB, and it will tell you what instruction causes the SEGV and what values are in the registers. The Bare metal forum was renamed "Bare m...
by jojopi
Sun Dec 09, 2018 11:43 pm
Forum: Raspbian
Topic: Odd country, keyboard and language!
Replies: 7
Views: 718

Re: Odd country, keyboard and language!

But neither Raspbian nor Debian will allow you to use a language and country combination which are not available as a supported locale. POSIX allows you to have a different locale for each category. Depending on exactly what OP intended, it may work to have France as the fallback locale, but overri...
by jojopi
Tue Apr 03, 2018 2:29 pm
Forum: Troubleshooting
Topic: Symbolic linked directories and ".." - why though?
Replies: 1
Views: 195

Re: Symbolic linked directories and ".." - why though?

This is a special feature of the shell's "cd" command. It keeps track of the path names used to get to your current directory, and by default it implements ".." by taking off the last component, instead of following the real ".." file on disk. You can also use "cd -P .." to go to the physical parent...
by jojopi
Mon Mar 26, 2018 6:28 pm
Forum: Interfacing (DSI, CSI, I2C, etc.)
Topic: Accessing permission to open port /dev/ttyS0 for Serial communication
Replies: 7
Views: 7621

Re: Accessing permission to open port /dev/ttyS0 for Serial communication

[email protected]:~ $ sudo chmod 777 /dev/ttyAMA0 ACTION=="add", KERNEL=="ttyS0", MODE="0666" Let us not go crazy. 0666 or 0777 is never the right mode for anything. The problem here is that something else is using the device. That is why it is in group "tty" instead of "dialout". Disable serial shell in th...
by jojopi
Tue Mar 06, 2018 5:15 am
Forum: Troubleshooting
Topic: No logging output of python script at @reboot
Replies: 7
Views: 1071

Re: No logging output of python script at @reboot

Standard output is buffered by default. Terminal output is buffered by lines, but output to files is buffered in blocks. This program prints five characters every five seconds, so it will take well over two hours before there is 8KiB in the buffer and Python passes the data to the OS. However, when ...
by jojopi
Tue Feb 27, 2018 2:47 pm
Forum: Camera board
Topic: libjpeg62 wants to remove packages
Replies: 1
Views: 362

Re: libjpeg62 wants to remove packages

libjpeg62 was superseded by libjpeg62-turbo, which is almost certainly already installed. However, for building applications you may need the development package: sudo apt install libjpeg62-turbo-dev You do appear to have found a bug with the repositories. In Debian stretch, attempting to install li...
by jojopi
Wed Feb 14, 2018 4:22 pm
Forum: Off topic discussion
Topic: It *has* to happen!
Replies: 28
Views: 3904

Re: It *has* to happen!

And also a 5 in 6 chance of it not being the same, a 16777215 in 16777216 chance of not being the same for a pi. So if P = 16777215/16777216 then having two Pi's the probability of not being the same is P, three Pi's P*P, for four P*P*P etc, P^(N-1) With each additional selection there is one fewer...
by jojopi
Mon Feb 05, 2018 6:01 am
Forum: Raspberry Pi Desktop for PC and Mac
Topic: Files Are Compiled As Shared Libraries Instead Of Executables
Replies: 18
Views: 2416

Re: Files Are Compiled As Shared Libraries Instead Of Executables

The behavior is occurring because newer ubuntu distros set GCC default link flag -pie, which marks e_type as ET_DYN on the binary file. Consequently, the Operating System recognizes as Shared Library. You have not explained how this matters. Yes the compiler makes position independent executables b...
by jojopi
Tue Jan 23, 2018 2:24 pm
Forum: Troubleshooting
Topic: Directory listing Vulnerability at http://downloads.raspberrypi.org/weather_station/images/
Replies: 5
Views: 678

Re: Directory listing Vulnerability at http://downloads.raspberrypi.org/weather_station/images/

Whether that is a vulnerability or not really depends on how one views it. AFAICT no files are being exposed other than what were intended to be exposed. I do not see how it should ever be regarded as a vulnerability. If the files are supposed to be accessible to the public then there is no problem...
by jojopi
Mon Jan 22, 2018 1:31 pm
Forum: Beginners
Topic: Converting incoming messages to Unicode.
Replies: 5
Views: 811

Re: Converting incoming messages to Unicode.

I am not familiar with NRF24, but the results from printDetails() do seem wrong. For instance you asked for AutoAck, but EN_AA is zero. And the values for RF_SETUP and DYNPD appear to have reserved bits set. Do the printed rate and power values even change if you try to set them up differently? My g...
by jojopi
Thu Jan 18, 2018 2:53 pm
Forum: Advanced users
Topic: the key g (0x0a) does not work for USB HID gadget
Replies: 2
Views: 518

Re: the key g (0x0a) does not work for USB HID gadget

Why are you using bash? My guess is that the combination of shell redirection and echo -ne is causing the output to be line-buffered. \x0a is also the newline character \n, so the rest of the string is another line. Kernel device drivers and other pseudo files expect to get your complete request as ...
by jojopi
Thu Jan 18, 2018 11:59 am
Forum: Beginners
Topic: Internal pull up/down function explanation
Replies: 16
Views: 9323

Re: Internal pull up/down function explanation

You can measure the effect of the internal pulls on an output. If you drive a GPIO low but also load it to 3.3V with 330Ω, that gives about 300mV at the pin. Now you should see at least 1mV difference between each of the internal pull up, no pull, and pull down states. The level registers always rea...
by jojopi
Wed Jan 17, 2018 12:33 pm
Forum: Troubleshooting
Topic: Removing Kernel Warning
Replies: 12
Views: 1450

Re: Removing Kernel Warning

That message is considered an error, not a warning, and you asked for loglevel=3. You can decrease that further if you do not even want errors to go to console: loglevel= All Kernel Messages with a loglevel smaller than the console loglevel will be printed to the console. It can also be changed with...

Go to advanced search