April 21, 2014 at 1:08 pm #4245
I am attempting to run a very simple “move forward” program. This is the first program I am attempting to run and I get this error:
“(barobo) ERROR: in dongleOpen, CreateFile(): Access is denied.”
I am able to connect to and control the robots via BaroboLink motion control.
I am using:
Ch Enterprise Evaluation v7.0.0
Things I have tried:
Opening up the write permissions on the c:\C-STEM and c:\Ch directories
Running Barbolink and ChIDE as Administrator.
I am on Windows 7 Professional, 64 bit.
It is unclear where the program is attempting to write/create a file. If I knew that I could attempt to open it up.
Can anyone help?April 24, 2014 at 1:40 pm #4246
I assume that after that error message is printed out, the program stops and the robots do not move? Also, can I see a copy of the code you are trying to run? Thanks!
– DavidApril 24, 2014 at 1:57 pm #4247
That error message indicates that libbarobo was unable to open the COM port. Double-check in the Windows Device Manager (accessible from the Control Panel) that your robot shows up as a COM port without errors. If it’s there, then I suppose it may be a permissions problem, though I’m not familiar with how to change permissions on COM ports in Windows–we’ll have to get back to you on that if that’s the case.
HarrisApril 24, 2014 at 2:07 pm #4248
I have a hypothesis…
Couple questions: Are you running the Ch program with BaroboLink running? Also, does BaroboLink have the necessary permissions to open up an IP port on your machine? (Sometimes, on some machines, it will pop up a dialog box and you have to explicitly say “yes” to give an app permission to open an IP port) My hypothesis is that if BaroboLink is running but the port is blocked, the Ch program is unable to communicate with BaroboLink and so it tries to connect to the dongle directly. However, BaroboLink is already connected to the dongle, and so the Ch program prints an error message and gives up. Here’s a couple things you can try:
1. Try running the Ch program w/out BaroboLink.
2. Try making sure that BaroboLink is able to open a port on your machine. By default, I think it uses port 5768.April 24, 2014 at 2:27 pm #4249
/* File: moveforward.ch Move forward and backward for Linkbot-I as a two-wheel vehicle */ #include <linkbot.h> CLinkbotI robot; /* connect to the paired robot and move to the zero position */ robot.connect(); robot.resetToZero(); /* move forward by rolling two wheels for 360 degrees */ robot.moveForward(360); /* move backward by rolling two wheels for 360 degrees */ robot.moveBackward(360);
Here are all the additional details you requested:
It looks like it shows up in the device manager with no difficulty.
As I mentioned, I am able to control the robot through the Barobolink software, so it clearly is able to communicate in that way.
I may have installed the 64 bit version of one of the bits of software, maybe that is breaking something?
April 24, 2014 at 2:31 pm #4251
- This reply was modified 2 years, 5 months ago by Rex Schrader. Reason: Corrected image link
I have confirmed that I am able to run the program with Barobolink closed.
I’ll take a look at my firewall config and see if it’s being blocked in some way. It communicates through TCP/IP?April 24, 2014 at 2:46 pm #4252
I am unable to poke a hole in my firewall, but I am able to make it work with Barobolink disabled. I guess I can start it, connect the bots, then close it again.
I’d like to understand what sort of network communication is occurring, though. Is Ch attempting to communicate with Barobolink via networking?April 28, 2014 at 11:53 am #4253
Yes, Ch does communicate to BaroboLink via TCP/IP.
You actually don’t have to open BaroboLink at all… I’m pretty sure you can just run your Ch program from a freshly rebooted computer.
Here is a quick synopsis of how stuff works underneath:
– BaroboLink is started, connected to a robot
– When BaroboLink connects to a robot, it saves that robot information in a configuration file
– Ch program initializes
– Ch program first checks local port 5768 to see if BaroboLink is running. If it is, the program sends robot command messages to BaroboLink and BaroboLink forwards them to the robot. Responses from the robot are forwarded back to the Ch program.
– If the program cannot connect to port 5768, it tries to find and connect to a robot directly through the COM port. It also uses the configuration file created by BaroboLink for “hints” as to what robots to look for, etc.
Note that you do not need to run BaroboLink at all, assuming a configuration file exists. In fact, along with the standard “connect()” function, there is also a “connectWithAddress” function you may want to try. Something like
linkbot.connectWithAddress(“ABCD”, 1); // The ‘1’ is a “channel”, which should always be 1 for now
Using connectWithAddress(), you don’t need BaroboLink at all, but you will need to type in your robot’s serial ID number into all of your programs and any demo programs…
You must be logged in to reply to this topic.