use GPIO sysfs in Ubuntu 14.04 with kernel 3.14.1 - linux

I am trying to get a viperboard USB GPIO board running on ubuntu.
I already got a newer kernel, because I understood that the 3.13 kernel doesn't support the viperboard so well.
What I want to do is to use the /sys/class/gpio sysfs interface for GPIO so I can develop raspberry pi projects on my PC and then use them
on my RPi.
My Problem - the /sys/class/gpio directory is missing.
The config of the kernel shows:
CONFIG_GPIO_SYSFS is not set
Does this mean I have to compile a new kernel?

I just had to recompile the kernel with CONFIG_GPIO_SYSFS set; now I see the /sys/class/gpio directory. Ubuntu does not enable gpio sysfs by default.

I solved my Ubuntu-GPIO problems with the pigpio library.
It runs a daemon started with sudo, which is controlling the GPIO pins. A client program (started without sudo) communicates with the deamon and thus indirectly controls the pins.
You can even run the client on a remote machine. This way a ROS node can control the GPIO pins of a remote raspberry, which itself isn't even running ROS.
See this and this post for reference.

Related

PPP over ttyUSB device

i have up ruining machine with Slackware 14.02 kernel 4.4.131
i want to compile my own kernel in to the machine, how ever i don't have the kernel .config file, so i'm using generic one from the Slackware website.
after the kernel boot i'm stack on the pppd proces that the device is runing, with the error massage:
/usr/sbin/pppd: unrecognized option 'ttyUSB2'
pppd version 2.4.7
what seem that the pppd cannot open terminal over the ttyUSB2 connection. and that why i don't have keyboard. however at the builtin kernel the pppd is establishing connect and things working well
i tried to enable all the cnonfig of the ppp at the .config file
CONFIG_PPP=y
CONFIG_PPP_BSDCOMP=y
CONFIG_PPP_DEFLATE=y
CONFIG_PPP_FILTER=y
CONFIG_PPP_MPPE=m
CONFIG_PPP_MULTILINK=y
CONFIG_PPPOATM=m
CONFIG_PPPOE=y
CONFIG_PPTP=m
CONFIG_PPPOL2TP=m
CONFIG_PPP_ASYNC=y
CONFIG_PPP_SYNC_TTY=y
Thanks

How to build and run Ubuntu 16.04 kernel with a specific module?

I installed Ubuntu 16.04 on Nvidia Tegra TK board (arm architecture).
Then I connected touchscreen from STMicroelectronics STMPE to it.
But generic kernel does not include the module for this touchscreen.
So, I guess I need to rebuild the kernel.
What is the recommended way to do this?
Should I do it with make menuconfig or fakeroot debian/rules?
Please describe it in details, step by step.
Thanks!

Linux boot with usb 3G modem enabled as ttyACM0 device

im running Ubuntu 14.04.1 LTS (desktop), on an embedded device (Odroid U3) and
on boot, my 3G usb modem is seen as a ttyACM0 / ttyACM1 device, which is correct.
Post boot i am able to simply run wvdial..and from there I can get a connection...
I am running my system headless, and would ideally like to get the OS "converted" to more
of a server configuration(smaller) if possible. I have tried running the
the ubuntu server version here viewtopic.php?f=77&t=5123, along with
multiple versions of debian(7 / 7.4) but neither will detect the usb modem correctly on boot.
I am a newbie to linux, and the only thing that I have tried is
trying to force load some of the kernel modules on boot ( /etc/modules ) to try to
alter the detection of the device on boot. (cdc_acm, usbserial, ppp....etc), no luck.
On the ubuntu server version above I even updated the kernel to
version newer than the one currently on the working desktop version, still no luck,
Does anyone have experience with usb 3G modem detection on boot??,
Any ideas why it works on the 14.04.1 LTS desktop version , and not any others?,
thanks a ton...for any suggestions
Appears that there is a patch in 14.04 ubuntu boot that fixes the usb_modeswitch issues. After taking a raw ubuntu , adding usb_modeswitch , its now working just fine.
Did not even have to configure usb_modeswitch.

