Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad SOF RuntimeError #11

Open
irmingard opened this issue Sep 5, 2016 · 3 comments
Open

Bad SOF RuntimeError #11

irmingard opened this issue Sep 5, 2016 · 3 comments

Comments

@irmingard
Copy link

What am I doing wrong if I get this line/error?

Line 837: raise RuntimeError("Bad SOF : " + self.data2hexstr(data))

I'm assuming it's because the connections weren't shut down correctly during a previous run, however, I do not know what to do besides calling the disconnect method for each Sphero before exiting a script run.

Any ideas, @mmwise and others?

@davinellulinvega
Copy link
Contributor

I think this is the same problem as before (#7), because no care is given to the state of the buffer at any time and because the author relies on precise indexing to unpack messages whenever you have data left in the buffer it will raise some kind of exception.
So it does not mean you are doing anything wrong, but rather that the source code should be revised to correct those errors.

@miscott
Copy link

miscott commented Dec 11, 2016

Hello,
I am running into a similar error. I am using the node to control several spheros for some research work. Is there a way either of you know how to just clear all data from the socket at the begging of the script? That way this error won't occur anymore?
Thanks!

@darin-costello
Copy link

clearing the buffer doesn't work.I too work with multiple spheros, what you need to do is make sure the packets are formed correctly by calculating a checksum and see if it matches, If it doesn't then read to the beginning of a packet (or what looks like the beginning) and try again. I have the changes on a private repo, but if you message me I can send you my updated driver file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants