Usb Bulk Transfer Error: Reset By Peer

Hi,
I am working on usb device driver. Frequently I am getting problem in usb_bulk_msg during sending data from host to device, its returning -104 i.e. reset by peer.

I am using embedded linux_3.14 on Renesas RZA1H board.

Please let me know what is the issue.

Thanks


Similar Content



CentOS 6 - Connection Reset By Peer Error

Hi,

I have a CentOS 6 machine [Machine X], which I connect to using a putty client or from another CentOS 6 machine.

Now, the machine X intermittently sends a connection reset message to all SSH sessions -

Code:
Read from remote host 1.1.1.1: Connection reset by peer
Connection to 1.1.1.1 closed.

I have switched off the firewall on the machine & there are no session timeout values set.

How do I find out what is causing this issue?


Thanks

Bhushan

File Transfer Through UART Between Linux Host And Embedded Linux Target

Hi,

I have a target board running embedded Linux, and a host PC that runs Ubuntu. I want to be able to transfer files from the host PC to the target board through serial interface, (something like I have a terminal program on the host side that talks to the target, and I issue some command from the terminal to transfer a file to the target, the target receive the file and store it in some RAM location for later), How can I do it?
I know how to do this using ymodem on the host terminal and loady on target's u-boot command prompt, but how can I do it when target is running Linux?

Thank you all,
Wei

Centos 5.5 Need To Reset Gui Password Not The Root Password

I found an old laptop that has centos 5.5 installed. I reset the root password, but I need to reset the gui password. Is there a way to view this password or reset it? I have not worked with Linux over 5 years and am rusty on all the commands

Over-restricted Hotmail...oops

hi all,
Okay,
I did it, I over-restricted outlook (yes, still have that...) by using the tools meny-page info of that page and disallowing cookies...
I can log in from an other box, so it's the settings on my main box...
Any idead on how to reset some things? Thanks
Thor
Edit - perhaps for clarity, the login page is not the issue, the mailpage is, but, since hotmail does not allow me to access that page (because I disallow cookies) - I cannot reset the permissions. All I need to figure out is how to reset these permissions...
Solved - requires re-enabling the accepting ogf cookies, Mozilla has a page on it too

Double TtyACM Node Device From Sony Ericsson C510

Hi.


I'm using smstools3 and Sony Ericsson Phones to send SMS. My system did work well with 4 phones, now I want to connect 20.
The issue is that each phone generates two ttyACMXX devices using cdc_acm driver, and for limitations the driver supports up to 32 ACM devices

Code:
Aug 31 09:51:19 smsgw kernel: cdc_acm 2-2:1.1: ttyACM31: USB ACM device
Aug 31 09:51:19 smsgw kernel: cdc_acm 2-2:1.3: ttyACM32: USB ACM device
Aug 31 09:51:19 smsgw kernel: usbco  registered new driver cdc_acm
Aug 31 09:51:19 smsgw kernel: drivers/usb/class/cdc-acm.c: v0.25:USB Abstract Control Model driver for USB modems and ISDN adapters
Aug 31 09:51:19 smsgw kernel: usbco  registered new driver cdc_ether
Aug 31 09:51:19 smsgw kernel: usb 2-2: unsupported MDLM descriptors
Aug 31 09:52:01 smsgw kernel: cdc_acm 3-1:1.0: no more free acm devices

From the ttyACM devices created by the driver I only use the first one..

So I was wondering if it is possible to remove a ttyACM from /sys/class/tty/ttyACM1

I tried unlink /dev/ttyACM1, but it persist as a device on /sys/class/tty/

The devices are removed if I disconnect the phone, So I think would be possible also that the driver only create one ttyACM device..

Please guide me...

Thanks in advance.

Block Device Drivers

I am new to drivers development under linux kernel. After starting with the simple examples from the book Linux Device Drivers v3, I realised that the block driver API has been totally changed since the kernel 2.6.31 or maybe later versions, and I couldn't find any documentation about the new API and how to use it. There are just some few comments in the source code.

After struggling for one month I almost had something working but few parts are missing or I misunderstood something.

Here is the situation :

After fetching the request with blk_fetch_request(q), I use the macro __rq_for_each_bio for handling the full request
To transfer the segments one by one I use the macro bio_for_each_segment(bvec, bio, i) that loops over all the segments in a bio

My question is :

I need to do some DMA from/to my device (the dma engine is within the device), that's why I need some address that I could use it to DMA from/to
Which buffer should I use ? for the moment I use the buffer returned by char *buffer=bio_data(bio), Does "buffer" corresponds to the physical buffer that I can use for DMA
How to end the request in this case ? using __blk_end_request_cur(req, 0) ? or using __blk_end_request(req, 0, bytes) ?

If you don't have an answer to any of these questions, where can I find a useful documentation for the new API of the block device drivers.

Debian Custom Encrypted LVM Install - Impossible To Achieve

Hi there!

