RVR No serial comms detected

This is my initial setup. I got the libraries installed, I can run python files just fine.
I was able to echo my serial port RX/TX, but when I connect to the RVR there are no comms.
I verified that there were no updates in the Sphero EDU app.
I am not sure what to do next.
Thoughts?

I am trying some examples in the getting_started folder and this is the error I am receving:

Traceback (most recent call last):
File “/usr/lib/python3.7/threading.py”, line 926, in _bootstrap_inner
self.run()
File “/usr/lib/python3.7/threading.py”, line 870, in run
self._target(*self._args, **self._kwargs)
File “/home/ubuntu/Documents/RVR/sphero-sdk-raspberrypi-python/sphero_sdk/observer/client/dal/serial_observer_port.py”, line 49, in __serial_rw
self.__read_bytes()
File “/home/ubuntu/Documents/RVR/sphero-sdk-raspberrypi-python/sphero_sdk/observer/client/dal/serial_observer_port.py”, line 52, in __read_bytes
bytes_in_waiting = self.__ser.in_waiting
File “/home/ubuntu/.local/share/virtualenvs/sphero-sdk-raspberrypi-python-uyky5ec6/lib/python3.7/site-packages/serial/serialposix.py”, line 467, in in_waiting
s = fcntl.ioctl(self.fd, TIOCINQ, TIOCM_zero_str)
OSError: [Errno 25] Inappropriate ioctl for device

1 Like

Hey @wegunterjr!

Am I correct in understanding that you can run general python files, but are having trouble running the Sphero SDK python files?

And you are running Ubuntu on a Pi? And adding the Sphero SDK is the first thing you are doing with your Pi running Ubuntu?

Which Pi are you using? Are you able to attach a photo of how your Pi is connected to RVR?
The issue may be as simple as the Sphero code looking for pins other than those you are connected to; if this is the case, you can change the pins in the code OR in your wiring configuration :relaxed:

Additionally, is your Pi definitely set up as a serial port, but not a serial console?

Looking forward to hearing your thoughts!

Kelsey

1 Like

It might be related to the version of python i had installed. I am using my pi for something in addition to this and it had 2.7 and 3.5.2 installed. I was able to get 3.7 installed on another pi os just to verify and I was able to communicate.
Wires were correct and I got data.
Now, I am stuck again. Do you have thoughts on which is the lowest version of Python?

1 Like

so, i verified that python 3.7 was installed and tested serial comms by connecing RX to TX and seeing the output match.
Now, I have an issue with comms returning without results from the RVR.
Am I missing anything?
File “/usr/lib/python3.7/asyncio/tasks.py”, line 449, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError

In the linux environment, I have this on my pi 3 B -

lrwxrwxrwx 1 root root 7 Feb 11 2016 /dev/serial0 -> ttyAMA0

and I edited my port in:

/sphero_sdk/asyncio/client/dal/serial_async_dal.py

def init(self, loop=None, port_id=’/dev/ttyAMA0’, baud=115200):

1 Like

pip3 freeze output:

