sumanth
Posts: 4
Joined: Wed Jul 18, 2018 12:32 pm

Raspberry Pi not connecting with Brick Pi

Thu Jul 19, 2018 6:47 am

I am using Raspberry Pi 3 Model B+ and a BrickPi board. I have also modified installed Raspbian OS by following the steps mentioned in https://www.dexterindustries.com/BrickP ... d/pi-prep/

After this step, I have connected the motor and tried to test the motor by running the motor_sensor.py

The following error is coming up:

[email protected]:~ $ python motor_sensor.py
Traceback (most recent call last):
File "motor_sensor.py", line 7, in <module>
BrickPiSetupSensors()
File "build/bdist.linux-armv7l/egg/BrickPi.py", line 492,
in BrickPiSetupSensors
File "build/bdist.linux-armv7l/egg/BrickPi.py", line 698,
in BrickPiFlush
File "/usr/lib/python2.7/dist-packages/serial/serialutil.py",
line 572, in inWaiting
return self.in_waiting
File "/usr/lib/python2.7/dist-packages/serial/serialposix.py",
line 456, in in_waiting
s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
IOError: [Errno 25] Inappropriate ioctl for device
motor_sensor.py script is as follows:

from BrickPi import *

BrickPiSetup()

BrickPi.MotorEnable[PORT_A] = 1

BrickPiSetupSensors()

BrickPi.MotorSpeed[PORT_A] = 200

BrickPiUpdateValues()


I asked this question and I got a reply from Dexter Industries Engineer saying that
"The original BrickPi and the BrickPi+ are not supported on Raspbian Stretch. You will need to use an older version of Raspbian, such as Jessie or Wheezy.

From your description and output message, it seems like an issue with the RPi software, not the BrickPi firmware"



How can I switch to Raspbian Jessie or Wheezy from Stretch and is it recommendable??

User avatar
The Traveler
Posts: 363
Joined: Sat Oct 21, 2017 3:48 pm

Re: Raspberry Pi not connecting with Brick Pi

Thu Jul 19, 2018 12:50 pm

How can I switch to Raspbian Jessie or Wheezy from Stretch
If it solves your problem simply burn an SD card with an older versions and use it. Otherwise, it appears your out of luck unless the Dexter Industries people want to update their software to work with Stretch.
Retired IT professional, C programmer and "beardie weirdie".
RPi interests: Developing an Infinite Improbability Drive
“Thinking outside of the box allows you to get rewards outside of your reach.” Matshona Dhliwayo

pcmanbob
Posts: 7673
Joined: Fri May 31, 2013 9:28 pm
Location: Mansfield UK

Re: Raspberry Pi not connecting with Brick Pi

Thu Jul 19, 2018 2:24 pm

Your problem now becomes Jessie does not support the pi 3B+ because it does not have the correct files to support the new networking on the pi 3B+.

It can be made to work I believe but you would need a pi 3B or a pi 2B to be able to update the OS before putting the SD card in the pi 3B+.

if you search this forum to should find details on how to do it.
We want information… information… information........................no information no help
The use of crystal balls & mind reading are not supported

User avatar
DougieLawson
Posts: 36816
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Raspberry Pi not connecting with Brick Pi

Thu Jul 19, 2018 3:53 pm

Since all the code is available at: https://github.com/DexterInd/BrickPi you may be able to hack that and get it working on Stretch. Then send your changes back as a pull request.

One thing that sticks out is the serial devices changed. So this line in BrickPi.py may need a tweak

Code: Select all

ser.port='/dev/ttyAMA0'
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Return to “Beginners”