After my NVIDIA card died I decided it was time to buy an AMD card again (R9 270X), but I didn't think AMD drivers were such a pain in Linux as people said. Of course, in some distros anyway. On Arch, for example, there's no official release because Arch's developers would have to hold Xorg in order to make a closed-source driver available, because AMD's pace isn't in pair with Linux. So in order to install AMD's drivers on Arch I must rely on some guy's unnoficial repositories, but that isn't the whole problem. Even though I'm cool with adding repos and downgrading Xorg, I'm not cool with it not working for a lot of apps, so that's where I decided to try a few distros. Manjaro is a no-go because it installs Flash as default. openSUSE although is a very good distro, is a complete mess when it comes to repositories, specially multimedia ones. Ubuntu/Mint are also a no-go, Ubuntu because after 12.04 they have a spyware by default, and Mint because it contains non-free stuff by default.

So here I come! I ran Debian in the past for a long time (aside from a breaf period last year) and it was lovely, I could easily set up a custom encrypted install, but now I don't remember how to, and it's killing me. I don't like how the installer doesn't show the partitions size as they actually are, and I don't like how the automated encrypted LVM setup doesn't let me chose the encryption algorithm or the timeframe between each passphrase attempt. That's why I must create my install, and here's what I used to do on Arch (the part that really matters), converted to what I use on Debian:

Code:
# modprobe dm-mod

(create one 1GB partition for /boot, unencrypted ; create another big 930 GB formatted as "8e" - LVM - on dev/sda2)
Code:
# fdisk /dev/sda

(chose my ciphers and iter time)
Code:
# cryptsetup -c twofish-xts-plain64 -y-s 512 --iter-time 5000 luksFormat /dev/sda2

(open the luks container on "sda2_crypt")
Code:
# cryptsetup open --type luks /dev/sda2 sda2_crypt

(create physical volume on sda2_crypt)
Code:
# pvcreate /dev/mapper/sda2_crypt

(create volume group "debian" on sda2_crypt)
Code:
# vgcreate debian /dev/mapper/sda2_crypt

(create volumes)
Code:
# lvcreate -L 8G system -n root
# lvcreate -L 60G system -n swap
# lvcreate -l 100%FREE system -n home

After this is done, I go to the "partition disks" page where I select each partition/volume to it's correct destination. I then procceed to installing the base system, configuring apt, and all that. Now, before I install Grub I used to execute the following commands on shell:

Code:
 # nano /etc/crypttab

I used to put something there, but I don't remember what exactly. It's been a long time since I used Debian for long! But here's what I put the

Code:
sda2_crypt /dev/mapper/sda2_crypt none luks

