You are not logged in.

#1 2012-01-14 14:54:56

tomzooi
Member
Registered: 2010-05-01
Posts: 26

AVR Programmer issues with ehci_hcd

Hello,

I've been trying to build the libserial from the AUR and it won't build.

After the command yaourt -S libserial , and a negitive answer to edit pgbuild, and positive to continue building, i will finally (after the configuring stage) get the following error:

Making all in sip
make[2]: Entering directory `/tmp/yaourt-tmp-tom/aur-libserial/src/libserial-0.6.0rc1/sip'
python2 ./configure.py
Traceback (most recent call last):
  File "./configure.py", line 6, in <module>
    import sipconfig
ImportError: No module named sipconfig
make[2]: *** [Makefile.sip] Error 1
make[2]: Leaving directory `/tmp/yaourt-tmp-tom/aur-libserial/src/libserial-0.6.0rc1/sip'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/yaourt-tmp-tom/aur-libserial/src/libserial-0.6.0rc1'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
==> ERROR: Makepkg was unable to build libserial.
==> Restart building libserial ? [y/N]

I have noticed that the pkgbuild was updated, and if I undo this, e.g. removing the line

sed -e 's/python/python2/g' -i sip/Makefile

the following error shows up:

make[2]: Entering directory `/tmp/yaourt-tmp-tom/aur-libserial/src/libserial-0.6.0rc1/sip'
python ./configure.py
  File "./configure.py", line 80
    """
      ^
SyntaxError: invalid syntax
make[2]: *** [Makefile.sip] Error 1
make[2]: Leaving directory `/tmp/yaourt-tmp-tom/aur-libserial/src/libserial-0.6.0rc1/sip'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/yaourt-tmp-tom/aur-libserial/src/libserial-0.6.0rc1'
make: *** [all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...

I am somewhat new to linux/arch, so I posted this in the newbie corner.

Furthermore, the reason why I want to install libserial is because of an AVR-programmer I own. its a custom programmer emulating the stk500(v2) Website (dutch).
I used to program with it on windows, but since I know run linux, I am trying to get it working ther, but all

avrdude -c stk500v2 -P /dev/ttyACM0 -p t2313

will give me is the following error(s).

avrdude: stk500v2_ReceiveMessage(): timeout

avrdude though works fine with another programmer I tried (though not an stk500 emulator and running from ttyUSB0).
It even works on the server I have running wich I am using for 2 years now with the same command.
The only difference I could find was libserial. Which seems to be installed on the serial, but not ont his machine (which is an asus laptop k93SV btw). Hence I am trying to build it, allthough  this website is telling me it is not nessecary..., and without it my device still gets recognized in lsusb like so: Bus 004 Device 006: ID 16c0:05e1 VOTI CDC-ACM class devices (modems)

So here I am with a programmer that is know to works, and works on my other pc, but not on this machine and I'm quiet stuck and frustrated from trying to get it to work for 2 days in a row without any success. Haven't find anything on the forum, wiki or outside the arch community using google which would fix this.

any help/suggestions to get this device running is very appreciated.

Last edited by tomzooi (2012-01-14 16:19:45)

Offline

#2 2012-01-14 15:50:46

tomzooi
Member
Registered: 2010-05-01
Posts: 26

Re: AVR Programmer issues with ehci_hcd

After some thourough searching, I found out that on my server pc I blacklist the ehci_hcd module in rc.conf (which is possible because it's an old linux). I have blacklisted it on my new machine in a file in /etc/modprobe.d/ but dmesg still says its using ehci_hcd . On my server it's using uhci_hcd according to dmesg, but I cannot unload the module by using rmmod or modprobe -r (it will give no output in the terminal and hangs).

this is end of dmesg when I connect it to the server pc:

[8129571.325190] usb 3-2.4.1: new low speed USB device number 108 using uhci_hcd
[8129571.436224] usb 3-2.4.1: config 1 interface 1 altsetting 0 endpoint 0x1 is Bulk; changing to Interrupt
[8129571.436236] usb 3-2.4.1: config 1 interface 1 altsetting 0 endpoint 0x81 is Bulk; changing to Interrupt
[8129571.458458] cdc_acm 3-2.4.1:1.0: ttyACM0: USB ACM device

and this when I do the same on my laptop:

[   39.836889] usb 2-1.3: new low speed USB device number 3 using ehci_hcd
[   39.929007] usb 2-1.3: config 1 interface 1 altsetting 0 endpoint 0x1 is Bulk; changing to Interrupt
[   39.929013] usb 2-1.3: config 1 interface 1 altsetting 0 endpoint 0x81 is Bulk; changing to Interrupt
[   40.001597] cdc_acm 2-1.3:1.0: ttyACM0: USB ACM device
[   40.002869] usbcore: registered new interface driver cdc_acm
[   40.002871] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters

I cannot manage to let it set tu uhci_hcd, I'd guess it shouldn't be that hard, but then again, this is the newbie corner...

Offline

#3 2012-01-14 22:07:52

tomzooi
Member
Registered: 2010-05-01
Posts: 26

Re: AVR Programmer issues with ehci_hcd

after blacklisting the module in modprobe.conf and removing /lib/modprobe.d/usb-load-ehci-first.conf, and then rebuilding with mkinitcpio , I was missing half of the devices in lsusb and the device wouldn't be recognized at all, but after reloading ehci_hcd via modprobe they we're all back up. It also brought back the problem of the device being driven by ehci_hcd.

*but*

When I connected the device via an USB hub (König), it suddenly started to use xhci_hcd as a driver... dmesg:

[ 1940.880091] usb 1-1.2: new low speed USB device number 7 using xhci_hcd
[ 1940.899123] usb 1-1.2: config 1 interface 1 altsetting 0 endpoint 0x1 is Bulk; changing to Interrupt
[ 1940.899139] usb 1-1.2: config 1 interface 1 altsetting 0 endpoint 0x81 is Bulk; changing to Interrupt
[ 1940.899594] xhci_hcd 0000:04:00.0: WARN: short transfer on control ep
[ 1940.900849] xhci_hcd 0000:04:00.0: WARN: short transfer on control ep
[ 1940.902101] xhci_hcd 0000:04:00.0: WARN: short transfer on control ep
[ 1940.902496] usb 1-1.2: ep 0x83 - rounding interval to 512 microframes, ep desc says 800 microframes
[ 1940.904194] cdc_acm 1-1.2:1.0: ttyACM0: USB ACM device

and it freaking works! yeah!

It is still strange that it won't work when plugged in directly to the laptop, and I actually do not want to bring the hub with me when I take my laptop to the university for example to work over there. (which is particularly hard because it is glued to the wall...)

So I am still depending on a solution to get the device using xhci_hcd in stead of ehci_hcd , but I do not have the faintest Idea how

note: I just made a new initial ramdisk environment, with everything as it originally was (no blacklisting, putting /lib/modprobe.d/usb-load-ehci-first.conf back where it belonged), so I hope it will not fail after the next reboot using the hub, but as I already loaded the ehci_hcd module I think this won't be an issue

Offline

Board footer

Powered by FluxBB