embedded-linux

How are netlink sockets in the Linux kernel different from polling from userland?

孤街醉人 提交于 2020-01-04 03:52:17
问题 I have doubt about the functioning of netlink socket in kernel-application interaction context. As I have read that netlink socket is used for event based notification from kernel to application. The benefit of this is Application is not required to poll. But as in case of netlink socket also, it will also be polling finally to check whether some data has been sent from kernel. So my question is, how this functioning of netlink socket is different from Polling of file decriptor? I refered

How to communicate with the USB Host from a Linux USB Client

眉间皱痕 提交于 2020-01-03 03:44:26
问题 The host part will be a PC program made from c# in which I will use LibUSBdotnet to do the communication. My problem is how do I make the Linux side pickup and respond. I don't really know where to start. Whenever I try to search for it, all result show are "how linux communicates with a device attached to it". Or it does not matter if a device is host or client, because they utilize the same pipes/bus? Can I use something in "/dev/usb***"? I have seen "libusb" which I believe is the linux

How to get Disconnect Event from GATT Server on Bluez/Linux

杀马特。学长 韩版系。学妹 提交于 2020-01-02 10:25:32
问题 Environment: Bluez 5.14, Linux 3.1, USB Plugable BLE radio, TI BLE keyfob (CC2541 dev kit) Linux Device <---hci----> USB BLE Radio We enabled key press events on TI keyfob using gatttool and started to listen for events gatttool -b [hardware ID] --char-write-req -a [handle] -n [value] --listen (gatttool -b 90:59:AF:09:E1:5D --char-write-req -a 0x0048 -n 0100 --listen) Pressing buttons on the keyfob and see these events Notification handle = 0x0047 value: 02 Notification handle = 0x0047 value:

grabserial stops printing the log?

旧城冷巷雨未停 提交于 2020-01-02 10:00:12
问题 i tried Grabserial to measure the startup code of my embedded Linux device. It works somehow but after a while (that means a longer startup code - talking about > 26 s) it stops printing out the messages, but grabserial still is running - i have to hit the [CTRL-C] to retrieve control. I checked the serial port with putty and it's working so it's a problem with grabserial. But i can't think of what it is. I downloaded and installed with both of the 2 install-variants and it just changed the

P1010 MAC to Switch port direct connection without PHY

爱⌒轻易说出口 提交于 2020-01-02 09:55:44
问题 I have a custom board with freescale P1010 processor in which P1010's eTSEC2 ( Enhanced 3-speed Ethernet controller) port is directly connected to Marvell 88E6046 ethernet switch Port 9 in SGMII mode. Linux (3.17) DSA driver is able to probe and detect switch ( Port 9 is 'cpu' whereas port 0 and 1 are designated as 'lan1' and 'lan2'). The problem however is, that there is no PHY for switch to attach to ( 'ifconfig up' fails to attach to ethx). U-boot creates a 'generic PHY' eth0 since it

P1010 MAC to Switch port direct connection without PHY

余生颓废 提交于 2020-01-02 09:55:16
问题 I have a custom board with freescale P1010 processor in which P1010's eTSEC2 ( Enhanced 3-speed Ethernet controller) port is directly connected to Marvell 88E6046 ethernet switch Port 9 in SGMII mode. Linux (3.17) DSA driver is able to probe and detect switch ( Port 9 is 'cpu' whereas port 0 and 1 are designated as 'lan1' and 'lan2'). The problem however is, that there is no PHY for switch to attach to ( 'ifconfig up' fails to attach to ethx). U-boot creates a 'generic PHY' eth0 since it

Taking a Screen Shot of an Embedded Linux Framebuffer

假如想象 提交于 2020-01-01 11:50:36
问题 I'm running Embedded Linux on an evaluation kit (Zoom OMAP35x Torpedo Development Kit). The board has an LCD and I would like to be able to take screen shots convert them into a gif or png. I can get the raw data by doing the following: "cp /dev/fb0 screen.raw", but I am stumped on how to convert the image into a gif or png format. I played around with convert from ImageMagick (example: "convert -depth 8 -size 240x320 rgb:./screen.raw -swap 0,2 -separate -combine screen.png"), but have been

Debugging Linux Kernel using GDB in qemu unable to hit function or given address

自古美人都是妖i 提交于 2020-01-01 09:39:36
问题 I am trying to understand kernel bootup sequence step by step using GDB in qemu environment. Below is my setting: In one terminal im running ~/Qemu_arm/bin/qemu-system-arm -M vexpress-a9 -dtb ./arch/arm/boot/dts/vexpress-v2p-ca9.dtb -kernel ./arch/arm/boot/zImage -append "root=/dev/mmcblk0 console=ttyAMA0" -sd ../Images/RootFS.ext3 -serial stdio -s -S In other terminal arm-none-linux-gnueabi-gdb vmlinux Reading symbols from vmlinux...done. (gdb) target remote :1234 Remote debugging using

Individual thread priority checking using command line in linux

风格不统一 提交于 2020-01-01 06:10:06
问题 I can see number of threads used in application by going to /proc/$(pidof task)/ and giving cat status. Is there any way to check individual thread priority in linux using commands? Regards, Learner 回答1: Run ps with -m -l . It will list all the thread and priority with respect to particular PID ps -m -l [PID] Example: PC@PCuser:~$ ps -m -l 10070 F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD 0 - 1000 10070 1 0 - - - 31325 - ? 0:42 gedit 0 S 1000 - - 0 80 0 - - poll_s - 0:41 - 1 S 1000 -

How to modify kernel DTB file

依然范特西╮ 提交于 2020-01-01 03:12:07
问题 Summary I am currently compiling the Linux kernel (kernel, modules and DTB) with some custom drivers for a custom board. Occasionally I'll compile the kernel and realize that the compatibility string in the DTB file is not what the custom driver is looking for. Right now the only way i can remedy this is modify the DTS or kernel driver so the strings match and then recompile the kernel again. Is there are way I can just edit the DTB file to update the compatibility string? Failed Attempts I