RPI3 ubuntu serial connection error

Hi, I decided to edit my image to use with brickPi, so far was good but im stuck with this error:

>>> from BrickPi import * ; BrickPiSetup() ; BrickPi.MotorEnable[PORT_A] = 1 ; BrickPiSetupSensors();
0
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-armv7l/egg/BrickPi.py", line 480, in BrickPiSetupSensors
  File "build/bdist.linux-armv7l/egg/BrickPi.py", line 684, in BrickPiFlush
  File "/usr/lib/python2.7/dist-packages/serial/serialutil.py", line 538, in inWaiting
    return self.in_waiting
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 464, in in_waiting
    s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
IOError: [Errno 25] Inappropriate ioctl for device

I tried disabling getty
I edited /boot/config.txt and enabled everything with spi or i2c
I edited /boot/cmdline.txt and checked it without AMA0 and without “console” part at all

Don’t know what I can do next… Please help me

Hi @mike2060,

Can you tell us which OS, you are using on your Pi. We have tested the software only with the Raspbian image and don’t know if it would be successful with other operating systems.

-Shoban

I’m not sure where this error is coming from; we’ve had trouble with Ubuntu on this sort of thing before. When I google it, I get a bunch of results that are focused around networking errors; could it be a network problem with Ubuntu?

Im using ubuntu mate. Id like to use java so in
theory it should work. Currently I’m testing using python and that’s
where I got this error. If python cant access gpio ports then java
probably cant also.

Got it. Might take a little more research to figure out what’s going on, it probably has something to do with how Ubuntu is configuring the serial ports.

I’ve done all I could find in google and stack on how to make ubuntu read gpio, serial, etc. Maybe wiringPi doesn’t include special case for such ubuntu? Is there anything more I can provide you so you can help?

Hey @mike2060, We’ve been discussing this internally for a few days. Knowing the problem lies with Ubuntu, I’m not sure we can help; we don’t support Ubuntu because we just don’t know much about it. The issue is probably with wiringPi and Ubuntu but further than that, we can’t help much. Is there any way you can burn an SD Card with Raspbian for Robots? The software is free and available for download and install here.

Yeah, sure, got it already burned. I will use it then. Thank you very much for looking into this.

Let us know how it goes!