I had a RPi setup with 1 FTDI cable. I was able to use /dev/ttyUSB0 in code without issues
When I plugged in a second FTDI cable, with the same vendor and product ID, /dev/ttyUSB1 never showed up, instead I lost /dev/ttyUSB0
lsusb shows that both devices are enumerated correctly.
Now, even when I plug in just one FTDI cable, /dev/ttyUSB0 still does not show up!
How can I get back the ttyUSB0 and ttyUSB1?
Here is the output from dir /dev lsusb and dmesg
Thanks,
pi#raspberrypi:~ $ dir /dev
autofs hwrng loop6 null ram2 serial1 tty13 tty23 tty33 tty43 tty53 tty63 vc-mem vcsa3
block initctl loop7 ptmx ram3 shm tty14 tty24 tty34 tty44 tty54 tty7 vcs vcsa4
bus input loop-control pts ram4 stderr tty15 tty25 tty35 tty45 tty55 tty8 vcs1 vcsa5
cachefiles kmsg mem ram0 ram5 stdin tty16 tty26 tty36 tty46 tty56 tty9 vcs2 vcsa6
char log memory_bandwidth ram1 ram6 stdout tty17 tty27 tty37 tty47 tty57 ttyAMA0 vcs3 vcsm
console loop0 mmcblk0 ram10 ram7 tty tty18 tty28 tty38 tty48 tty58 ttyprintk vcs4 xconsole
cpu_dma_latency loop1 mmcblk0p1 ram11 ram8 tty0 tty19 tty29 tty39 tty49 tty59 ttyS0 vcs5 zero
disk loop2 mmcblk0p2 ram12 ram9 tty1 tty2 tty3 tty4 tty5 tty6 urandom vcs6
fb0 loop3 mqueue ram13 random tty10 tty20 tty30 tty40 tty50 tty60 vc-cma vcsa
fd loop4 network_latency ram14 raw tty11 tty21 tty31 tty41 tty51 tty61 vchiq vcsa1
full loop5 network_throughput ram15 serial0 tty12 tty22 tty32 tty42 tty52 tty62 vcio vcsa2
pi#raspberrypi:~ $ lsusb
Bus 001 Device 005: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 004: ID 0403:6001 Future Technology Devices International, Ltd FT232 USB-Serial (UART) IC
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
…. dmesg
[ 208.091689] usb 1-1.5: new full-speed USB device number 5 using dwc_otg
[ 208.219273] usb 1-1.5: New USB device found, idVendor=0403, idProduct=6001
[ 208.219296] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 208.219309] usb 1-1.5: Product: FT232R USB UART
[ 208.219322] usb 1-1.5: Manufacturer: FTDI
[ 208.219334] usb 1-1.5: SerialNumber: A5052N9Z
Your udev rule should control device node creation, try this one.
Related
The Samsung PM1733/1735 NVMe SSDs declare the SR-IOV supports. And I hope to set up a NVMe SR-IOV environment with a PM1735 SSD. The dev description of my SSD is /dev/nvme1.
However, I tried with commands like
echo 4 > /sys/class/nvme/nvme1/device/sriov_numvfs.
The dmesg information contains that
[ 1239.732278] nvme nvme2: pci function 0000:86:00.1
[ 1239.732359] nvme 0000:86:00.1: enabling device (0000 -> 0002)
[ 1239.732365] pci 0000:86:00.2: [144d:a824] type 00 class 0x010802
[ 1239.733053] iommu: Adding device 0000:86:00.2 to group 164
[ 1239.733402] nvme nvme3: pci function 0000:86:00.2
[ 1239.733473] pci 0000:86:00.3: [144d:a824] type 00 class 0x010802
[ 1239.733477] nvme 0000:86:00.2: enabling device (0000 -> 0002)
[ 1239.734117] iommu: Adding device 0000:86:00.3 to group 165
[ 1239.734485] nvme nvme4: pci function 0000:86:00.3
[ 1239.734557] pci 0000:86:00.4: [144d:a824] type 00 class 0x010802
[ 1239.734782] nvme 0000:86:00.3: enabling device (0000 -> 0002)
[ 1239.735066] iommu: Adding device 0000:86:00.4 to group 166
[ 1239.735352] nvme nvme5: pci function 0000:86:00.4
[ 1239.735631] nvme 0000:86:00.4: enabling device (0000 -> 0002)
[ 1270.289730] nvme nvme2: Device not ready; aborting initialisation
[ 1270.289794] nvme nvme2: Removing after probe failure status: -19
[ 1270.293724] nvme nvme4: Device not ready; aborting initialisation
[ 1270.293727] nvme nvme5: Device not ready; aborting initialisation
[ 1270.293732] nvme nvme5: Removing after probe failure status: -19
[ 1270.293783] nvme nvme4: Removing after probe failure status: -19
[ 1270.297647] nvme nvme3: Device not ready; aborting initialisation
[ 1270.297703] nvme nvme3: Removing after probe failure status: -19
The lspci | grep Non can find that
86:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a824
86:00.1 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a824
86:00.2 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a824
86:00.3 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a824
86:00.4 Non-Volatile memory controller: Samsung Electronics Co Ltd Device a824
Are the VFs correctly created?
And another question is how can I bind the namespaces with the VFs. I used nvme-cli to create namespaces from the /dev/nvme, but how can I bind these namespaces with VFs?
Allocate VQ and VI using nvme cli command nvme virt-mgmt and enable that controller and export that vf to vm.
example commands
nvme list-secondary /dev/nvme1n1 --> output of list of all secondary controllers
nvme virt-mgmt /dev/nvme1n1 -c 1 -r 0 -n 2 --> allocate 2 VQs for secondary controller 1
nvme virt-mgmt /dev/nvme1n1 -c 1 -r 1 -n 2 --> allocate 2 VIs for secondary controller 1
nvme virt-mgmt /dev/nvme1n1 -c -a 9 --> enable secondary controller 1
nvme list-secondary /dev/nvme1n1 --> check first entry is updated and now shows as online.
Now export this vf to vm.
You might need to check nvme spec 1.4 (page 320, section 8.5 Virtualization Enhancements). I guess you also need to configure VQ and VI).
vitaliy-kachmar
You will still see in host as "Initialization Aborted" for VFs.
After VI and VQ and online variables are set, now you can export the VF to a Guest OS/hypervisor. In Guest OS, you can check that nvme block device is generated, as soon as OS startup completed.
First create nvme namespaces using nvme create command and then attach using nvme attach-ns to the controller, create single or multi-namespaces, then create VF and try export.
To export VF to VM.
Install virt-manager and install Guest OS (centos or unbuntu etc..) in virt-manager, i used Ubuntu. you can also refer - https://help.ubuntu.com/community/KVM/VirtManager
Now, you have VFs and VMs.
To export, select any Guest OS
select open and select add-hardware option in new window and select PCI and add one of VF 0000:86:00.1/2/3/4 device
Run guest OS.
In lsblk you will find one char device /dev/nvme0 and block devices /dev/nvme0n1 and now you can run fio on the block device
I'm trying to send AT commands to a Huawei E3372 USB Dongle but I haven't figured out how to mount correctly.
If I do lsusb, I get the following:
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0
Bus 001 Device 003: ID 03f0:034a HP, Inc Elite Keyboard
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
The dongle is listed, I can also access it's configuration screen on 192.168.1.1 and I can access internet.
I have tried creating the config file:
sudo nano /etc/usb_modeswitch.d/12d1:14db
and entered the following configuration
TargetVendor=0x12d1
TargetProduct=0x14db
MessageContent="55534243123456780000000000000011062000000100000000000000000000"
NoDriverLoading=1
I have tried various configurations found on the web but none seems to work.
/dev/tty /dev/tty19 /dev/tty3 /dev/tty40 /dev/tty51 /dev/tty62
/dev/tty0 /dev/tty2 /dev/tty30 /dev/tty41 /dev/tty52 /dev/tty63
/dev/tty1 /dev/tty20 /dev/tty31 /dev/tty42 /dev/tty53 /dev/tty7
/dev/tty10 /dev/tty21 /dev/tty32 /dev/tty43 /dev/tty54 /dev/tty8
/dev/tty11 /dev/tty22 /dev/tty33 /dev/tty44 /dev/tty55 /dev/tty9
/dev/tty12 /dev/tty23 /dev/tty34 /dev/tty45 /dev/tty56 /dev/ttyAMA0
/dev/tty13 /dev/tty24 /dev/tty35 /dev/tty46 /dev/tty57 /dev/ttyprintk
/dev/tty14 /dev/tty25 /dev/tty36 /dev/tty47 /dev/tty58
/dev/tty15 /dev/tty26 /dev/tty37 /dev/tty48 /dev/tty59
/dev/tty16 /dev/tty27 /dev/tty38 /dev/tty49 /dev/tty6
/dev/tty17 /dev/tty28 /dev/tty39 /dev/tty5 /dev/tty60
/dev/tty18 /dev/tty29 /dev/tty4 /dev/tty50 /dev/tty61
No more luck with dmesg | grep ttyUSB that returns nothing (same for USB0, USB1,...)
It's probably something wrong in the config file but I don't see exactly what needs to be done.
Any idea ?
Thanks!
You attach wrong lsusb output. The dongle is not listed.
Perhaps the device code 14db and accessible 192.168.1.1 looks like your modem is switched to newest mode where the dongle looks like router. If you would like to send AT command then you must change mode to serial. First of all try it through:
/etc/usb_modeswitch.conf
The last part of the file contain your desired option:
HuaweiAltModeGlobal=0
Notice the comment above this option:
...you can globally set an alternative method here which provides a
different mode: either plain serial PPP...
Just try to change number. There should be around 6 modes and one of them will switch your dongle to serial mode.
Best luck.
I am trying to interface the TL-WN722N to a Altera Cyclone SoC. I have taken the following approach:
Downloaded the open firmware ath9k_htc and try integrating it to my linux kernel image to be loaded.
a. https://wiki.debian.org/ath9k_htc/open_firmware: The steps here mention to build the toolchain and the firmware and then place it in /lib/firmware.
b. Built the linux kernel using the steps mentioned here : https://rocketboards.org/foswiki/Documentation/GSRDCompilingLinux
The firmware obtained in step a. was placed into /linux-socfpga/firmware , since there was no firmware folder in directory /lib/.
c. The image created was flashed and the wifi dongle was plugged in.
2.Here is a dmesg output for the cyclone board :
[ 2.223039] usb 1-1: New USB device found, idVendor=0cf3, idProduct=9271
[ 2.229735] usb 1-1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[ 2.237129] usb 1-1: Product: USB2.0 WLAN
[ 2.241124] usb 1-1: Manufacturer: ATHEROS
[ 2.245215] usb 1-1: SerialNumber: 12345
[ 5.351145] EXT4-fs (mmcblk0p2): recovery complete
[ 5.359958] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 5.368058] VFS: Mounted root (ext3 filesystem) on device 179:2.
[ 5.375560] devtmpfs: mounted
[ 5.379310] Freeing unused kernel memory: 1024K (c0900000 - c0a00000)
**[ 5.670820] systemd[1]: Failed to insert module 'autofs4': No such file or directory**
[ 5.722709] systemd[1]: systemd 226 running in system mode. (+PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT +GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD +IDN)
The linux is able to identify the Atheros usb device. However the driver module is not loaded. I have verified this using lsmod and it returns nothing. The commands ifconfig and ip a also returns no wireless connection.
Also when I see the path /lib/modules/.../kernel/drivers/net I observe only 2 modules ethernet and mdio.ko
Kernel version : 4.1.33-ltsi-altera
Does that mean that my driver is missing in the image? What could be the possible reasons for this issue? Does anyone have any other solution to this issue?
Edit:
I could find the linux drivers in /sys/bus/usb/drivers/ath9k_htc and the corresponding modules in /sys/module/ath9k_htc
So basically, the modules are configured static.
Now when I boot up the system, I find an error saying that the requested firmware is not found.
I have already placed the required firmware(htc_9271-1.4.0.fw & htc_9271.fw) in /lib/firmware/ath9k_htc
Here is the error :
[ 2.002205] usb 1-1: new high-speed USB device number 2 using dwc2
[ 2.262666] usb 1-1: New USB device found, idVendor=0cf3, idProduct=9271
[ 2.269348] usb 1-1: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[ 2.276730] usb 1-1: Product: USB2.0 WLAN
[ 2.280724] usb 1-1: Manufacturer: ATHEROS
[ 2.284815] usb 1-1: SerialNumber: 12345
[ 2.289370] usb 1-1: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[ 2.297203] usb 1-1: Direct firmware load for ath9k_htc/htc_9271-1.4.0.fw failed with error -2
[ 2.305811] usb 1-1: ath9k_htc: Firmware htc_9271.fw requested
[ 2.311658] usb 1-1: Direct firmware load for htc_9271.fw failed with error -2
[ 2.318867] usb 1-1: no suitable firmware found!
[ 2.323478] usb 1-1: ath9k_htc: Failed to get firmware htc_9271.fw
[ 2.329951] usb 1-1: ath9k_htc: USB layer deinitialized
I have also followed the steps mentioned here :
https://unix.stackexchange.com/questions/21903/custom-kernel-fails-to-load-firmware-when-module-built-in
which explains how to provide configuration for the path for loading the firmware.
A quick grep for /proc/config.gz reveals this:
$zcat /proc/config.gz | grep CONFIG_ATH
CONFIG_ATH_COMMON=y
#CONFIG_ATH_DEBUG is not set
#CONFIG_ATH5K is not set
#CONFIG_ATH5K_PCI is not set
CONFIG_ATH9K_HW=y
CONFIG_ATH9K_COMMON=y
CONFIG_ATH9K_BTCOEX_SUPPORT=y
CONFIG_ATH9K=y
CONFIG_ATH9K_PCI=y
CONFIG_ATH9K_AHB=y
#CONFIG_ATH9K_DEBUGFS is not set
#CONFIG_ATH9K_DYNACK is not set
CONFIG_ATH9K_WOW=y
#CONFIG_ATH9K_CHANNEL_CONTEXT is not set
CONFIG_ATH9K_PCOEM=y
CONFIG_ATH9K_HTC=y
CONFIG_ATH9K_HTC_DEBUGFS=y
#CONFIG_ATH6KL is not set
#CONFIG_ATH10K is not set
$zcat /proc/config.gz | grep CONFIG_EXT
CONFIG_EXTRA_FIRMWARE="htc_9271-1.4.0.fw"
CONFIG_EXTRA_FIRMWARE_DIR="/lib/firmware/ath9k_htc"
#CONFIG_EXTCON is not set
zcat /proc/config.gz | grep CONFIG_FIRMW
CONFIG_FIRMWARE_IN_KERNEL=y
# CONFIG_FIRMWARE_MEMMAP is not set
Is there any other way to notify the kernel to load the firmware? I think I might be missing out some configuration.
Edit 2 :
I resolved the issue of firmware load failure by enabling the option Fallback user-help invocation for firmware loading. Now the device is initialised, but the driver seems to not support the device. Here is the dmesg log :
[ 14.568484] usb 1-1: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
[ 14.820407] ath9k_htc 1-1:1.0: ath9k_htc: HTC initialized with 33 credits
[ 15.852173] ath: phy0: Mac Chip Rev 0x0f.3 is not supported by this driver
[ 15.859064] ath: phy0: Unable to initialize hardware; initialization status: -95
[ 15.866512] ath: phy0: Unable to initialize hardware; initialization status: -95
[ 15.873973] ath9k_htc: Failed to initialize the device
A quick research on the device, I found that the official website of TP-Link states that the linux drivers are available for version 2, and not for version 1. My device is a version 1 device and I think because of this the driver does not support.
I'm a new user on RTnet and try to make Rtnet work on Freescale Sabre Lite iMX6Q board. But I got an issue, RTnet can't use rt_fec.ko module driver to register rt_eth0 even though non real time driver is disable.
I'm using:
Linux kernel 3.0.43 download from Xenomai git://git.xenomai.org/ipipe-gch.git/?h=ipipe-3.0-imx6q
Xenomai 2.6 download from git.xenomai.org/xenomai-2.6.git/
RTnet 0.9.13 download from rtnet.org/download.html
Please see my kernel configuration and boot log in attached link.
Xenomai is loaded:
"*I-pipe: Domain Xenomai registered.
Xenomai: hal/arm started.
Xenomai: scheduling class idle registered.
Xenomai: scheduling class rt registered.
Xenomai: real-time nucleus v2.6.3 (Lies and Truths) loaded.
Xenomai: debug mode enabled.
Xenomai: starting native API services.
Xenomai: starting POSIX services.
Xenomai: starting RTDM services.* "
And FEC ethernet driver (non real-time driver) is loaded when kernel is booting
*"FEC Ethernet Driver
fec_enet_mii_bus: probed "*
Xenomai is built following install guideline for ARM platform from Xenomai:
http://xenomai.org/installing-xenomai-2-x/
RTnet is built by below command, because SABRE Lite use FEC ethernet card with Micrel KSZ9021 Gigabit chip so I put "--enable-fec" in configure command to build real-time driver for FEC ethernet card:
"./configure --host=armv7l-timesys-linux-gnueabi --with-rtext-config=/home/sonnguyen/rtnet-xenomai-rootfs/usr/xenomai/bin/xeno-config --with-linux=/home/sonnguyen/build/rtnet-xenomai-ipipe-imx6q --enable-rtcfg-dbg --enable-rtwlan --enable-net-routing --enable-router --enable-nomac --enable-rtcap --enable-proxy --enable-checks --enable-fec "
Then
"make DESTDIR=/home/sonnguyen/rtnet-xenomai-rootfs install"
I also changed RT_DRIVER from default value to "rt_fec" in rtnet.conf.
After kernel is booted, I ran "./rtnet start" and got this:
"RTnet: initialising real-time networking
RT FEC Ethernet Driver
./rtnet: line 385: can't create /sys/bus/pci/drivers/rt_fec/bind: nonexistent directory
initializing loopback...
RTnet: registered rtlo
RTcap: real-time capturing interface
ifconfig: SIOCGIFFLAGS: No such device
ifconfig: SIOCGIFFLAGS: No such device
RTcfg: init real-time configuration distribution protocol
RTmac: init realtime media access control
RTmac/TDMA: init time division multiple access control mechanism
ioctl: No such device
ioctl: No such device
ioctl: No such device
ioctl: No such device
ioctl (add): No such device
ioctl (add): No such device
ioctl (add): No such device
ifconfig: SIOCGIFFLAGS: No such device
Waiting for all slaves...ioctl: No such device
ioctl: No such device "
Then I tried:
"# lspci
lspci: /sys/bus/pci/devices: No such file or directory
ls /sys/bus/
ac97 hid mdio_bus platform sdio spi
event_source i2c mmc scsi serio usb "
No pci directory under /sys/bus/. Then I thought because the script can't find the ethernet physical bus, it can't register rteth0.
Then I looked into rtnet script and did some minor change. In the script it requires physical ethernet device ID (mentioned in REBIND_RT_NICS), so I tried to find out what it is and got this when make eth0 up with non real-time driver:
"eth0: Freescale FEC PHY driver [Micrel KSZ9021 Gigabit PHY] (mii_bus:phy_addr=1:06, irq=-1)
PHY: 1:06 - Link is Up - 1000/Full "
I think 1:06 is my physical bus ID, then I change the code in rtnet from:
for dev in $REBIND_RT_NICS; do
if [ -d /sys/bus/pci/devices/$dev/driver ]; then
echo $dev > /sys/bus/pci/devices/$dev/driver/unbind
fi
echo $dev > /sys/bus/pci/drivers/$RT_DRIVER/bind
done
To
echo 1:06 > /sys/bus/mdio_bus/drivers/Micrel\ KSZ9021\ Gigabit\ PHY/unbind
echo 1:06 > /sys/bus/platform/drivers/rt_fec/bind
And I tried again with "./rtnet start", this time I got this:
RTnet: initialising real-time networking
RT FEC Ethernet Driver
sh: write error: No such device
initializing loopback...
RTnet: registered rtlo
RTcap: real-time capturing interface
ifconfig: SIOCGIFFLAGS: No such device
ifconfig: SIOCGIFFLAGS: No such device
RTcfg: init real-time configuration distribution protocol
RTmac: init realtime media access control
RTmac/TDMA: init time division multiple access control mechanism
ioctl: No such device
ioctl: No such device
ioctl: No such device
ioctl: No such device
ioctl (add): No such device
ioctl (add): No such device
ioctl (add): No such device
ifconfig: SIOCGIFFLAGS: No such device
Waiting for all slaves...ioctl: No such device
ioctl: No such device
But it still said "No such device"
This is lsmod after I ran ./rtnet start
lsmod
Module Size Used by Not tainted
tdma 25691 0
rtmac 9724 1 tdma
rtcfg 58071 0
rtcap 7151 0
rt_loopback 1279 2
rtpacket 6365 0
rtudp 10738 0
rt_fec 12742 0
rtipv4 29987 2 rtcfg,rtudp
rtnet 40746 9 tdma,rtmac,rtcfg,rtcap,rt_loopback,rtpacket,rtudp,rt_fec,rtipv4
./rtifconfig
rtlo Medium: Local Loopback
IP address: 127.0.0.1
UP LOOPBACK RUNNING MTU: 1500
Only rtlo is registered.
I also tried with kernel linux without non real-time FEC driver (please refer in another config file in attached Skydrive link), but still the same issue happened.
Do you have any idea how to solve this issue? I did many search but still can not figure out how to fix it.
Because I can't attach the files to my post, so I put all of my configuration files in the link below:
https://onedrive.live.com/redir?resid=162EDF85AEBD2EFE!717&authkey=!AJ1Fjd_XiohUwes&ithint=file%2czip
Best Regards,
Nguyen Hung Son
Error " Unable to open video device "
I am using a HP Deluxe Webcam (EW193AA) with raspberry pi
log of lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 006: ID 093a:2621 Pixart Imaging, Inc. PAC731x Trust Webcam
Bus 001 Device 005: ID 413c:2107 Dell Computer Corp.
log of motion -n
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478785
[0] Thread 1 is from /etc/motion/motion.conf
[0] httpd bind(): Address already in use
[0] httpd thread exit
[1] Thread 1 started
[1] cap.driver: "gspca_pac7302"
[1] cap.card: "USB Camera (093a:2621)"
[1] cap.bus_info: "usb-bcm2708_usb-1.2"
[1] cap.capabilities=0x85000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Config palette index 8 (YU12) doesn't work.
[1] Supported palettes:
[1] 0: PJPG (PJPG)
[1] Unable to find a compatible palette format.
[1] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
[1] Could not fetch initial image from camera
[1] Motion continues using width and height from config file(s)
[1] Resizing pre_capture buffer to 1 items
[1] bind(): Address already in use
[1] Problem enabling stream server in port 8081: Address already in use
[1] Thread exiting
[0] Motion thread 1 restart
I have tried changing width and height to 160*140, 320*240,640*480 but resulted in same error.... but cannot find a solution...
Logfile says your port 8081 is already in use...
please also ensure that your outpath is write enabled for user motion.motion:
eg.
sudo chown motion.motion /home/pi/motion
Try running:
LD_PRELOAD=/usr/lib/arm-linux-gnueabihf/libv4l/v4l1compat.so motion -n
For me this ended up being an issue with the config file. I set the resolution to 640x360, after a bit of fiddling I found that the height had to be divisible by 16. The original error message of "port already in use" was wrong, evidenced by the fact that changing ports fixed nothing. After I switched back to a height of 480 the service came up again.
I recommend 320x240, 640x480, or 1280x720 (if you have a decent web cam and internet speeds).