Then I procceeded to instal syslinux (I REALLY don't like GRUB)

Code:
# chroot /target
# apt-get install syslinux

But I get the following error:

Quote:
E: cannot write log (Is /dev/pts mounted?) - posix_openpt (2: No such file or directory).
I'm assuming this is just a non-critical error. But this is not the problem, the problem is when I try to install syslinux:

Code:
# syslinux-install_update -i -a -m

The output:

Quote:
/bin/sh: 2: syslinux-install_update: not found
Then I type "syslinux --help":

Code:
# syslinux -h

Quote:
Usage: syslinux [options] device
--offset -t Offset of the file system on the device
--directory -d Directory for the installation target
--install -i Install over the corrent bootsector
--update -U Update a previous installation
--zip -z Force zipdrive geometry (-H 64 -S 32)
--sectors=# -S Force the number of sectors per track
--heads=# -H Force number of heads
--stupid -s Slow, safe and stupid mode
--raid -r Fall back to the next device on boot failure
--once=... Execute a command once upon boot
--clear-once -O Clear the boot-once command
--reset-adv Reset auxilliary data
--menu-save= -M Set the label to select as default on next boot
--force -f Ignore precautions
I tried literaly every possible combination that would make sense in Arch and yet I can't install it. The Debian documentation on syslinux doesn't help at all, and the Arch's Wiki on Syslinux... well, tells how to make it work on Arch It used to work the same way on Debian, but now it doesn't.

Here's a little list of the errors I get:

Code:
# syslinux -i -U

Quote:
Usage: syslinux [options] device
--offset -t Offset of the file system on the device
--directory -d Directory for the installation target
--install -i Install over the corrent bootsector
--update -U Update a previous installation
--zip -z Force zipdrive geometry (-H 64 -S 32)
--sectors=# -S Force the number of sectors per track
--heads=# -H Force number of heads
--stupid -s Slow, safe and stupid mode
--raid -r Fall back to the next device on boot failure
--once=... Execute a command once upon boot
--clear-once -O Clear the boot-once command
--reset-adv Reset auxilliary data
--menu-save= -M Set the label to select as default on next boot
--force -f Ignore precautions
Code:
#syslinux --install --update

Quote:
Usage: syslinux [options] device
--offset -t Offset of the file system on the device
--directory -d Directory for the installation target
--install -i Install over the corrent bootsector
--update -U Update a previous installation
--zip -z Force zipdrive geometry (-H 64 -S 32)
--sectors=# -S Force the number of sectors per track
--heads=# -H Force number of heads
--stupid -s Slow, safe and stupid mode
--raid -r Fall back to the next device on boot failure
--once=... Execute a command once upon boot
--clear-once -O Clear the boot-once command
--reset-adv Reset auxilliary data
--menu-save= -M Set the label to select as default on next boot
--force -f Ignore precautions
Code:
# syslinux --install --update -i -a -m

Quote:
Usage: syslinux [options] device
--offset -t Offset of the file system on the device
--directory -d Directory for the installation target
--install -i Install over the corrent bootsector
--update -U Update a previous installation
--zip -z Force zipdrive geometry (-H 64 -S 32)
--sectors=# -S Force the number of sectors per track
--heads=# -H Force number of heads
--stupid -s Slow, safe and stupid mode
--raid -r Fall back to the next device on boot failure
--once=... Execute a command once upon boot
--clear-once -O Clear the boot-once command
--reset-adv Reset auxilliary data
--menu-save= -M Set the label to select as default on next boot
--force -f Ignore precautions
Oh, and also users are still not able to press TAB to get the full command without typing it? And we can't even press the up arrow key that we get "^[[A"? :P Whaat?

What am I doing wrong?

I'm really not with the time to mess with these kinds of things, so either I figure this out REAL SOON or I'll be forced to get back to Windows

What Are The Differences Between Character Devices And Block Devices?

Hi,

I am trying to understand the difference between char devices and block devices.
I understand the basic, which is that char devices input/output data one character at a time, whereas block device input/output data block by block. But for char device driver, most of the time we are able to read/write an array of data using the read/write system call. This "array of data" sounds like a block of data to me, except that it's not fixed in size as for block devices. With this thinking, can I say that I can effectively achieve block read/write with a char device driver?
And what are the other differences?

Thank you all,
Wei

Fritz! WLAN USB Stick N V2 - NDISWRAPPER Problem

Hi guys,

I'm new to the forum and the first problem appeared, hope u guys can help me out!


Just changed my system from Windows to Linux and have some issues to get my Wifi Stick
Fritz! WLAN USB N v 2 working.

1. I downloaded the newest drivers for Win64-Bit from the AVM Homepage.
2. Started ndiswrapper Selected the fwlan64.inf -> Clicked on install.
3. Error Message appears :
modprobe: FATAL: Module ndiswrapper not found
4. Uninstalled ndiswrapper (thought probably and older version could fix this was reading on some Ubuntu Forum cause i couldnt find anything for Ziron)

Any help appreciated!

Thank you so much!

Edit: Some more info

System Log:

Quote:
stani-System-Product-Name kernel: [ 2085.487551] usb 2-1.6: USB disconnect, device number 13
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.452762] usb 2-1.6: new high-speed USB device number 14 using ehci-pci
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.549669] usb 2-1.6: New USB device found, idVendor=057c, idProduct=8501
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.549674] usb 2-1.6: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.549677] usb 2-1.6: Product: FRITZ!WLAN USB Stick N v2
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.549680] usb 2-1.6: Manufacturer: AVM Berlin
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.549682] usb 2-1.6: SerialNumber: 246511430F18
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.624607] usb 2-1.6: reset high-speed USB device number 14 using ehci-pci
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.719007] ieee80211 phy4: rt2x00_set_rt: Info - RT chipset 5592, rev 0222 detected
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.756314] ieee80211 phy4: rt2x00usb_vendor_request: Error - Vendor Request 0x09 failed for offset 0x0000 with error -32
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.756320] ieee80211 phy4: rt2x00lib_probe_dev: Error - Failed to allocate device
Feb 12 16:34:23 stani-System-Product-Name kernel: [ 2086.756349] rt2800usb: probe of 2-1.6:1.0 failed with error -32
Feb 12 16:34:23 stani-System-Product-Name mtp-probe: checking bus 2, device 14: "/sys/devices/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.6"
Feb 12 16:34:23 stani-System-Product-Name mtp-probe: bus: 2, device: 14 was not an MTP device
Feb 12 16:34:24 stani-System-Product-Name usb_modeswitch: switched to 057c:ffffffff on 002/013
uname -a

Quote:
Linux stani-System-Product-Name 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
stani@stani-System-Product-Name:~$
lsusb
Quote:
Bus 002 Device 006: ID 0b05:179c ASUSTek Computer, Inc.
Bus 002 Device 014: ID 057c:8501 AVM GmbH
Bus 002 Device 004: ID 1ea7:1005
Bus 002 Device 003: ID 046d:c326 Logitech, Inc.
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 002: ID 05e3:0727 Genesys Logic, Inc. microSD Reader/Writer
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

How To Install New Binary On An Embedded Board ?

I am currently missing some binary on the board i am using like login/passwd/useradd.
I currently have them installed on my ubuntu computer and would like to know if there is a way to install them on my board ?
I naively tried to copy past the binary of the computer to the board but i am stuck with a Syntax error: word unexpected (expecting ")") error...
If i can't copy/past them then i can i do it ?