Can`t find ttyUSB[id]

I have just started with my Raspberry Pi and I have a project where I want to read data from the USB port. I have installed Java JDK8 and written the program that compiles and run. But I get the message that /dev/ttyUSB1 does not exist.
I just have a cable from the USB port on the Arduino going to the USB port on the RPi and I am using Raspbian Debian Wheezy
When I go to DIR /dev/ and use $ ls, I can only find tty0 up to tty63. I have searched on the internet and some say that you can use ttyAMA0, but this does not work. I have also searched for the same problem, but have not found a answer to my problem.
I have used $ lsusb which gave me 4 devices (001-004) on Bus 001. I can see that, for example, my USB keyboard is listed as Bus 001 Device 004: ID 1532:010b Razer USA, Ltd.
and if I run $ dmesg | grep Manufacturer I get that:
[xxxxxxxxx] usb 1-1.2: Manufacturer: Razer
So my question is why does my usb devices not get listed as ttyUSB[id]? Do I have to manually attach it?
I am a bit noob when it comes to Linux.
Hope someone can help me!
I have some bad news for you. The reason you have no /dev/ttyUSB[n] devices on the RPi (when you connect your Arduino) is because you need the Arduino drivers (FTDI drivers in particular). The unfortunate thing is that these drivers don't yet exist for the Arm platform (which includes the RPi). This is according to the FTDI web page showing support. Note the lack of Linux driver support for Arm.
Apparently on Arm running Linux the only way to program the Arduino is via the serial port interface directly via the GPIO pins. Information on doing this can be found here . You will also have to do something similar on the Arduino side see this information.
Once you have the two devices connected via straight serial then your going to probably run into another SNAFU. By default apparently on the RPi Linux will use the serial port for sending debug/console output. In order to use the serial interface for something that behavior has to be modified. This article discusses that. In particular disabling the kernel from using the serial port for terminal use this would seem to apply:
The following steps (based on a clean 2012-07-15-wheezy-raspbian install
Open a terminal on the Raspberry, or connect to Raspberry Pi through SSH.
Make a backup of the /boot/cmdline.txt file.
sudo cp /boot/cmdline.txt /boot/cmdline_backup.txt
Edit /boot/cmdline.txt file:
sudo vi /boot/cmdline.txt
This file contains:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 $
Remove the parameters that reference the UART serial port (ttyAMA0):
dwc_otg.lpm_enable=0 console=tty1 $
Comment next line in /etc/inittab:
T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100
Reboot Raspberry Pi
sudo reboot
If you use a different Linux distro than Debian it would be different but the basics would still apply (modifying the kernel command line)

Build a minimum system with Qt embedded and run on Qemu for x86

My aim: Trying to
Build a minimal Qt based GUI system with a single window and sensor connected on USB
demonstrate this using Qemu and later on embedded board with atom
to build it from scratch
Use buildroot to build the rootfilesystem
My experience Have experience in Linux kernel development for device drivers, qemu, Buildroot, USB but has no experience on GUI and framebuffers.
My attempts:Build kernel and rootfile system
with buildroot using the command make qemu_x86_defconfig
Framebuffer support on Linux kernel is enabled along with the following CONFIG_FB, CONFIG_FRAMEBUFFER_CONSOLE, and CONFIG_LOGO (all the options below this are also enabled)
As the first milestone I expected to see the TUX logo when I run the image with the command
qemu-system-i386 -M pc -kernel output/images/bzImage -drive file=output/images/rootfs.ext2 -append root=/dev/sda -vga std but i donot.
Am I making a mistake at the Qemu command or the framebuffer is not enabled?
P.S. A similar question Qt application GUI -- automatic start -- linux. But i am not planning to use the X window as suggested by most users.
I missed the cirrus graphics board driver. Qemu emulates Cirrus CLGD 5446 PCI VGA card or dummy VGA card with Bochs VESA extensions (hardware level, including all non standard modes for i386.
So the steps are:
Download buildroot
make clean
make qemu_x86_defconfig
make linux-menuconfig to configure kernel and in Device drivers->Graphics support->Support for frame buffer devices enable Cirrus Logic support
Save the configuration and run make
Once make is complete run the command in board/qemu/x86/readme.txt
Where did you see that Buildroot has a i386_defconfig? You seem to be confusing kernel defconfigs and Buildroot defconfigs. I would recommend you to start with:
make clean
make qemu_x86_defconfig
make
and then read board/qemu/x86/readme.txt to see how to run the generated system.

Resources