Award
Congratulations DJ Sures, for answering the question and has received an EZ-Credit award! Share what you have learned and create a tutorial to help others by clicking here.

Sdk Support For Connecting To Ez-b V4

Assistance Requested

Help CodedByATool with their question and receive $10 of EZ-Credit to get more robots and parts from our store. The following information was provided about their previous efforts searching tutorials for a resolution.

CodedByATool claims to have checked these sources:
 
#1

Hi all,

I'm looking for assistance in using the currently available SDK to connect to an EZ-B v4 directly.

I already posted a question on the tail of this thread

... but realized someone had pretty much asked the same question here:

Vb4 Connect Obj Asks For A Password

... unfortunately the thread concluded ambiguously.

The short of it is this. When building and running the SDK sample files in either CSharp or VB using EZ-SDK Version 2014.01.21.00 and attempting to connect to an EZ-B v4 we can set (or the User Control can prompt for) the EZB_Connect.Port and EZB_Connect.TCPPassword.

In my case I am using AP mode and 192.168.1.1:23 and dismissing the password dialog. The EZ-Bv4 seems to respond to the connection attempt with a red light and an audio ``ding`` - but then disconnects shortly after with the following debug output:

Quote:

12/08/2014 9:18:49 PM - 12/08/2014 9:18 PM - Attempting connection on 192.168.1.1:23
12/08/2014 9:18:49 PM - 12/08/2014 9:18 PM - Connected to 192.168.1.1:23
12/08/2014 9:18:49 PM - 12/08/2014 9:18 PM - EZ-B reports EZ-B v4 OS
12/08/2014 9:18:49 PM - 12/08/2014 9:18 PM - Welcome to EZ-B v4 Beta!
12/08/2014 9:18:58 PM - 12/08/2014 9:18 PM - Comm Err: System.IO.IOException: Unable to read data from the transport connection: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.Stream.ReadByte()
at EZ_B.EZB.(Byte , Byte[] )
12/08/2014 9:18:58 PM - 12/08/2014 9:18 PM - BbytesToExpect: 12
12/08/2014 9:18:58 PM - 12/08/2014 9:18 PM - ?
Received:
12/08/2014 9:18:58 PM - 12/08/2014 9:18 PM - Disconnected
12/08/2014 9:18:58 PM - 12/08/2014 9:18 PM - EZ-B v4 ID: 0-0-0-0-0-0-0-0-0-0-0-0
12/08/2014 9:18:58 PM - 12/08/2014 9:18 PM - Connected




From the responses on the other threads and SDK-Docs I am a little confused, specifically:
1) The SDK help says the EZ_Connect object is for making bluetooth connections, however entering an IP address for the Port seems to get a rise out of the EZ-Bv4 so I assume it supports direct IP connections to the EZB-V4 from a standalone app. Is that correct?

2)... or have I miss-understood, do standalone SDK based apps have to connect through an instance of EZ-Builder?

3) Should EZ-SDK Version 2014.01.21.00 support EZ-B V4 currently?

4) If this is an issue with the SDK and it is already known. Any idea when an update will be available?

5) Can you suggest a workaround? (ex. perhaps if I make an add-on to EZ-Builder to leverage its ability to establish a connection)


Sorry to sound needy. I am just excited to get started on a complex behaviour that lends itself more to a custom code written on the SDK.

Thanks,
Daniel
(CodedByATool)

I have found a few conversations, tutorials and activities that may help with your question. Take a look at these links. I've sorted them by what I believe to be most relevant but that is not always the case as I'm still learning.


Also, consider reviewing the Learn section for informative lessons and activities. Check it out!


#2

1.Ehh, yes...no....ehhhh. It looks like you more or less pinged it. It said "I'm here"..."what's the secret hand shake"..."error, that's not the right hand sake"

2. No. the SDK should* allow you to connect to your EZb and you do not need to use the EZ-Builder

3. I believe DJ stated in the other thread that a new release would be forthcoming

4. The EZ-Robot staff would need to answer that

5. Probably not. Even though you appear to have made a "ding" connection to communicate effectively you need the full connection string and password which as stated by DJ in the previous thread is not in the SDK currently. With out that, proper communication are not going to be effective.

I can understand your excitement as a coder. As a fellow coder, I recommend two things,

1. Send a message to the EZ-Robot staff via "contact us" to remind them the SDK needs updated as DJ stated and in forum thread 6005 (the squeaky wheel tends to get the grease).

2. I would invest some time playing with controls in the EZ-Builder. Try to push the limited of what the EZ-Builder can do for you. This will greatly impact your development process because you'll need to experience what EZ-Builder can do (in my opinion) before using the SDK. And while you are testing make your self a list of what works well and what you think you could improve and what does not provide you enough control. You'll end up with a task list and see what EZb can do out of the box with EZ-Builder. Smile

#3

Get the latest EZ-SDK which is 2014.06.22.00 - it has a few changes to the one you are using.

#4

Wahey! The SDK download page has updated since the 12th. and ....
... it works great!

EZ-B V4 is quite literally rolling now..

Cheers.


PS> C# Tutorial 1 disables the panel with the Forward/Stop/Reverse buttons and doesn't enable them. I added the OnConnect/Disconnect event handlers I presume it was meant to have - might be nice to fix for the next release.