Lego Mindstorm Bluetooth error


My friend and I are building an app that allows you to control the motors on a lego Mindstorm (ev3). However, when testing we have been given 2 error codes (516, 517) which translate to the Bluetooth not being able to read and write the connection. We were also given error 3102 - Unable to receive a reply or the reply cannot be understood.

We’re unsure how to resolve this issue, any suggestions would be helpful!
Thanks in advance!

Hello Molly

Hopefully we can help, we don’t see many Lego questions but we get Bluetooth questions every day… We need to see your Blocks (right-mouse menu, export Blocks as image). First though, ensure that your (smart phone?) is setup properly - bluetooth on, location on.

Hey @ChrisWard ,

Thanks for the help! I’ll check the location settings in a second but in the meantime here is the block code:


Have you paired your EV3 with your phone via bluetooth before using the app?

1 Like

Yes, we have connected via smartphone settings and paired the two devices. There is a section within the app to select the Bluetooth device which is where the errors present themselves, after selecting the EV3.

I know cause I also made a small app for my EV3. For example if ev3 is not present (turned on) you should have received an error 507 unable to connect. Does your EV3 connects to pc ? Can you send program via bluetooth?

1 Like

Oh ok then. So it’s connecting but not reading/understanding messages exchanged between the devices? I’m not sure, I have never coded with a Mindstorm before. Builidng this app is the first time I have used one.

From bluetooth settings, find your ev3 , press forget and try to make pairing again. Maybe this can help

Also check which motors are you using A,B,C or D. For example in my first app I used motors BC cause maybe your are trying to send commands to the wrong motor ports


Hi Molly

When device_to_connect AfterPicking

Here there is an assumption that the connection is made, but you need to confirm the connection first, using a Clock Timer, and assign the Bluetooth Client to Ev3. Something like this (untested, I have no Lego :frowning_face:)

Edit: Changed the Notifier type

1 Like

Hi again Molly - did you guys make any progress?

@ChrisWard and @dora_paz

Apologies for the inactivity (exam week)! Thank you so much for the solutions. Unfortunately, my class has run out of time for building the app and I won't be able to test your theories. From what my partner said (she tried these methods while I was away for a school camp) the code you provided solved the problem however we received a Bluetooth property error. I'm pretty sure that is because the 'BlutoothClient1' wasn't selected in component properties but I won't be able to test that theory.

Once again, thank you so much for the responses. I didn't expect to receive such detailed solutions!

1 Like