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

Not all membership take off #50

Open
shiva02 opened this issue Jun 24, 2015 · 18 comments
Open

Not all membership take off #50

shiva02 opened this issue Jun 24, 2015 · 18 comments

Comments

@shiva02
Copy link
Contributor

shiva02 commented Jun 24, 2015

Re,

All the member does not take off.

This is my swarm var :
"var swarm = new Swarm({membership:'RS_A112233,RS_B112233,RS_C112233',timeout: 10});
I can not control all the drones, only one of them takes off and not necessarily the same at each execution. Can you help me again ?

Thanks a lot

Shiva02

@voodootikigod
Copy link
Owner

Hey @shiva02

Can you run again with

DEBUG=rollingspider node eg/swarm.js

Then provide the output here. Your issue with non-members could be due to the timeout (10s) not allowing all of them to register/setup/join.

Also I have never seen a local name with RS_A or RS_C ... like ever... can you verify thats the correct names by running

node eg/discover.js

and pasting the output in the comment as well!

@shiva02
Copy link
Contributor Author

shiva02 commented Jun 24, 2015

Yep,
RS_A B C, it's just an exemple...you are right I have RS_B or R.

For the debug how to provide the output ?I'm sorry, I'm a beginner hehe

@voodootikigod
Copy link
Owner

No worries about being a beginner (aren't we all anyways?) happy to help out!

Best way to provide long files of data is to create a new Gist and paste it in there. You can paste in multiple files to a single "gist". Once you are done pasting in, just copy the URL and paste it in here!

Cheers

@shiva02
Copy link
Contributor Author

shiva02 commented Jun 24, 2015

Thank you for your response, I try to do a little choreography with drones..
Degug result : https://gist.github.com/a70fd4b7af83229f8a9f.git

I hope it's ok for you

@shiva02
Copy link
Contributor Author

shiva02 commented Jun 24, 2015

For precision, I use a temporal module for execute swarm action with time sequence (like eg/index.js)
New link for debug file if first not work :
https://gist.github.com/shiva02/a70fd4b7af83229f8a9f

@shiva02
Copy link
Contributor Author

shiva02 commented Jun 25, 2015

Hello, sorry back to you but I would really like to understand what is happening. Perhaps can be should i do save the drones in blutooth with linux command "hci" specific or simply click on "to trust" for each of the drones in blutooth interface linux?
Best regard

Shiva02

@johnelliott
Copy link

@voodootikigod great to see swarm is working :)

@aamodh
Copy link

aamodh commented Nov 17, 2015

shiva02 did you figure out a solution? I am facing a similar problem with 3 drones. Not all of them are connecting even though it recognises their existence. I played around with the timeout values but still its pretty unpredictable.

@shiva02
Copy link
Contributor Author

shiva02 commented Nov 18, 2015

Good evening, I'm travelling, I do not have my development computer. I try to
recover my code and you answers. I have managed to make six drones take off
at the same time but it is not "super" reliable. This end of week i gives
you information..

Best regards

Le mercredi 18 novembre 2015, aamodh [email protected] a écrit :

shiva02 did you figure out a solution? I am facing a similar problem with
3 drones. Not all of them are connecting even though it recognises their
existence. I played around with the timeout values but still its pretty
unpredictable.


Reply to this email directly or view it on GitHub
#50 (comment)
.

@aamodh
Copy link

aamodh commented Nov 18, 2015

Oh thanks for your reply. That sounds promising. Not a problem, I'll wait for your updates :).

@anandx
Copy link

anandx commented May 23, 2016

Hi there, I am having the same problem reliably connecting to all 3 of my drones. 80% of the time it will connect to only 1. Very rarely 2 but never all 3. My logs look the same as shiva's above.

Any thoughts whats up? I'm sending the UUIDs, and forceConnect does not seem to help either. All 3 UUIDs do show up in discover.js however. @voodootikigod Any ideas?

@anandx
Copy link

anandx commented May 23, 2016

After digging a little deeper into what's happening, sometimes the drones that don't connect are returning "undefined is not a member" in the assemble() function. I've added code to output the peripheral object and you can see that peripheral.advertisement does not contain a localName or manufacturerData field for the "not a member" drone.

See logger output here, key lines tagged with "$$$$$$$$$$$$":
https://gist.github.com/anandx/3502dca57f53c42c2ccefe86905263f5

This is especially strange because when I dump the peripheral objects in discover.js they contain well formed advertisement objects for all 3 drones. What the heck is going on! Is this problem at the noble level or node-rolling-spider?

(Note: there is also 1 drone that appears in discover but is not visible at all in the gist output, but thats another problem)

@aamodh
Copy link

aamodh commented May 23, 2016

Hi Anand
I faced numerous issues as well, I did manage to fly 3 drones at once but
there was considerable lag especially if I was sending different commands
(15-20 times a sec) to each drone. I think its the noble platform itself,
but i am not sure. So now I am connecting each drone to individual
Bluetooth dongle and have different virtual machines running
simultaneously. I am still testing this out, will keep you posted. Please
do let me know if you figure out a reliable way to control multiple drones.
On May 23, 2016 7:26 PM, "Anand Agarawala" [email protected] wrote:

After digging a little deeper into what's happening, sometimes the drones
that don't connect are returning "undefined is not a member" in the
assemble() function. I've added code to output the peripheral object and
you can see that peripheral.advertisement does not contain a localName or
manufacturerData field for the "not a member" drone.

See logger output here, key lines tagged with "$$$$$$$$$$$$":

https://gist.github.com/anandx/3502dca57f53c42c2ccefe86905263f5

This is especially strange because when I dump the peripheral objects in
discover.js they contain well formed advertisement objects for all 3
drones. What the heck is going on! Is this problem at the noble level or
node-rolling-spider?

(Note: there is also 1 drone that appears in discover but is not visible
at all in the gist output, but thats another problem)


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#50 (comment)

@anandx
Copy link

anandx commented May 24, 2016

Hi @aamodh,
Thanks for your reply! How did you eventually get the 3 drones running? Only 2 of 3 connect for me and thats only about 20% of the time. When they do however they move quiet in sync and without lag.

@anandx
Copy link

anandx commented May 24, 2016

Further update. I think the problem may well be in the node-rolling-spider swarm.js code.

I modified eg/discover.js to include .connectPeripheral() code from swarm.js. code here. And when I do it is able to connect & setup to all 3 drones 100% of the time! logs. Whereas I can't even reliably get 3 peripheral.advertisement.manufacturerData fields in swarm.js

So maybe there is some funkiness in how swarm.js is connecting? The code does seem to be pretty involved, having some trouble wrapping my head around it.

@anandx
Copy link

anandx commented Jun 3, 2016

Btw, i got swarms to reliably work communicating with each drone direclty. Not sure what is going on in swarm.js as the code is quite involved but this simple approach works for me. Hope they can fix swarm.js!

swarm-lite.js

@lynnaloo
Copy link
Collaborator

lynnaloo commented Apr 5, 2017

@anandx does the current swarm.js work for you?

@mztor
Copy link

mztor commented May 26, 2018

Your fix was really helpful @anandx. The only other thing we had to do was comment out line 223 in drone.js:
this.ble.stopScanning();
This was a line in the connectPeripheral function. Not sure what it does, but hopefully, commenting it out won't be too big a deal.
Thank you so much!

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

7 participants