Using KryoFlux with Linux

All questions about how to use KryoFlux go here.
isdxman
Posts: 10
Joined: Mon Jul 23, 2012 4:12 pm

Using KryoFlux with Linux

Post by isdxman » Mon Jul 23, 2012 4:46 pm

Hello all,

I'm new to the forum having joined today.

I'm having problems trying to get the KryoFlux programme to run in Linux. Although DTC is set up and working OK in Windows XP Pro, I've been trying for some time now to get it working in Linux, all to no avail. I'm running Xubuntu Linux 12.04 (Precise Pangolin) and this appears to have LIBUSB 1.0.9 (which, I believe, succeeds 1.0.8) already installed. I've set up a folder called "kf" on my desktop and tried to run "dtc" from that using the "terminal" programme in much the same way as the "command editor" in Windows. All I get in Linux is the message that the programme "directory - tree - compiler" is not installed and to install it!

There would appear to be a clash between "directory - tree - compiler" and "disc - tool - console", both programmes being "DTC"!

Anyone's help with this would be greatly appreciated, please?

Please bear in mind that I am a newcomer to Linux and any help would need to be in "Linux for Idiots" fashion.

Very best regards to all,

isdxman

:cry: :roll: :lol:

Harry
Posts: 133
Joined: Wed Feb 09, 2011 9:31 pm

Re: Using KryoFlux with Linux

Post by Harry » Mon Jul 23, 2012 10:11 pm

Just a guess... The current directory is not in the search path on Linux by default, so you have to specify e.g.
./dtc -c2
to do the initalisation test. You need to have opened a shell before typing this, also sometimes called a "Terminal" by some distributions. And you must have changed to the directory containing "dtc" before that.

PS: I have found a start for a linux command line explanation at http://www.tuxfiles.org/linuxhelp/cli.html.

isdxman
Posts: 10
Joined: Mon Jul 23, 2012 4:12 pm

Re: Using KryoFlux with Linux

Post by isdxman » Fri Jul 27, 2012 9:22 pm

Hi there Harry,

Thanks for replying to my post.

I've tried "dtc", "dtc -c2" and "dtc -h" using both "Terminal" and "Root Terminal" with the KryFlux Board connected and a floppy in the drive. I still get the same message in Linux that the programme "Directory - Tree - Compiler" is not installed and to install it! As I've already said, everything is fine in Windows XP Pro.

If the programme "Directory - Tree - Compiler" were not around in the software to clash with, then I might stand a chance of getting it to work! I'm rapidly reaching the conclusion that in earlier versions of Linux, it wasn't there, and hence when Kryoflux developed this Linux software, this problem was just not present. I'm using Xubuntu Linux 12.04 which was produced after KryoFlux produced their Linux DTC in February. What is your opinion about this Harry?

Do you have Kryoflux DTC working in Linux on your PC Harry? If so, could you possibly send "Line by Line" instructions on how to install it please? As I've already said, these would need to be in "Linux for Idiots" fashion being new to Linux.

I look forward to your possible reply and any replies from others on this.

Very best regards,

isdxman.

:( :? :) :lol:

User avatar
mr.vince
Posts: 2120
Joined: Tue Oct 05, 2010 5:48 pm

Re: Using KryoFlux with Linux

Post by mr.vince » Sat Jul 28, 2012 6:14 am

Why not try running the GUI?

Rixa
Posts: 52
Joined: Mon Dec 12, 2011 12:09 pm

Re: Using KryoFlux with Linux

Post by Rixa » Sat Jul 28, 2012 8:48 am

Ubuntu is just trying to be helpful and giving you misguided advice. You get your message because the shell doesn't find the command 'dtc' but knows that the Directory Tree Compiler provides one, so it suggests you install that. Alas, it's not the dtc that you want. If you uninstall the packages 'command-not-found' and 'command-not-found-data', the error message should revert back to:

bash: dtc: command not found

And this is because bash only looks for commands in the comma-separated list of directories in the PATH variable ("echo $PATH" to see whats in it). To run a command from somewhere else you have to run it a path stuck to the beginning. Either the entire path, something like "/home/myusername/kryoflux_2.0b9_linux/dtc/dtc", relative to your current directory like "kryoflux_2.0b9_linux/dtc/dtc", or from the current directory itself "./dtc" (. stands for current directory). Then bash should find it.

The GUI will also need to find it, so it's better if you put it where it's on the PATH by default. Currently the best place for that is /usr/local/bin/dtc for the executable and /usr/local/share/dtc/firmware.bin for the firmware. You may also need additional system setup. See the included dtc/README.linux file for /etc/udev/rules.d/80-kryoflux.rules, /etc/modprobe.d/kryoflux.conf and you should probably also add yourself to the floppy group.

