Friday, 2016-11-11

*** tpb has joined #timvideos00:00
mithro_florent_: You wouldn't happen to still be up?00:01
tumbleweedmithro: how do you use modeswitch in development? it seems all the entry points are created by setup.py00:21
tumbleweedI ended up doing00:21
tumbleweedfor cmd in hdmi2usb-find-board hdmi2usb-mode-switch hdmi2usb-manage-firmware opsis-find-board opsis-mode-switch opsis-manage-firmware atlys-find-board atlys-mode-switch atlys-manage-firmware; do echo -e '#!/usr/bin/python3\nimport pathlib, sys\nsys.path.insert(0, str(pathlib.Path(__file__).parent.parent.resolve()))\nimport hdmi2usb.modeswitch.cli\nhdmi2usb.modeswitch.cli.main()' > $cmd; chmod +x $cmd; done00:21
tumbleweedwhich is rather hacky00:21
tumbleweederr that probably clipped00:21
mithroIt didn't I think00:21
tpbTitle: debian Pastezone (at
mithrotumbleweed: for development I run "make setup"00:22
tumbleweedI avoided that makefile, too much conda00:23
mithrotumbleweed: Well, you can just do a "python3 develop" or "python3 install"00:23
tumbleweedanyway, as you can see I just switched from that opsis-prod branch to master00:24
mithroyou should be using master from
tpbTitle: GitHub - timvideos/HDMI2USB-mode-switch: Tool for switching boards supported by HDMI2USB firmware between multiple different modes (programming, webcam, etc). (at
tumbleweedyes, exactly00:24
tumbleweedsure, but usually it's useful to be able to run code from the checkout00:24
mithrotumbleweed: Hrm?00:25
tumbleweedI mean, if you're hacking on it00:25
mithrotumbleweed: This is pretty much how any normal python module works00:25
tumbleweedusually there are entry points in the module that you can run, without any setup00:25
tumbleweedin this case the entry point isn't executable, because it's depending on setuptools wrapper entryopints, and sys.argv[0]00:26
mithrotumbleweed: python will generate those wrappers00:26
tumbleweedbut usually you don't have to touch when hacking00:26
mithrotumbleweed: So you could use virtualenv if you don't like conda00:27
tumbleweedno ve necessary00:27
tumbleweedit has no crazy dependencies00:27
tumbleweedanyway, you see my query about ixo-usb-jtag.hex ?00:27
mithrotumbleweed: Yes, and I need a bunch more information00:27
mithrotumbleweed: When ixo-usb-jtag package is installed, things won't work properly00:27
tumbleweedfirstly, the 0.0.2 firmwares don't seem to work00:29
tumbleweedand neither do recent 0.0.0 ones, on this board00:29
mithrotumbleweed: what is the 0.0.2 firmwares?00:29
tumbleweede.g. v0.0.2-81-gd0d3aea00:29
tumbleweedthe most recent build00:29
mithrotumbleweed: How are you loading them?00:29
tumbleweedwith modeswitch00:29
tumbleweedso, after loading one of those, I had a "bricked" board00:30
tumbleweedbecause the fx2 wouldn't come up00:30
tumbleweeduntil I jumpered it to failsafe00:30
tumbleweedbut then modeswitch would loop when trying to load the jtag firmware00:30
mithrotumbleweed: There is a lot of things going on here - please can you give me a set of instructions to reproduce the problem and I'll give it a go00:30
tumbleweednot right now, becaus I'm in bed, and the opsis is on a desk at ARM00:31
tumbleweedtomorrow morning I can00:31
mithrotumbleweed: Okay, that would be helpful00:31
tumbleweedbut basically: flash the latest firmware00:31
tumbleweedit'll be bricked00:31
tumbleweedthen try to unbrick it00:31
mithrotumbleweed: I also need to know what you have installed00:31
mithrotumbleweed: and how you have the jumpers configured00:32
tumbleweedas in?00:32
mithrotumbleweed: linux, any udev rules, ixo-usb-jtag, openocd, any other packages which interact with them00:32
tumbleweedsurely if it flashed, nothing else matters that much?00:32
mithrotumbleweed: You aren't having problems with flashing, you are having problems with it coming up after flashing, right?00:33
tumbleweedall my ixo-usb-jtag udev rules are commented out, except for the permissions one00:33
mithrotumbleweed: I've been successfully using the firmware on this production opsis board here00:34
tumbleweedand then, once it won't come up, re-flashing it with something else00:34
tumbleweedthe latest firmware?00:34
tumbleweedthis board is the one that wouldn't run every firmware, we can try a wider range tomorrow00:34
tumbleweedwider range of boards00:34
mithrotumbleweed: If you have a set of steps which works on one board and not another, that is useful info00:35
tumbleweedyeah, I only had one board today00:35
tumbleweedhopefully rattus will bring another one tomorrow00:35
mithrotumbleweed: but a set of steps which I can try and reproduce exactly here would be useful00:35
mithrotumbleweed: but generally, you either use ixo-usb-jtag package *or* HDMI2USB-mode-switch00:36
tumbleweedmodeswitch --mode jtag on a board in falesafe mode (P18 disconnected, and K3 on 1-2)00:36
tumbleweedthat's where I ran into that problem00:36
tumbleweedit did nothing00:37
tumbleweedsurely it's not either/or if you hobble the udev rules00:37
tumbleweedbecause that packade doesn't do anything without them00:37
tumbleweedit's just some udev rules, and some firmware blobs00:37
mithrotumbleweed: Assuming you reloaded the udev rules and a bunch of other things which might be going wrong00:38
mithrotumbleweed: If you add a -v you can see what the mode-switch is doing / waiting for00:38
tumbleweedI had -v, obviously00:38
mithrotumbleweed: Then the log would be useful00:38
mithrotumbleweed: Your fxload version information would be useful too00:39
tumbleweedit won't be *that* useful, because it hangs00:39
tumbleweedbut yeah, we'll get theret morrow00:39
mithrotumbleweed: where does it hang?00:39
tumbleweedand we don't get the fxload verbose output, unless you run it by hand00:39
tumbleweedafter fxload00:39
tumbleweedand the krnel does a lot of this:00:40
tumbleweed[1662542.512044] usb 1-2: new high-speed USB device number 99 using xhci_hcd00:40
tumbleweed[1662547.672073] usb 1-2: device descriptor read/64, error -11000:40
tumbleweed[1662563.280364] usb 1-2: device descriptor read/64, error -11000:40
tumbleweedyou can see, by running fxload by hand, that it is loading the firmware, and  rebooting the fx200:40
mithrotumbleweed: So I'm guessing it is hanging when doing a lsusb00:40
tumbleweedbut into some broken state00:40
tumbleweedchanging the firmware for the (suprisingly different) noe that ixo-usb-jtag had, fixed that issue for me00:41
tumbleweedmy fxload is 0.0.20081013-1ubuntu200:41
mithrotumbleweed: I'm afraid there is too much unknown here for me to figure out the problem00:42
tumbleweedand I spent a few hours being confused by a USB problem that was on the host-side (but caused by doing things on the opsis), so I hope that didn't lead me into a weird debugging corner00:43
tumbleweedbut I think that was resolved before most of this00:44
* tumbleweed -> bed00:45
mithrotumbleweed: Hopefully we can put more logic into modeswitch to help figure out problems like this00:46
*** rohitksingh_work has joined #timvideos04:03
*** Bertl is now known as Bertl_zZ06:39
*** rohitksingh_wor1 has joined #timvideos08:05
*** rohitksingh_work has quit IRC08:06
*** rohitksingh_work has joined #timvideos08:14
*** rohitksingh_wor1 has quit IRC08:16
tumbleweedmithro: right, I'm in front of an opsis10:31
tumbleweedare you still around?10:31
tumbleweedmithro: ok, it seems I need a different fx2 firmware, depending on whether I'm re-flashing a happy opsis or a failsafe opsis10:39
tumbleweedmithro: so, when the board is in failsafe, this happens if I try to use modeswitch to flash11:35
tpbTitle: debian Pastezone (at
tumbleweedlatest firmware that works is v0.0.0-654-gbca243b11:50
tumbleweedexcept the encoder is fucked11:50
*** Bertl_zZ is now known as Bertl12:19
*** rohitksingh_work has quit IRC13:06
tumbleweedthe last firmware version that works (with encoder) is v0.0.0-598-g07f847613:06
tumbleweedlatest firmware (v0.0.2-81-gd0d3aea) works on another (less faulty) opsis13:22
tumbleweedbut streaming is borked13:22
tumbleweedinput0:  0x0 (@ 42773 kHz)13:23
tumbleweedinput1:  1280x720 (@ 74249 kHz)13:23
tumbleweedoutput0: [email protected] from pattern13:23
tumbleweedoutput1: [email protected] from input113:23
tumbleweedencoder: 1280x720 @ 0fps (0Mbps) from input1 (q: 50)13:23
tumbleweedddr: read: 1760Mbps  write:  884Mbps  all: 2644Mbps13:23
tumbleweedall the kHz13:23
tumbleweedand v0.0.2-72-g70cb993 has working encoder13:40
tumbleweedor did, for a bit...13:52
* tumbleweed works his way back again13:53
*** rohitksingh has joined #timvideos14:00
tumbleweedo_O no, that was my laptop14:02
*** puck`` has quit IRC15:31
*** puck`` has joined #timvideos15:34
*** rohitksingh has quit IRC16:16
*** rohitksingh has joined #timvideos16:18
*** Bertl is now known as Bertl_zZ18:57
*** rohitksingh has quit IRC21:02
*** Bertl_zZ is now known as Bertl23:31

Generated by 2.13.1 by Marius Gedminas - find it at!