Welcome! Log In Create A New Profile

Advanced

serial port errors on ubuntu (orca with gen6 deluxe electronics)

Posted by pete-theobald 
serial port errors on ubuntu (orca with gen6 deluxe electronics)
February 05, 2012 02:45PM
Hi Everyone,
I'm trying to get the mendel-parts gen6 deluxe electronics working in ubuntu. It works fine under windows 7 but its failing on two different ubuntu machines. I definitely have access to the serial port and the same erors happening if I run pronterface as root and also if I chmod the usb serial port to 0777.

Whenever I try to connect, I get an exception from pyserial. This is the output


Connecting...
Exception in thread Thread-1:
Traceback (most recent call last):
File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
self.run()
File "/usr/lib/python2.6/threading.py", line 484, in run
self.__target(*self.__args, **self.__kwargs)
File "/home/pete/Projects/printrun/printcore.py", line 91, in _listen
self.send_now("M105")
File "/home/pete/Projects/printrun/printcore.py", line 210, in send_now
self._send(command)
File "/home/pete/Projects/printrun/printcore.py", line 282, in _send
self.printer.write(str(command+"\n"))
File "/usr/lib/python2.6/dist-packages/serial/serialposix.py", line 328, in write
if self.fd is None: raise portNotOpenError
SerialException: Port not open


I've updated ubuntu but its 10.04 on both versions (I don;t like the new desktop!). The only thing I can think of is the baud rate. It needs to be 250000 which works under windows but i'm wondering if theres something in the linux driver that prevents that from working. I'd need to update the firmware in the board to change it.

Pete
Hey there,

Sorry i cannot help you with your problem, as I cannot even get my gen6 deluxe set up right at all on windows, mac or ubuntu. I spent hours trying to get firmware on it, any firmware. after about 36 hours I got the gen3 firmware on it, X, Y and the extruder were working fine, end stops and all, but the Z just would not work at all, it would only work in one direction. So today I got the marlin firmware on. Now the Z and extruder is working well (up and down perfect) but now the X and Y are not working, only going one direction and making strange high pitched noises.

Can you tell me what you did to get correct firmware installed? I'm running a gen6 delux with a 'durbie' prusa mendel. I can work with Win XP, Mac OSX or ubuntu whichever is easier.

Thanks
Ger T
Re: serial port errors on ubuntu (orca with gen6 deluxe electronics)
February 17, 2012 05:30PM
I figured out the problem and its a very difficult one to find. The FTDI drivers under linux only support a few baud rates. The windows drivers support a much greater range. The firmware on mendel-parts is set to 250000 and the FTDI driver silently rejects it. To fix it you need to change the baud rate in configuration.h to the baud rate you need and upload it. You need to press reset on the board just before uploading or you'll get errors. I've only tried this with 115200 so far but i've seen another post mentioning using 230400 so I assume it would also be fine.
Pete
Re: serial port errors on ubuntu (orca with gen6 deluxe electronics)
February 18, 2012 10:02AM
I'm still having problems on ubuntu. I can definitely communicate with the gen6 board. Setting the temp works and home works. Basicaly any individual commands work but trying to print a part fails very quickly (If i'm lucky it finishes printing the outline). Heres a sample from the command prompt
Estimated duration (pessimistic):  25 layers, 00:05:46
ok T:209.45
Print Started at: 14:08:29
ok T:210.29
Error: No Checksum with line number, Last Line:8
Resend:9
Error: checksum mismatch, Last Line:13
Resend:14
Error: checksum mismatch, Last Line:15
Resend:16
Serial Error: Line Number is not Last Line Number+1, Last Line:19
Resend:20
Error: checksum mismatch, Last Line:20
Resend:21
Disconnected.
Connecting...
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 505, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/pete/Projects/printrun/printcore.py", line 96, in _listen
    line=self.printer.readline()
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 449, in read
    buf = os.read(self.fd, size-len(read))
TypeError: an integer is required

Error: No Checksum with line number, Last Line:25
Resend:26
Printer is now online.

The baud rates set to 115200 at the moment which might be slower than needed. I'll try changing it to 230400 or 460800 later on
Pete
Very helpful. Thank you!
Max 115200 baud under Ubuntu.
Sorry, only registered users may post in this forum.

Click here to login