linux-device-driver

Android How to scan for hidden access points

大憨熊 提交于 2019-12-11 18:15:28
问题 how can i do programmatically scan for hidden Wireless Access Points, in android ? getScanResults give me only visible Access Points , but i need to discover hidden too. When programmatically scanning Wi-Fi networks (using WifiManager.startScan() and WifiManager.getScanResults() ), when the SSID broadcast is disabled on an access point and the access point has never been connected to the device, the ScanResult element for this access point does not appear in the list of access points returned

Access PCI memory BAR with low latency (Linux)

醉酒当歌 提交于 2019-12-11 17:47:37
问题 Background: I have a PCI card, which is basically a clock. It gets the time by GPS and saves the current time in a certain register. Goal: I want to read a limited number of registers/bytes (for example the current time) over and over again, with the lowest possible latency . (The clock provides very high precision and I think I will loose precision the higher the latency is.). The operating system is RedHat. The programming language is C/C++. I also want to write to the device memory,

Mipi Csi2 Error: could not get clock csi_mclk

家住魔仙堡 提交于 2019-12-11 17:18:11
问题 I have been working on writing mipi csi-2 imx290 camera driver. I have faced with csi_clock error. This is my imx290_probe function; static int imx290_probe(struct i2c_client *client, const struct i2c_device_id *id) { struct device *dev = &client->dev; int retval; int value; /* request reset pin */ xclr = of_get_named_gpio(dev->of_node, "rst-gpios", 0); if (!gpio_is_valid(xclr)) { dev_warn(dev, "no sensor reset pin available"); return -EINVAL; } retval = devm_gpio_request_one(dev, xclr, GPIOF

Insmod is not working

我只是一个虾纸丫 提交于 2019-12-11 16:27:44
问题 insmod / rmmod doesn't recognize the arguments. Even insmod without any argument also gets executed. It looks like only command is recognized by the system. Through insmod command kernel module can be inserted dynamically but when I do insmod testStub.ko , nothing is happening. Neither do I see my module in lsmod result nor any printk messages that I have written in my testStub.c , in dmesg . lsmod / modprobe -l also don't show any output. lsmod command is supposed to show all running modules

How to get Ubuntu/Raspian to recognise a Crouzet Millenium 3 PLC as tty device

一个人想着一个人 提交于 2019-12-11 15:17:41
问题 When I connect the 'Crouzet - Millenium 3 PLC' to my Ubuntu laptop via a USB serial cable the following dmesg output is given: [ 3494.555189] usb 1-2: new full-speed USB device number 21 using xhci_hcd [ 3494.711593] usb 1-2: New USB device found, idVendor=0403, idProduct=7d51, bcdDevice= 6.00 [ 3494.711596] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 3494.711598] usb 1-2: Product: Millenium 3 USB cable [ 3494.711600] usb 1-2: Manufacturer: Crouzet Automatisme SAS [

device and drivers connections

最后都变了- 提交于 2019-12-11 15:05:45
问题 There is a device that is connected to the controller uart port (in Linux 2.6), and which generates an interrupt on gpio. I wrote the driver of the Space user to communicate with the device, but I want to move this driver into the kernel. Does anyone have a similar experience? There is a driver of uart port from freescale do not really understand how this driver connects to the device through function probe (). Not yet found where the structure of the device is created and at what point and

YOCTO : Modify Linux OS features by editing it's device tree

我只是一个虾纸丫 提交于 2019-12-11 15:03:36
问题 I am using YOCTO project SUMO release to Build Linux kernel for my embedded board. I want to customize the features of my board. They told me to edit the device tree file. My question is what is the path of this DT file ? And when i modify it, I must rebuild all the kernel using Bitbake ? Thanks. 回答1: Create the following tree in your layer meta-custom: recipes-kernel/ └── linux ├── linux-at91 │ ├── 0001-my-custom-dt.patch └── linux-at91_%.bbappend In linux-at91_%.bbappend , put

Using DMA API in linux kernel but channel is never available

邮差的信 提交于 2019-12-11 11:12:39
问题 I am trying to use dmatest.c to test DMA in intel xeon server and regular laptop with i7 processor. It is never been able to get a channel - I found this out by debugging the dmatest.c itself. Line 854 below is always executed (I put my own printk there). Is there anything I should do to get this API to work before executing (such as dma modules or anything?) Or, do I use wrong API set? On the Xeon server, I did research and it has ioatdma.ko module that can be loaded. modprobe ioatdma and

Device node access permissions in Linux

那年仲夏 提交于 2019-12-11 10:34:44
问题 I'm writing a char device driver for embedded android. The device module, register itself as a char device, and a corresponding device node is created under /dev . The problem is that the access permissions for this device is for root, and I can't read it from android applications (JNI). I have to manually "chmod +r" the device before running the application. How can I decide the access permission of a dynamically created device node ? 回答1: If your device registers itself using udev, which is

Android: pcm_open failed cannot open device '/dev/snd/pcmC0D1p'

我怕爱的太早我们不能终老 提交于 2019-12-11 10:01:17
问题 A custom piece of hardware is running Android with the audio drivers installed. An simple Android app is created to play some audio using media player, the app is tested on a emulator so it works for sure. When running the device on the hardware, error message from logcat displays the following many times: 01-01 01:09:16.355 2792-3186/? E/audio_hw_primary﹕ pcm_open(PCM_CARD) failed: cannot open device '/dev/snd/pcmC0D1p': No such file or directory 01-01 01:09:16.375 2792-3186/? E/audio_hw