Asked — Edited

Tcp Connection - Control Ez-B4?

Confused. I searched the forum, is the TCP designed to handle simple commands? So Node.JS is not running on the EZ-B4's web server correct...it appears you run it on your server/client and it connects to EZ-B4.

I have a robotic head that I want to call from my Mac where I have CMU-Sphinx and FreeTTS, and Program AB to create a chatbot that uses voice. It's a college project...so I know there's probably a control that does all that ;-) .

All I really need to do is a simple way to call commands from the Java program to move 8 different servos and to perhaps allow eye tracking. Is that possible? The documentation doesn't seem to have anything on this, though perhaps I just couldn't find it.

I suppose I could go java ---- node.js --- ez-b4 but that seems a waste. Can't I just make calls directly from java via TCP?

Thanks.


ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

#1  

This isn't going to help a lot with the Java question but yes, you can use the TCP to talk to ARC, which then controls the robot. I don't know of a way to talk directly to the ez-b via tcp. The sdk has c# examples of this. The tcp engine is a part of ARC and I don't know about the ez-b. I am sure that the ez-b accepts tcp commands, but I don't know if these are public outside of ARC or the sdk. A packet sniffer may be your friend here.

PRO
Synthiam
#2  

You can move the servos directly from your Java app. Simply connect to the EZ-B over a TCP connection to port 23. You can examine the EZ-OpenBot to get the protocol. However, here's what you will need to move servos...

Your very first command be a ping 0x55, which will return 0x04

Now to move a servo is really easy. The command takes 2 parameters and returns nothing.

The command looks like this...

0xAC + servo Port, Position in degrees

So here's an example to move servo port D0 to position 120

0xAC, 120

Now to move servo port D1 to position 120

0xAD, 120

Now to move servo port D2 to position 120

0xAE, 120

Make sense?

#3  

Hmm....I finally got a chance to look at the Client Server Robot Control video. I do not have a Script Interface Checkbox. I have the latest version of ARC. It is simply not there. Is this a bug or has something changed.

I am running windows 8.1 on Parallels on a Mac OSX.

I'm going to run ARC, then through telnet connect via the Java program I have running.

Again, there is no Script Interface checkbox.

James A. Brannan

PRO
Synthiam
#4  

Can you link to that video? The client/server ARC video is many years old and no longer supported. I need to remove that video.

As for my comment above, I would recommend re-reading what I wrote. Are you certain that you wish to run ARC AND your java program at the same time? With my information above, you can connect directly to the EZ-B and move the servos from your Java program.

You can move the servos using the response from my previous message.

Otherwise, I would your option to communicate with ARC over TCP is using the script tcp interface - which has replaced the "checkbox" that you've mentioned. The script interface is the new way which replaced the method you have mentioned. The method you have mentioned is deprecated and was too complicated. The new method uses EZ-Script commands. It's how all of the third party ez-robot apps communicate with ARC. This is also how roborealm communicates with ARC.

If you do not want to perform the communication directly to the ez-b, as in my previous response - you can communicate with the tcp server EZ-Script interface.

Here is where to enable the script interface. Press CONFIG on the Connection Control to find this option...

User-inserted image

#5  

No dice. Trying to connect using telnet hangs. Connects then nothing. Tried on OSX and tried using Putty on Mac. Frustrating to say the least. Why aren't there up to date instructions on using it? This is a cool feature, that basically allows using whatever language and whatever platform one wants. I'd think this is something worth explaining how to do.

My understanding is, so far, that I should be able to telnet to ez-b4:

telnet <myip> <myport>

And then able to send simple commands. What commands? Script commands? The commands DJ-Sures mentions in his first response? The video on sending telnet commands is outdated, so that doesn't help.

This brings me back to my first thread, that generated a lot of flack. I stand by my claim that more documentation is sorely needed, and not just videos, but bona-fide documentation.

PRO
Synthiam
#6  

