Raspberry Pi, qt creator GUI executable issue - raspberry-pi

Created a GUI on Raspbian with qtcreator. Program runs in qt creator but executable does not run (i.e. trying to run it out of qt). Interestingly the same executable runs on a different Raspberry Pi.
Both Pi's have qt creator installed, same versions, etc. When you click run in qt creator the program appears to run fine. I will note that the second Pi (the one with the issue) is the Pi 2 and the original one is the previous model.
Interestingly the Size on disk of the first one is around 1.4mb and the total size of files is 175.2kb. However the second is 175.2kb for both.

Related

"ship" a program (i.e. a program image) to run in another linux computer

I hope this question makes sense. I have a program that I have compiled in an ubuntu machine that works fine. I cannot do the same in a pc with manjaro. Is it possible somehow "to ship" my working program from the ubunto to the manjaro machine?
Somehow I think that with docker I can do this, but many examples in the web seem pretty involved for my task (which it seems to me it's an easy one... hopefully...).

Raspberry Pi Pico Keeps Ejecting

I've just gotten my Raspberry Pi Pico and am trying to get it ready to accept code. I've tried dragging and dropping MicroPython from the webpage and using Thonny to handle it automatically, but when I do either, it ejects itself and nothing has loaded. I'm trying to do this from a Pi 4. Any help would be greatly appreciated.
This is how I do it (but not on a RaspPI)... hold the BootSel button on the Pico and then plug it in. A new "disk" should appear to the OS (or on the desktop). Drag the Micropython UF2 file onto the new disk - this installs Micropython on the Pico. The file gets copied, the Pico saves it to flash, and the "disk" ejects itself.
Now, in Thonny, you have to select the correct board (Pico) and the correct serial interface device (/dev/it-depends-on-your-system). The Thonny page has notes for this. At this point, with Micropython, we talk to it over the serial line, not as a disk.
HTH.
I really does sound as if you are trying to install MicroPython without downloading it and/or to run a MicroPython program without installing the MicroPython system. You first have to install the MicroPython system, download a uf2 file, and only then can you install and run a MicroPython program using Thonny.
Answering here because I had trouble getting mine to work too. In my case, I somehow got my pico into such a state that Mass Storage Device mode would randomly disconnect / eject, often before I could even drag a new UF2 file to the device.
Since I didn't have the time to be successful with drag/drop before the device disconnected, I built and used picotool to push the "nuke memory" UF2 file (see link here). (BOOTSEL held down, plugin, hit enter on the terminal to run ASAP before the pico disconnects)
I actually had to do this two or three times, but after that it stopped being weird and Mass Storage mode works correctly again; I was able to install the MicroPython UF2 file with the normal drag and drop method and Thonny no longer disconnects.

How do I get GTK based GUI in a Yocto project?

I am developing a kiosk type application using Yocto and a raspberry pi3. I have an hdmi touchscreen attached and have a USB keyboard attached for development only. My problem starts when I try to start GTK in one of my processes.
My project involves creating the kernel, has several processes running for various tasks, and will have a touchscreen GUI based on GTK+3 (using Glade).
My kernel is working and my processes are running and able to communicate with each other. But, now I'm having problems getting any kind of graphical output on the screen. Right now, all I have is console access as root.
When I start my 'display-mgr' process it tries to start up GTK. When it tries to 'gtk_init()', I get:
Gtk-WARNING ++: ...timeinfo...: cannot open display:
I've tried the usual 'export DISPLAY' stuff, but it looks like I don't even have the Xserver installed on the board.
I have:
DEPENDS = "libconfig pkgconfig-native gtk+ gtk+3 glib-2.0 libxml2 gnome-common glade"
in the recipe for my process. I also have: DISTRO_FEATURES_append = " x11" in my image recipe. Is there some package that I've missed?
I would recommend you start with core-image-sato from poky distro, and gradually replace the pieces. Alternatively, use core-image-weston, which would use that instead of x11.

Persistent error coming from libusb0

I'm using a Python application that accesses a USB device (pipsta printer) and executes a routine. It's running fine outside the container, but when it comes to the container it returns a error like this:
(File "usr/local/lib/python2.7/dist-packages/usb/backend/libusb0.py", line 386, in _check:
raise USBError(errmsg, ret)
USB.core.USBError: [Errno None] couldn't opendir(): No such a file or directory)
In my dockerfile, I've included all the packages relevant to Python and USB, and I also moved the relevant files to /etc/udev/rules.d and restarted udev.
Make sure you:
followed every step from assembly instruction and https://bitbucket.org/ablesystems/pipsta/wiki/Pipsta%20First-Time%20Setup
printer is connected to the power
printer is connected via usb to raspberry
printer's led doesn't blink (should be green constantly)
proper usb library is installed (or try to install different version of the usb library). What version are you using? python: print(usb.__version__) , it works fine for me with version 1.0.0rc1
is printer visible to the os? command: ls /dev/ap1400
I know this is an old question (I've only just encountered it). The following is a paraphrasing of the FAQ. The following steps should help diagnose the problem.
Download the latest set of Pipsta examples..
Extract the contents of the zip file.
Change directory to where the files were extracted
Change directory to the Examples folder.
Using a terminal run the command python verify_pipsta_install.py. This will try and help diagnose problems.
The following will should fix the python usb library error.
If your Pipsta printer firmware is V9.2.03 please upgrade the firmware to V9.2.08 using the fpu (both can be found in the downloads section of bit bucket.
Install the latest version of the Pipsta examples (download from bitbucket).
Copy the new pipsta/Examples/system_scripts/ to /etc/udev/rules.d/60-ablesystems-pyusb.rules
Restart the Raspberry Pi
If the printer still fails to be discovered then -
The following workaround may work.
1. Unplug the printer from the USB port
1. Enter the command sudo lsusb
1. Reconnect the printer
1. Enter the command sudo lsusb
If the printer has been detected by the Linux environment then either /dev/ap1400 or /dev/pipsta should exist in the filesystem.
NOTE The Pipsta now has Debian packages to help with installation. I have a link limit on my account but search for pipsta-printer-utilities-1.1.1-Linux.deb and pipsta-cups-driver-0.3.0-armhf.deb for more information.

Why Arch Linux is not booting using raspberry pi board?

I recently got my pi board and started working on it. I decided my first aim to install a OS image on SD card and boot from it. So i downloaded Arch Linux image file in zip format from here http://www.raspberrypi.org/downloads.
After that i installed .img file in my SD card Verbatim 8GB (I do not know why 4hr is also written here ?) using Ubuntu 12.04LTs . I used following commands :
sudo umount /dev/sdb1
sudo dd bs=1M if=/path/to/img/file of=/dev/sdb
After successful installation , when i tried to boot from it using PI board , then my monitor shows NO SIGNAL , i checked all the cables and i also borrowed another SD card from my friend preloaded with Raspbian , it was working fine, that is problem is with installation.So i again put SD card in my Laptop and i got surprised that it is not detecting it. I used Gparted , it shows unknown file system error.I again tried but the problem remain same .
Now my questions are :
How to install Arc Linux image in SD card ?
Why it is showing unknown file system after installing Arch Linux ?
After loads of Googling, I am convinced that we are not the only ones with this problem and probably the problem is with the 2014.01 and 2014.02 image itself. I myself spent around 4 hours thinking I am going wrong somewhere. Downloading another image from http://archlinuxarm.org should help.