Edit: I figured that the top paragraph ended up sounding like you need to uninstall the command-not-found packages. That's not the case at all, and you may find their advice useful at some other occasion.

Tor
Posts: 28
Joined: Mon May 16, 2011 3:08 pm

Re: Using KryoFlux with Linux

Post by Tor » Thu Aug 02, 2012 12:20 pm

isdxman wrote: I've tried "dtc", "dtc -c2" and "dtc -h" using both "Terminal" and "Root Terminal"
Notice how Harry said "./dtc", not "dtc". You need to tell the shell where the executable is, as it's not in the default path. You do that by either specifying the full path: "/home/user/kryoflux/dtc -c" (or whereever it's located), or relative path:
"cd /home/user/kryoflux/"
"./dtc"

-Tor
Hostinfo: Debian SID x86_64 and i686

isdxman
Posts: 10
Joined: Mon Jul 23, 2012 4:12 pm

Re: Using KryoFlux with Linux

Post by isdxman » Mon Aug 06, 2012 3:07 pm

Hi Tor,

Many, many thanks for your most useful reply.

I'm now at a stage where my Linux is recognising the command "./dtc" and "./dtc -h" and giving me the SPS header and the Help file respectively.

However, when I enter "./dtc -c2" all I get is "Device not Found" suggesting to me that it can't find a driver! Because I'm a newcomer to Linux and not very familiar with things (though I'm learning all the time!), I just can't see right now how Drivers work in Linux and how they are added.

Perhaps Tor, or anyone else out there, you may be able to help me further with this?

Best regards to all,

isdxman

:( :?

User avatar
Malvineous
Posts: 156
Joined: Sun Oct 31, 2010 10:57 pm
Location: Brisbane, Australia
Contact:

Re: Using KryoFlux with Linux

Post by Malvineous » Wed Aug 08, 2012 12:21 pm

You don't need to load any drivers with the Linux version, they're built in to DTC. You may however (depending on whether you followed the instructions in the README) not have access to USB devices. You can quickly test this by typing "sudo" (and a space) in front of the command, i.e. "sudo ./dtc -c2". When you run it, "sudo" may ask you for your login password. sudo gives you full access to your system, including all connected devices, so doing this as a test you will know for sure that you won't be stopped by a lack of permissions.

If this still doesn't work, let us know how you have connected the KryoFlux, whether the red power light is on, etc.

isdxman
Posts: 10
Joined: Mon Jul 23, 2012 4:12 pm

Re: Using KryoFlux with Linux

Post by isdxman » Sun Aug 12, 2012 9:12 pm

Hi there Malvineous,

Many, many thanks for your most useful reply and apologies for the delay getting back to you.

The red LED on the Kryoflux board is on. I've tried what you suggest and now, instead of the message "Device not found", all I get is nothing except the cursor at the start of the line!! However, the green and amber LED's stert to flash alternately as if something is getting to the Kryoflux board!!

It would appear to me that Linux is not "seeing" the Kryoflux board properly. However, I tested the USB port by inserting a memory stick and Linux sees that OK and mounts it. Seems to me that there isn't a properly installed driver!

I've looked at the Kryoflux Read.me file and there is a section of this saying how to permanently install DTC in Linux. It talks about, for example, installing i686/dtc in usr/local/bin. Could you Malvineous or anyone else explain how to do this, please?

Any further help would be most gratefully appreciated.

Very best regards to all,

isdxman.

:? :roll: :)

User avatar
Malvineous
Posts: 156
Joined: Sun Oct 31, 2010 10:57 pm
Location: Brisbane, Australia
Contact:

Re: Using KryoFlux with Linux

Post by Malvineous » Sun Aug 12, 2012 11:45 pm

Ok, so it sounds like that definitely was a permissions issue. Once the LEDs flash alternately it means the firmware has been uploaded successfully to the board. Unfortunately (with the current firmware) the Kryoflux looks to the PC like a USB modem, so the Linux USB modem driver takes over and means no other program can directly access the device. (As a side note, I am trying to persuade the Kryoflux team to change the USB protocol numbers so this doesn't happen.)

Have another look at the README (section #3, Initial set up) and pay particular note to the part about blacklisting the modem driver. This will prevent it from taking over the Kryoflux and leave it available for DTC to access.

With the permanent installation instructions it is a bit difficult to explain how to do this as it varies for each Linux distribution, and there are a lot out there. You are probably better off asking for help on your Linux distribution's forums, as they will be able to give you specific advice tailed to your particular system.

Post Reply