I understand - there are only so many hours in a day and I respond to every inquiry, as I have demonstrated in this thread by responding to your messages. The length of your post was consumed by frustration and not information to help me help you. We need to work together on this:) pour a cup of tea because I need you to answer some questions to help you...

What you're asking is for an infinite number of help documentations - which is impossible. That's like asking for every programming language to already have written every program, past or future. ARC is a development environment for you to solve problems and we provide most of the work, if not all of it. In short, I am only able to respond to your questions - I am unable to predict the future, today.

In your case, the question is connecting a foreign program that has nothing to do with ezrobot to connect to our system. And even though I did not write your program, nor did ezrobot have anything to do with your program - I'm still assisting, so we'll figure this out together:)

I am confused over what your attempting to do now. Becuase, in both of my previous responses I have provided information on TWO different methods to control your servos. I have mentioned that there are two ways to connect, EZ-B directly and EZ-Script TCP Server in ARC. The connection setting in ARC also specifies that it is EZ-Script, as well. I have also previously provided a list of other products using the tcp ezscript interface. The connection setting window where you enable the tcp server has more than enough information to help you.

Perhaps you received slack before due to the answers are already there and directing frustration toward the community and product is not productive to achieve your goals. Hold back your opinions and provide questions AND answers to those helping you, otherwise there will be zero progress - as in this example.

I have asked questions which you have still not answered. I have also asked for the link to a video which may be out dated. In order to proceed, I require cooperation.

I'm only able to help if you wish to be helped. So answer these questions to help me help you...

I require an answer to each of these questions or I'm unable to proceed.

  1. What is the link to the video that you have referenced?

  2. are you attempting to telnet to the ezb or ARC? As stated in both responses, and now this is the third: the ezb protocol is explained above, if you connect directly to it. If you're connecting to ARC instead, then the commands are ezscript.

Due to the nature of this assistance request, I highly recommend that you do not connect directly to the ezb from your Java app as it may be out of scope. So to be specific, you will connect THROUGH ARC using the TCP EZ-Script TCP Server.

  1. have Enabled the tcp server in ARC? I have provided instructions above.

  2. once enabled, did you notice any messages or warnings in the debug window below? There's a chance that your specified tcp port (default is 6666) is already used by a Trojan or virus on your computer. If so, I'm unable to assist with that.

  3. if there are no warnings or errrors in the debug window, you can telnet to your local computer - unless there are firewall issues. And again, that is something you can identify with Microsoft to disable or open ports in firewall. Normally if your Windows has not been modified, a dialog box will appear asking if you wish to allow ARC access through your firewall.

  4. If you are using the default TCP Server Port in ARC, telnet to your local computer as such:

Quote:

Telnet 127.0.0.1 6666

Now you will see an ezscript interface. Notice how I repeated that it is an ezscript interface. The tcp server for ARC is an ezscript interface.

This image circles the HELP TEXT, the CHECKBOX to enable EZ-Script TCP Server and the PORT. You can access this menu by pressing the CONFIG button on the connection control, as I had previously mentioned.

User-inserted image

Every control has a ? (question mark) next to the X (close). When pressing that ? (question mark), you are brought to a page with information about the control. The direct link to the Connection Control ? is here: https://synthiam.com/Tutorials/Help.aspx?id=171

On that link, you will find information which I have provided in this response.

I have created an example video which demonstrates how to enable and connect to the tcp server.

#7  

Not angry btw, just frustrated by the having to hunt around, sit through videos, and not be able to just hone in directly to the information wanted, like Oracle's Java API or Microsoft's C# API documentation.

That being said, it is not lost on me that if I rolled up my sleeves and used your C# SDK I'd have a ton of sample code to work with. Guess I'm being stubborn, as I've been using Sphinx4 and FreeTTS and wanted to use it with ARC. But, and in this respect I am a dumb kid, I don't have time for the C# before my project is due. :-)

