#linuxcnc-devel | Logs for 2015-04-26

Back
[17:15:06] <cradek> darnit, on my new computer and sunix parport, pluto_servo loads without error (once I get the ioaddr specified right) but although pluto-servo.communication-error is 0, the hal pins don't show any response to the outside world
[17:25:34] <pcw_home> I vaguely remember that I had troubles with sunix/EPP with longer cables (not sure if related or not)
[17:55:43] <cradek> I'll see if I have a short one, thanks
[17:56:11] <cradek> it programs and does enough initial epp communication to not error on load...
[17:56:29] <cradek> seems like it must be almost working
[18:23:47] <cradek> nope, found a different very short and fat (high quality??) cable, same behavior
[18:25:06] <cradek> maybe a clue: debug-1 and all encoder.*.count jump to 3598 and stick there
[18:25:10] <cradek> bet that number means something
[18:29:39] <cradek> 2o3598p
[18:29:40] <cradek> 111000001110
[18:30:13] <cradek> and debug-0:
[18:30:13] <cradek> 235802126p
[18:30:14] <cradek> 1110000011100000111000001110
[18:34:53] <cradek> well crapo.
[18:45:10] <cradek> [ 18.418731] lp: driver loaded but no devices found
[18:45:10] <cradek> [ 18.469454] ppdev: user-space parallel port driver
[18:45:18] <cradek> wonder if the card is just bad
[18:55:34] <pcw_home> does the pluto servo driver check that the port is in EPP mode and check EPP timeouts?
[21:50:58] <jepler> cradek: :-(
[21:54:46] <jepler> pcw_home: yes, the pluto driver has code that intends to set epp mode after uploading firmware, and code that intends to check epp timeout bit once each read function execution
[21:55:14] <jepler> cradek: how did you determine the right ioaddr?
[21:55:33] <jepler> cradek: did you determine ioaddr_hi ?
[21:56:40] <cradek> jepler: lspci showed three io ports, two of them 0x400 apart, so i used the lower of those two for ioaddr
[21:56:41] <jepler> cradek: I could bring a mesa epp card to the office tomorrow if you like; that would help deterine if the port is totally not working
[21:57:00] <cradek> I bet I have one, but thank you
[21:57:11] <jepler> might be worth trying for the diagnostic value
[21:57:32] <jepler> it's a bit surprising if linux didn't detect it as a parallel port, but maybe the pci ids are just too fresh
[21:57:35] <jepler> what's in lspci?
[21:57:56] <cradek> someone else on the forum has failed to use a sun1989, but sun1988 seems to work
[21:58:13] <cradek> http://linuxcnc.org/index.php/english/forum/18-computer/28752-parallel-port-trying-epp-mode-chipset-sun19
[21:58:16] <cradek> 89#54769
[21:58:19] <cradek> oops
[21:58:33] <cradek> one sec, I'll get IDs
[22:00:03] <cradek> er maybe it's 1888 that works
[22:01:59] <cradek> 02:05.0 0701: 1fd4:1999 (prog-if 03 [IEEE1284])
[22:02:08] <cradek> 02:05.0 Parallel controller: SUNIX Co., Ltd. Multiport serial controller (prog-if 03 [IEEE1284])
[22:02:25] <cradek> Subsystem: SUNIX Co., Ltd. Device 0100
[22:02:53] <jepler> cradek: rtai, yes?
[22:03:02] <cradek> Linux sherline 3.4-9-rtai-686-pae #1 SMP PREEMPT Debian 3.4.55-4linuxcnc i686 GNU/Linux
[22:03:09] <jepler> I don't know if pluto's been tried on uspace
[22:03:34] <cradek> yes rtai, linuxcnc package 2.6.7
[22:04:40] <cradek> before I had ioaddr right, I got the "failed to communicate with the pluto after programming"
[22:04:41] <jepler> http://paste.debian.net/169215/ v3.8-rc5-99-gabd7bac
[22:05:03] <jepler> looks like this PCI ID was only added in kernel 3.8, which explains why your kernel wouldn't recognize it as a parport
[22:05:42] <jepler> it's weird that they rely on pci ids when there's a prog-if for IEEE1284
[22:05:55] <jepler> you'd sort of assume the prog-if was intended to be enough for the os to figure out how to use the device
[22:06:47] <cradek> can I fake it out with a modprobe.d alias?
[22:07:14] <jepler> I don't know how that wors
[22:07:16] <jepler> works
[22:07:34] <cradek> or I could just tweak one of the pci ids in the module
[22:07:47] <cradek> do you know what module does that end up in?
[22:07:52] <jepler> modprobe_pc I think
[22:08:04] <cradek> parport_pc?
[22:08:14] <jepler> er yeah
[22:08:57] <jepler> +#define PCI_VENDOR_ID_SUNIX 0x1fd4
[22:08:57] <jepler> +#define PCI_DEVICE_ID_SUNIX_1999 0x1999
[22:09:42] <cradek> can you pastebin the whole patch please?
[22:10:02] <jepler> http://paste.debian.net/169216/
[22:10:08] <jepler> sorry should have done that first time
[22:10:58] <CaptHindsight> any talk of a Linuxcnc fest this summer?
[22:12:16] <jepler> hmm this is worrying
[22:12:17] <jepler> +/* sunix_2s1p */ { 1, { { 3, -1 }, } },
[22:12:28] <jepler> the -1 is
[22:12:29] <jepler> int hi; /* -1 if not there, >6 for offset-method (max
[22:12:29] <jepler> BAR is 6) */
[22:15:15] <cradek> [ 859.823951] parport0: PC-style at 0xe800, irq 0 [PCSPP,TRISTATE,EPP]
[22:15:15] <cradek> [ 859.823965] parport0: irq 0 in use, resorting to polled operation
[22:15:16] <cradek> [ 859.920209] lp0: using parport0 (polling).
[22:15:23] <cradek> wonder if this is enough to make it work
[22:16:33] <cradek> ...nope
[22:18:18] <jepler> boo
[22:18:18] <jepler> 1. Choose your Motherboard or System Carefully.
[22:18:19] <jepler> When you buy a system or a motherboard, NEVER buy one that has less than three ISA slots, (one shared with PCI). Four, (one shared with PCI) is even better.
[22:18:59] <cradek> heh
[22:19:02] <cradek> yeah good advice
[22:19:07] <jepler> . Mice and keyboards could be moved to USB (though this will be slow in coming, if it ever does).
[22:19:36] <jepler> Overcoming Slot Shortages and IRQ Limitations on PCs -- Updated: 1 July 1998
[22:25:22] <cradek> welp looks like I just need to find a different card
[22:25:24] <cradek> thanks for helping
[22:25:43] <jepler> cradek: ineffectually :-/
[22:26:06] <jepler> cradek: want a whole machine? the one I developed uspace on, I know its epp works with mesa. but it's full size.
[22:26:18] <jepler> (pci-e parport card)
[22:27:03] <cradek> thanks, I can just go back to the old machine until I find a proper card, or we have a newer kernel on jessie
[22:27:32] <cradek> the only reason I tried to change machines is the marginal ram on the old one (256 MB max)
[22:27:55] <cradek> but it works
[22:29:51] <cradek> I should rebuild the whole thing based on mesa
[22:30:19] <cradek> I would have a long time ago if not for how it was all pretty, in a finished box, with power supply and motor drivers and pluto all boxed up together
[22:30:37] <cradek> it's a lot to reinvent
[22:31:52] <jepler> I'm not sure if it's going to work without ioaddr_hi
[22:32:46] <jepler> so I guess it depends on your willingness to wait vs wanting to not order more junk
[22:33:18] <cradek> what isn't going to work without ioaddr_hi?
[22:33:43] <jepler> ioaddr_hi is how you change from SPP to EPP modes
[22:33:57] <jepler> if(ioaddr_hi != -1) {
[22:33:57] <jepler> outb(0x80, ioaddr_hi + 0x2); // select EPP mode in ECR
[22:34:18] <jepler> so the code is obviously written as though ioaddr_hi is optional
[22:34:20] <cradek> oh is it not defaulted to +0x400? the manpage says it is
[22:35:47] <jepler> I think it's true if you pass ioaddr > 15 that it uses ioaddr + 0x400 for ioaddr_hi
[22:36:05] <jepler> but if that is not the base of the ECP registers then that outb isn't going to do what is desired
[22:36:30] <jepler> and the kernel patch seems to imply to me that there is not an ioaddr_hi
[22:36:32] <jepler> the -1 in 21:50:32 < jepler> +/* sunix_2s1p */ { 1, { { 3, -1 }, } },
[22:38:03] <jepler> (how irritating that sunix and sunxi are both things)
[22:38:29] <jepler> goodnight
[22:38:29] <cradek> also irritating how all the common-as-dirt moschip boards don't work
[22:38:32] <cradek> goodnight, thanks
[22:39:27] <jepler> peter should make a pci fpga board that implements epp mode properly
[22:39:41] <cradek> a 5i25 firmware!
[22:39:46] <jepler> people could buy it when they wanted to be sure their mesa epp board would work properly
[22:40:03] <jepler> <1/sqrt(2) wink>
[22:48:38] <CaptHindsight> I found some $10 PCIe EPP boards last year
[22:49:19] <CaptHindsight> some new Chinese silicon vendor make the chips
[22:50:50] <cradek> do you remember how they are marked?
[22:51:44] <CaptHindsight> http://www.ebay.com/itm/Parallel-Port-DB25-LPT-Printer-to-PCI-E-PCI-Express-Card-Adapter-Converter-/170992964709
[22:51:52] <CaptHindsight> WCH CH382L Chipset
[22:52:07] <cradek> oh that's -e
[22:52:23] <CaptHindsight> you want PCI for $10?
[22:52:37] <cradek> well I don't care much what it costs
[22:57:06] <CaptHindsight> http://www.ebay.com/itm/DB25-Printer-Parallel-Port-LPT-to-PCI-I-O-Card-Adapter-/181127357721 I'll double check these for you
[22:57:55] <cradek> this looks like one our wiki says works: http://www.ebay.com/itm/StarTech-com-Value-1-Port-PCI-Parallel-Adapter-Card-PCI1P-/231160425282?pt=LH_DefaultDomain_0&hash=item35d23c2b42
[22:58:23] <CaptHindsight> if they have them in stock
[22:58:39] <CaptHindsight> I think they were EOLed last year
[22:59:30] <cradek> thanks, I'll try one of those!
[23:00:40] <CaptHindsight> http://www.startech.com/Cards-Adapters/Parallel/1-Port-PCI-Parallel-Adapter-Card~PCI1P2
[23:00:59] <CaptHindsight> $32 direct from startech.com
[23:01:19] <CaptHindsight> Chipset ID Sunix - SUN1989
[23:03:56] <cradek> argh that's the one that doesn't work
[23:04:08] <cradek> wonder what I just bought
[23:04:09] <cradek> :-P
[23:04:16] <cradek> either way, I should go to bed
[23:04:47] <cradek> thanks CaptHindsight, jepler
[23:44:58] <zeeshan> i have velocity selected under view, but it doesnt show
[23:45:04] <zeeshan> is something wrong with my .ini? :)
[23:45:16] <zeeshan> or am i exploiting a bug