actionlib==1.11.13
aiohttp==3.6.2
angles==1.9.11
astro-pi==1.1.5
async-timeout==3.0.1
attrs==19.3.0
base-local-planner==1.14.4
bondpy==1.8.3
camera-calibration==1.12.23
camera-calibration-parsers==1.11.13
Cap1xxx==0.1.2
catkin==0.7.18
certifi==2019.11.28
cffi==1.13.2
chardet==3.0.4
command-not-found==0.3
controller-manager==0.13.3
controller-manager-msgs==0.13.3
cryptography==2.8
cv-bridge==1.12.8
defer==1.0.6
diagnostic-analysis==1.9.3
diagnostic-common-diagnostics==1.9.3
diagnostic-updater==1.9.3
docopt==0.6.2
drumhat==0.0.5
dynamic-reconfigure==1.5.50
empy==3.3.2
envirophat==0.0.6
evdev==0.4.7
ExplorerHAT==0.4.2
gencpp==0.6.0
geneus==2.2.6
genlisp==0.4.16
genmsg==0.5.11
gennodejs==2.0.1
genpy==0.6.7
gpiozero==1.3.1
idna==2.8
image-geometry==1.12.8
interactive-markers==1.11.4
language-selector==0.1
laser-geometry==1.6.4
lightdm-gtk-greeter-settings==1.2.1
lxml==3.5.0
message-filters==1.12.14
microdotphat==0.1.3
mote==0.0.3
motephat==0.0.2
multidict==4.7.3
numpy==1.11.0
pantilthat==0.0.2
pexpect==4.0.1
pianohat==0.0.5
picamera==1.12
pifi==0.6.0
piglow==1.2.4
pigpio==1.30
Pillow==3.1.2
pipenv==2018.11.26
pluginlib==1.11.3
ptyprocess==0.5
pycparser==2.19
pycups==1.9.73
pycurl==7.43.0
pygobject==3.20.0
pyserial==3.4
pyserial-asyncio==0.4
python-apt==1.1.0b1+ubuntu0.16.4.5
python-debian==0.1.27
python-networkmanager==2.0.1
python-qt-binding==0.3.4
python-systemd==231
PyYAML==3.11
qt-dotgraph==0.3.11
qt-gui==0.3.11
qt-gui-cpp==0.3.11
qt-gui-py-common==0.3.11
rainbowhat==0.0.1
reportlab==3.3.0
requests==2.9.1
resource-retriever==1.12.4
robot-upstart==0.3.0
rosapi==0.11.1
rosbag==1.12.14
rosboost-cfg==1.14.6
rosbridge-library==0.11.1
rosbridge-server==0.11.1
rosclean==1.14.6
roscreate==1.14.6
rosgraph==1.12.14
roslaunch==1.12.14
roslib==1.14.6
roslint==0.11.0
roslz4==1.12.14
rosmake==1.14.6
rosmaster==1.12.14
rosmsg==1.12.14
rosnode==1.12.14
rosparam==1.12.14
rospy==1.12.14
rosservice==1.12.14
rostest==1.12.14
rostopic==1.12.14
rosunit==1.14.6
roswtf==1.12.14
RPi.GPIO==0.6.3
rqt-action==0.4.9
rqt-bag==0.4.12
rqt-bag-plugins==0.4.12
rqt-console==0.4.8
rqt-dep==0.4.9
rqt-graph==0.4.9
rqt-gui==0.5.0
rqt-gui-py==0.5.0
rqt-image-view==0.4.13
rqt-launch==0.4.8
rqt-logger-level==0.4.8
rqt-moveit==0.5.7
rqt-msg==0.4.8
rqt-nav-view==0.5.7
rqt-plot==0.4.8
rqt-pose-view==0.5.8
rqt-publisher==0.4.8
rqt-py-common==0.5.0
rqt-py-console==0.4.8
rqt-reconfigure==0.4.10
rqt-robot-dashboard==0.5.7
rqt-robot-monitor==0.5.8
rqt-robot-steering==0.5.9
rqt-runtime-monitor==0.5.7
rqt-rviz==0.5.10
rqt-service-caller==0.4.8
rqt-shell==0.4.9
rqt-srv==0.4.8
rqt-tf-tree==0.6.0
rqt-top==0.4.8
rqt-topic==0.4.10
rqt-web==0.4.8
RTIMULib==7.2.1
rviz==1.12.17
scrollphat==0.0.7
sense-emu==1.0
sense-hat==2.2.0
sensor-msgs==1.12.7
six==1.10.0
smach==2.0.1
smach-ros==2.0.1
smclib==1.8.3
sn3218==1.2.6
spidev==3.0
ssh-import-id==5.5
st7036==1.4.3
tf==1.11.9
tf-conversions==1.11.9
tf2-geometry-msgs==0.5.20
tf2-kdl==0.5.20
tf2-py==0.5.20
tf2-ros==0.5.20
topic-tools==1.12.14
ubuntu-drivers-common==0.0.0
ufw==0.35
unattended-upgrades==0.1
urllib3==1.13.1
virtualenv==16.7.9
virtualenv-clone==0.5.3
xacro==1.11.3
xkit==0.0.0
yarl==1.4.2

1 Like

looks like I overcomplicated the issue. I am using Ubuntu Xenial which is compiled to run on the pi 3 B.
I had to remember that this setup uses /dev/serial0 which links to /dev/ttyAMA0 - and had to enable
dtoverlay=pi3-miniuart-bt

I am in the pipenv shell with python = 3.5.2, and I was successful in reading from the RVR. WOOHOO!!
Now, on reboot, it just hangs… meaning, in the asyncio folder, get_battery_state.py just sits there… doesn’t fail, doesn’t show ‘Checking Firmware’ or anything… just sits there?
Thoughts?

UPDATE
Looks like it was my misunderstanding of what disabling or enabling bluetooth does on the pi3 b
I changed to this in the /boot/config.txt and now I have comms using python3.5.2 in the pipenv

pi3-disable-bt

1 Like