<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[SoliForum - 3D Printing Community — python comm with davinci]]></title>
	<link rel="self" href="https://www.soliforum.com/feed/atom/topic/9505/" />
	<updated>2015-02-02T22:53:31Z</updated>
	<generator>PunBB</generator>
	<id>https://www.soliforum.com/topic/9505/python-comm-with-davinci/</id>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/82931/#p82931" />
			<content type="html"><![CDATA[<p>I presume the xyzware binaryies up its gcode file for transmission to the printer with the checksum etc.<br />So one approach is to intercept the sent gcode when it is translated to the ascii on the sd card, but before it is<br />feed to the printer operation. Specifically the first use for me is to set the bed to 110.<br />Regards Pi, its all good but I have other hardware to use.</p>]]></content>
			<author>
				<name><![CDATA[pricecg44]]></name>
				<uri>https://www.soliforum.com/user/8553/</uri>
			</author>
			<updated>2015-02-02T22:53:31Z</updated>
			<id>https://www.soliforum.com/post/82931/#p82931</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/82929/#p82929" />
			<content type="html"><![CDATA[<p>sorry for mis reading you. I have an post attention deficit syndrome. I occassionally do not read fully, skip&nbsp; or simply miscomprehend posts.<br />Again sorry.</p>]]></content>
			<author>
				<name><![CDATA[pricecg44]]></name>
				<uri>https://www.soliforum.com/user/8553/</uri>
			</author>
			<updated>2015-02-02T22:48:44Z</updated>
			<id>https://www.soliforum.com/post/82929/#p82929</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/82920/#p82920" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>pricecg44 wrote:</cite><blockquote><p>The pi route I will not try.</p></blockquote></div><p>I don&#039;t really understand why - you get that the Pi just connects to the USB port, right? Might want to take a moment and actually check out Octoprint before ruling it out.</p><p>In any case, best of luck to ya.</p>]]></content>
			<author>
				<name><![CDATA[montressor]]></name>
				<uri>https://www.soliforum.com/user/8492/</uri>
			</author>
			<updated>2015-02-02T21:54:24Z</updated>
			<id>https://www.soliforum.com/post/82920/#p82920</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/82823/#p82823" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>pricecg44 wrote:</cite><blockquote><p>Absolutely will not muck around grabbing the micro SD card from the back of the print every time I need to change something. It must be wifi or usb.</p></blockquote></div><br /><p>You are somewhat of a selective reader?</p><p>I said get an sd card extension cable and relocate the card to inside of the print area. Mine is just below the bed where I can easily reach it. I have to print from the card all the time due to a weird bug with my version of Repetier host that won&#039;t allow a print that goes over 20 minutes.</p><p>They do make them for micro SD, you just have to order on Ebay from China.</p>]]></content>
			<author>
				<name><![CDATA[carl_m1968]]></name>
				<uri>https://www.soliforum.com/user/7731/</uri>
			</author>
			<updated>2015-02-02T01:20:58Z</updated>
			<id>https://www.soliforum.com/post/82823/#p82823</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/82819/#p82819" />
			<content type="html"><![CDATA[<p>Absolutely will not muck around grabbing the micro SD card from the back of the print every time I need to change something. It must be wifi or usb.</p>]]></content>
			<author>
				<name><![CDATA[pricecg44]]></name>
				<uri>https://www.soliforum.com/user/8553/</uri>
			</author>
			<updated>2015-02-02T00:35:29Z</updated>
			<id>https://www.soliforum.com/post/82819/#p82819</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/82815/#p82815" />
			<content type="html"><![CDATA[<p>Why not just load the gcode to sdcard and then print from the printers LCD? Just name the gcode one of the sample file names like SAMPLE01 and then call it up on the LCD and print it. There is no altering firmware or software and you can use any slicer you want. You just have to change all the G0 commands to G1 as the firmware does not understand G0 which is fast moves.</p><p>Just get an extension cable and route it so the card is inside the print area where you can get to it easily.</p>]]></content>
			<author>
				<name><![CDATA[carl_m1968]]></name>
				<uri>https://www.soliforum.com/user/7731/</uri>
			</author>
			<updated>2015-02-02T00:22:09Z</updated>
			<id>https://www.soliforum.com/post/82815/#p82815</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/82810/#p82810" />
			<content type="html"><![CDATA[<p>Can I ssh from a mac to the xyz printer on the usb?&nbsp; Now where&#039;s that cd from the xyzprinting box to install it on the mac (pc scripting environment is lacking)?<br />The pi route I will not try. Once I have a wifi connection to the printer I hope to have a perl script that monitors the<br />offline gcode file, note any modification date change and then do any gcode file change, upload it before the firmware reads the file<br />if that is possible.&nbsp; </p><p>But I still would like to do sd card upload and print inititation without the xyzware crappoware.<br /> I want the xyzware on the mac so i can <br />sniff its usb traffic a bit more than that previous thread did. I&#039;ve got a python usb library for that.</p>]]></content>
			<author>
				<name><![CDATA[pricecg44]]></name>
				<uri>https://www.soliforum.com/user/8553/</uri>
			</author>
			<updated>2015-02-01T23:42:05Z</updated>
			<id>https://www.soliforum.com/post/82810/#p82810</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/82793/#p82793" />
			<content type="html"><![CDATA[<p>If that doesn&#039;t work for you and you have a raspberry pi lying around, you can always go the OctoPrint route and effectively use the Pi as a print server. I believe OctoPrint is actually already written in Python, so they&#039;ve already dealt with the communication to the printer. However, if you want to play, you can always ssh in to the Pi and write to the serial port attached to the USB comm.</p>]]></content>
			<author>
				<name><![CDATA[montressor]]></name>
				<uri>https://www.soliforum.com/user/8492/</uri>
			</author>
			<updated>2015-02-01T21:30:27Z</updated>
			<id>https://www.soliforum.com/post/82793/#p82793</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/82692/#p82692" />
			<content type="html"><![CDATA[<p>I will try the alternative wifi sd card. Unfortunately there is no local micro sd card wifi (anywhere too small?)<br />I got a standard sd wifi card and attempted a diy micro to sd card convertor. It failed with no card initiation.<br />But have just ordered this<br /><a href="http://www.dx.com/p/sd-to-microsd-transflash-card-converter-module-27001#.VM3Hryjq9Wa">http://www.dx.com/p/sd-to-microsd-trans … M3Hryjq9Wa</a></p>]]></content>
			<author>
				<name><![CDATA[pricecg44]]></name>
				<uri>https://www.soliforum.com/user/8553/</uri>
			</author>
			<updated>2015-02-01T06:29:39Z</updated>
			<id>https://www.soliforum.com/post/82692/#p82692</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/81691/#p81691" />
			<content type="html"><![CDATA[<p>Just xyzware firmware. Don&#039;t want to touch firmware yet. Just playing with code.</p>]]></content>
			<author>
				<name><![CDATA[pricecg44]]></name>
				<uri>https://www.soliforum.com/user/8553/</uri>
			</author>
			<updated>2015-01-26T19:27:47Z</updated>
			<id>https://www.soliforum.com/post/81691/#p81691</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/81651/#p81651" />
			<content type="html"><![CDATA[<p>Haven&#039;t tried this but it seems very interesting. Are you running stock firmware or Repetier?</p>]]></content>
			<author>
				<name><![CDATA[montressor]]></name>
				<uri>https://www.soliforum.com/user/8492/</uri>
			</author>
			<updated>2015-01-26T16:04:23Z</updated>
			<id>https://www.soliforum.com/post/81651/#p81651</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[python comm with davinci]]></title>
			<link rel="alternate" href="https://www.soliforum.com/post/81521/#p81521" />
			<content type="html"><![CDATA[<p>Has anyone tried the python communication script?<br />I tried to use it to send the minimal.gcode file to the<br />printer but it came back with the checksum failure.<br />It does the reporting stuff fine.</p><p>I found on the repetier sites a mention of the fletcher-16 being the<br />checksum algo. heres a python impl:<br /></p><div class="codebox"><pre><code>def checksumByXOR(text):
  cs = 0
  for x in str(text):
     cs ^= ord(x)
  return cs

def readn(fin, n):
    s = 0
    for ti in fin.read(n):
        s = s * 256 + ord(ti)
    return s
     
def fletcher(fin, k):
    if  k not in (16, 32, 64):
        raise ValueError(&quot;Valid choices of k are 16, 32 and 64&quot;)
    nbytes = k // 16
    mod = 2 ** (8 * nbytes) - 1
    s = s2 = 0
    t = readn(fin, nbytes)
    while t:
        s += t
        s2 += s 
        t = readn(fin, nbytes)
    return s % mod + (mod + 1) * (s2 % mod)</code></pre></div><p>Still having the checksum failure, suspect it is where you place the checksum in the transmission.</p>]]></content>
			<author>
				<name><![CDATA[pricecg44]]></name>
				<uri>https://www.soliforum.com/user/8553/</uri>
			</author>
			<updated>2015-01-25T22:39:41Z</updated>
			<id>https://www.soliforum.com/post/81521/#p81521</id>
		</entry>
</feed>