I tried to telnet directly to the EZ-B4 not ARC. Was I mistaken in assuming I could telnet to EZ-B4? So the scripting interface is NOT for EZ-B, but rather for ARC?

  1. https://synthiam.com/Tutorials/Help.aspx?id=159 This is the video with the checkbox. It is for connecting to ARC. As an aside, note the instructions you circle in pink are for the old software version, as there is no script enabling option.

I will now try going through ARC. And yes, I realize the market you are shooting for is the hobby market using a GUI.

Again, I was mistaken, I though I could connect directly to EZ-B4 and see a scripting interface.

I will, btw, document the project and post back here. Unless I can't get it all working. AND YES I KNOW THAT I DON'T EVEN NEED THE SPEECH STUFF, AS ARC COMES WITH IT OUT OF THE BOX...all caps so nobody gets the wrong idea from this thread. Your speech stuff works great.

I appreciate the help, despite the two slams now. But it is what it is. You are missing out on a huge college educational market I'd think by not having a better programming interface with better documentation IMHO. The annoyance with these new fangled GUI stuff all you cool kids are using these days is that I can't go up to my bedroom, right a dumb driver that says "Im moving left" "I'm moving right" and write my program. The robotic kit we originally chose stunk so bad, the wheels didn't even turn correctly and the professor abandoned it. Your kit sits right in the middle between Legos and having to do it yourself with all that skeery hardware.

PRO
Synthiam
#8  

Thank you, I removed the video - with so many videos, it can be challenging to keep up with removing old outdated ones.

If you wanted to go ahead and connect directly to the EZ-B, as I mentioned in my first post - we can do it. And I can explain to you how. The example protocol is above in the first post. However, i'm not sure what TCP function you have available in Java to provide an example.

If you can connect to the ARC TCP Server EZ-Script interface with Java, then I can easily help you convert that to connect directly to the EZ-B v4.

The only real difference is rather than sending written words (i.e. Servo(D0, 20)), you would be sending HEX values to move the servo.

I haven't used Java in many years - so i'm not certain what the syntax is. But something like this is an example of how you would tell the EZ-B v4 directly to move a servo to position 80. In this example you would connect directly to the EZ-B v4


void MoveServos() {

   Socket clientSocket = new Socket(&quot;192.168.0.1&quot;, 23);

   DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());

// Say hello
   outToServer.writeByte(0x55);

// Move servo D0 to position 120
   outToServer.writeByte(0xac);
   outToServer.writeByte(120);

// Move servo D1 to position 90
   outToServer.writeByte(0xad);
   outToServer.writeByte(90);

// Move servo D2 to position 20
   outToServer.writeByte(0xae);
   outToServer.writeByte(20);

   clientSocket.close();
}

And here's how to do it connecting THROUGH ARC


void MoveServos() {

   Socket clientSocket = new Socket(&quot;127.0.0.1&quot;, 6666);

   DataOutputStream outToServer = new DataOutputStream(clientSocket.getOutputStream());

// Move servo D0 to position 120
   outToServer.writeBytes(&quot;servo(d0, 120)\r\n&quot;);

// Move servo D1 to position 90
   outToServer.writeBytes(&quot;servo(d1, 90)\r\n&quot;);

// Move servo D2 to position 20
   outToServer.writeBytes(&quot;servo(d2,  20)\r\n&quot;);

   clientSocket.close();
}

#9  

You can connect directly to the EZ-B, but not the scriping interface. In post#3 DJ directed you to an example open source application and gave specific instructions for moving servos.

To access the full EZ Script functionality, you need to be running ARC connected to an EZ-B. You can either use ARC, or telnet to ARC and issue any script command (or use simple tcp ascii commands in your app as if it was a telnet session) . Post #5 provided full instructions for that.

Neither requires you to sit through a video to follow the instructions, although DJ provided videos to make it easier to follow the instructions.

Alan

#10  

Funny, every user-based forum is full of guys who attack anybody venturing into their sandbox like Alan. Funny, everybody is so up in arms when someone brings up the obvious, like, ahem, insufficient documentation. Must of written and rewritten this reply a dozen times. But in the end, I'll let the documentation stand on its own. Thanks for the help.

PRO
Synthiam
#11  

Was my last response helpful? I provided written code in Java that should be useful. I haven't written Java in a while, hopefully it's a good start.

#12  

I am not attacking. You seemed to still he asking questions, I was pointing back to the answers you appear to have missed.

I too prefer written documentation, and if this was a mature company that had been in business for many years, I would expect more. But EZ-B is a startup with only a few employees and they all are doing what they can to improve the documentation as they can. But they also need to put their energy where there is he most benefit. The vast majority of users will be using ARC, so that is where the majority of the documentation is focused. A year ago there were only videos because that is what DJ was comfortable with creating. After I and many others complained, we got the written tutorials, which are of very high quality, but focused on what most customers will be using.

Developeers who want to expand beyond that are expected to be resourceful enough to search a bit for answers. There are a lot of source code examples in the SDK, as well as the other references provided.

Alan

#13  

Not what you implied Alan. I was gonna write a long defensive email, but I'm done with it. If you want to defend the documentation, then go for it. You certainly aren't helping DJ Sures one bit by doing so. I mean, let this page stand for itself.

https://synthiam.com/Tutorials/Help.aspx?id=48

I was not commenting on the help offered through the forum on this thread. I had already assumed that I'd have to go through the ARC TCP interface via scripting. But when I looked for the documentation, I got an outdated cookie-monster video.

Common...just admit it, emperor ain't wearing any clothes. Nobody is doing ARC any favors by playing apologist for the documentation.


DJ, yes, very helpful. I should be able to connect to the ARC via script interface. With more time I'd certainly be able to figure out the C# examples, as there are a lot of them. But when I originally queried about perhaps writing a book on the programming interface, and was pretty much met with jeers, left a bad taste in my mouth. I still maintain your missing out of the college market by not supporting programming more, but perhaps that's not your target market.

It's a great product, but I'm very disappointed in the documentation. It left me, a programmer with over twenty years experience, frustrated and cantankerous. I wanted answers without having to watch a video or figure it out on my own. The whole reason I bought this product was it appeared like it would be easy and have answers easily obtainable. The stuff is cool, and with enough time, I could figure out all the controls on my own. But I shouldn't have to, the documentation should tell me exactly how to do it, in detail. I paid for the product after all. Now, I'd really like to be removed from the forum, but I didn't see the option.

PRO
Synthiam
#14  

If you'd like to help create documentation - that would be very useful to others and yourself. There are only 5 of us at ez-robot. It's not easy to maintain documentation.

We are community centric - which means it's community helping community. When you choose to ask for assistance, the little option with the red exclamation mark - that notifies others, such as Alan to come in and help. The correct answer gets paid in money to spend in our store. All of that information is available and public for you to read about. It's included in every email you receive as well.

What you're doing is what the product and community was created for - asking the forum for assistance. You get your answer, and it's tailored to your question.

As for being removed, that's up to you. Simply click on your name on the top right and UNCHECK the Receive Notifications option.

Take care! And best of luck. Hope my code example sets you on the right path

#15  

Quote:

Not what you implied Alan

Often a problem with any internet forum. It is hard to express or understand the nuances of written conversation compared to verbal. Probably made worse since I was answering from my phone so trying to be more succinct than when answering from my computer. I was honestly just trying to point you to the answers to the questions you seemed to still be asking, and adding a little extra detail to clarify those answers.

I always try to assume that a poster had the best intentions until it is absolutely clear that they do not.

Another example is

Quote:

But when I originally queried about perhaps writing a book on the programming interface, and was pretty much met with jeers
I just re-read the thread. Numerous people expressed their opinions that they had considered writing a book, and explained why they abandoned the idea or didn't think it was feasible at this stage of ARC development. You are the one who started the thread down an argumentative direction in post #11. Before that, it was a polite group of people expressing their opinions.

Alan