Author Topic: Major VRBot Headaches  (Read 4889 times)

0 Members and 1 Guest are viewing this topic.

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Major VRBot Headaches
« on: March 28, 2011, 07:57:48 PM »
I am attempting to install the VRBOT module on my Axon II microcontroller and am running into nothing but problems...and I am not sure why. So far, the only thing that has gone right is that the library file is being detected when I compile my program (which has been properly uploaded via COM2 on my computer). More on that later.

Here is what I have done so far:
1) power to Axon II is sufficient
2) wiring from Axon to VRBOT is correct (TX/RX plugged into UART3; power plugged into regulated bus)

Here is where things get a bit weird. I turn on the Axon. Nothing blows up and there does not seem to be signs of error. I run the VRBOT GUI and attempt to connect and get this bridge program thing going. No good on all 5 of the COM ports that I have to choose from. When I try on COM2, the Axon returns a buffer problem.

At this point, my question is what the buffer should be set at. Without setting one, my compiling returns errors.

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #1 on: March 29, 2011, 06:14:20 PM »
Ugh! Not one response. I'm doomed!  :o

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches [some progress...but still need help]
« Reply #2 on: March 29, 2011, 08:57:02 PM »
OK. I think I have made a very little bit of progress

One step in this process that I was unaware of prior to now is that I need to use the Axon II serve as a TTL to USB adapter (according to the instructables.com article I found earlier today).

According to the article, the code for the adapter is in the Axon II demo file folder. I believe that I found the files (in the "USB_2_Serial_Adapter" subfolder). I adjusted the contents to point to the appropriate UART at the appropriate baud rate, compiled, uploaded to Axon II, but still no luck. Trying to connect the VRBot GUI to Axon II still produces some kind of buffer overflow problem.

I really need some help with this. I've been at this for three nights now and I am running out of hair to pull out. Every instruction for the VRBot that I have seen online does not tell me what I need to know. I don't know what I am missing, but I don't know how I am supposed to look for something when I don't know what it is.

On the bright side, I still have some servos, an MP3Trigger, and some other stuff to keep my busy.  :(
« Last Edit: March 29, 2011, 10:40:45 PM by tzankoff »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Major VRBot Headaches
« Reply #3 on: March 30, 2011, 06:15:42 AM »
Are you getting compiling errors for the buffer?

But yes, you need to connect VRBot to the GUI using a USB to serial adapter like you said, and the Axon II can be programmed to work as one. You must make sure your baud rates are all synced for this to work - double check them.

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #4 on: March 30, 2011, 08:33:59 AM »
Quote
Are you getting compiling errors for the buffer?
I was...but then I realized that I had not set any buffer in the Project Wizard. I have since set them to 80 and 20 like you have in your code. Compiling now returns no errors.

Quote
But yes, you need to connect VRBot to the GUI using a USB to serial adapter like you said, and the Axon II can be programmed to work as one.
That is the part I am not sure if I am doing correctly. I am taking the hardware.h and usb_2_serial_adapter.c (renamed to "vrbotadapter.c") files from your demo folder and put them in the appropriate source and header file folders in AVR Studio and compiled without error...but something is still not right. When I try connecting the VRBot GUI to the Axon (using the same COM port that I use to upload programs to the Axon [right?]), the Axon returns a buffer error and the GUI cannot detect any device.

Quote
You must make sure your baud rates are all synced for this to work - double check them.
I am putting everything at 9600 since that is the default for the VRBot.
« Last Edit: March 30, 2011, 08:41:10 AM by tzankoff »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Major VRBot Headaches
« Reply #5 on: March 30, 2011, 02:52:22 PM »
You need to do whats called a loop-back test.

Program the Axon to be a USB to serial adapter. Get a wire and connect the Tx to the Rx (short them). This means whatever you transmit also gets received. Then connect using Hyperterminal.

Type something in, and it should be echoed back in Hyperterminal. There is also a setting that echoes anything you type in Hyperterminal, so make sure thats turned off so you don't get confused between local and Axon echoes.

This will verify your baud rates and that your code is generally working.

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #6 on: March 30, 2011, 04:59:02 PM »
<< You need to do whats called a loop-back test. >>
Finally, some good news! I set up the loop-back test and saw what I was supposed to see.

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #7 on: March 30, 2011, 05:16:59 PM »
Good news, bad news, and worse news.

GOOD: After the loop-back test was successful, I removed the short and installed the VRBot (yes, correctly)...and I was ble to connect via the GUI. I played around with testing the existing groups. It worked. Hooray!

BAD: I tried to train some new words and it would not work. Blah!

WORSE: I disconnected and have not been able to connect again. Ugh!

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Major VRBot Headaches
« Reply #8 on: March 30, 2011, 06:07:07 PM »
GOOD: After the loop-back test was successful, I removed the short and installed the VRBot (yes, correctly)...and I was ble to connect via the GUI. I played around with testing the existing groups. It worked. Hooray!

BAD: I tried to train some new words and it would not work. Blah!

WORSE: I disconnected and have not been able to connect again. Ugh!

Sounds like you're making a silly mistake somewhere . . . check batteries, make sure baud rates all match, restart, etc.

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #9 on: March 30, 2011, 11:19:18 PM »
Somehow, I knew you were going to say that. ;D

Anyway, I did swap batteries, checked the baud rates (everything is still at 9600), did the loop-back test again just to make sure (worked fine), disconnected and reconnected everything from the Axon, and I'm still in the same spot as before.


Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #10 on: March 31, 2011, 01:44:38 PM »
Well, I still have a robot to program so I am going to let this topic go...for a little while anyway.

I am still not sure how the VRBot module can work one minute and not the next when the only thing that occurred between point A and point B is the power switch on the Axon II being flipped off and back on again five minutes later. I don't know if I can still use the SI commands already on the VRBot, but I'll give it a shot and see what happens.
« Last Edit: March 31, 2011, 01:54:13 PM by tzankoff »

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #11 on: April 03, 2011, 04:54:09 PM »
OK. I am back and my robot is finished (yay!) minus the VRBot module (boo!) and related programming.

I am still having the same trouble as before. I have setup my Axon II to serve as a USB-to-serial adapter. I performed a loop-back test to make sure that I could receive what I was transmitting (which I was). I have the VRBot plugged in properly to UART3 on the Axon. The baud rate is 9600 everywhere.

I try to connect to the VRBot via the GUI and...nothing except the usual "Could not detect device connected to port COM2" message. COM2 is the correct port. The connection process did work once before and I have not changed anything since. Hence, I am not sure what I am doing wrong...assuming I am the one at fault. For all I know, I might have a faulty VRBot.

Any other ideas?

Offline Kylepowers

  • Full Member
  • ***
  • Posts: 117
  • Helpful? 1
Re: Major VRBot Headaches
« Reply #12 on: April 03, 2011, 06:06:27 PM »
It sounds to me like a hardware failure if the software is right. If your getting it to work on and off. I would check the pins on the VRbot or the cable itself. Otherwise you probably have a faulty unit with the VRbot. Which then i would contact them and ask for there help.

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #13 on: April 03, 2011, 09:29:19 PM »
Sadly, that is what it's starting to look like to me. I've done every obvious thing that I know how to figure this out. However, with no power/status LEDs, it can be somewhat difficult. Blah!

For what it's worth, the rest of my robot seems to be working just fine.  ;D
« Last Edit: April 03, 2011, 09:37:35 PM by tzankoff »

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #14 on: April 05, 2011, 07:25:22 AM »
I think it's now official. My VRBot module is defective. The last straw is when I tested the wires that came with the unit. I hooked up the power, put a volt meter to the other end, and got 5v. Then, I hooked up the TX/RX wires and did a successful loop test on the other end.

So I am going to return the unit and try getting another one. If only Zagros Robotics would answer their phone...  :P

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Major VRBot Headaches
« Reply #15 on: April 05, 2011, 10:33:25 AM »
In your Axon code, make sure you flush the Rx buffer for the VRBot during initialization like I did in my ERP example code. Its very noisy during powerup, filling the buffer up with useless junk.

Do this for your serial to USB adapter code.

Let me know how that works out!

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #16 on: April 05, 2011, 08:16:24 PM »
I am thisclose to giving up. This thing has been more trouble than its worth. Things have gotten so screwed up, I am wondering if there is anything I can do to regain the full head of hair that I once had. I am only going to try this one more time because I know of one person (Admin) who has managed to get this thing to work. With that said, I am going to start again...from the beginning.

First, I put the USB-to-Serial program on my Axon II. Just for kicks, here is the code.

Code: [Select]
hardward.h
#define USB_UART UART1
#define OTHER_UART UART3
#define USB_BAUD (BAUD_RATE)9600
#define OTHER_BAUD (BAUD_RATE)9600
#define USB_ACTIVATE &uart1SendByte
#define OTHER_ACTIVATE &uart3SendByte

Code: [Select]
adapter.c
#define RPRINTF_FLOAT
#include "sys/axon2.h"
#include "led.h"
#include "rprintf.h"
#include "hardware.h"

void appInitHardware(void){
uartInit(USB_UART, USB_BAUD);
uartInit(OTHER_UART, OTHER_BAUD);
rprintfInit(USB_ACTIVATE);
led_put_char(1);
}

TICK_COUNT appInitSoftware(TICK_COUNT loopStart){
rprintf("\nAxon initiated.\n\n");
led_put_char(2);
return 0;
}

TICK_COUNT appControl(LOOP_COUNT loopCount, TICK_COUNT loopStart){
int tempbyte;
tempbyte=uart3GetByte();
if (tempbyte!=-1)
uart1SendByte(tempbyte);
tempbyte=uart1GetByte();
if (tempbyte!=-1)
uart3SendByte(tempbyte);
return 0;
}

I compiled it with no errors. I ran a loop test on Hyperterminal and got the results that were expected. I know I have mentioned my reason to believe that my VRBot module is defective. However, under the assumption that it works properly, what would I have to do next? (Just let me play dumb on this one. Please?)

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Major VRBot Headaches
« Reply #17 on: April 05, 2011, 08:26:52 PM »
Again, you need to flush the VRBot buffer in your initialization. :P

Just put this in appInitSoftware:
uartFlushReceiveBuffer(OTHER_UART);

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #18 on: April 05, 2011, 11:21:47 PM »
Code: [Select]
void appInitHardware(void){
uartInit(USB_UART, USB_BAUD);
uartInit(OTHER_UART, OTHER_BAUD);
rprintfInit(USB_ACTIVATE);
led_put_char(1);
delay_ms(2000);
uartFlushReceiveBuffer(OTHER_UART);
}

Result...nada. In the meantime, I got an RMA for the module and I am sending it back tomorrow.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Major VRBot Headaches
« Reply #19 on: April 06, 2011, 06:53:01 AM »
My only other suggestion is to use a 'normal' serial to USB adapter . . .

Try with the bufferflush at the end of appInitSoftware, and power-cycle the VRBot before running the code. Thats all I can think of . . .

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #20 on: April 06, 2011, 05:43:33 PM »
I have already packaged the thing and sent it back. I am now waiting for a replacement. Of course, it's on backorder now; so it may be a while. At least there is other stuff I can play with.

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #21 on: April 23, 2011, 08:24:16 PM »
About three weeks have passed and I *FINALLY* got a new VRBot (now under the name EasyVR) in the mail from SparkFun...and guess what?

Exact. Same. Problem.

I am not even going to fuss with it this time. I'm not going to pull out what little is left of my hair. I'm not going to ask anybody what to do. I'm sending it back and forgetting about it. This whole thing has been more trouble than its worth. I'm sorry I ever started thinking about it in the first place.

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Major VRBot Headaches
« Reply #22 on: April 23, 2011, 08:29:56 PM »
Just give it one more try but with a normal USB to serial adapter, probably 10 min of effort . . . else all that hair loss was for no reason :P

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #23 on: April 23, 2011, 08:40:01 PM »
10 minutes? Hell, I was at this for 10 days (if not more) earlier. Any particular adapter in mind (since you got yours to work)?
« Last Edit: April 23, 2011, 08:41:27 PM by tzankoff »

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Major VRBot Headaches
« Reply #24 on: April 23, 2011, 08:44:12 PM »
It took me just as long to figure it out . . . if that makes you feel any better :P

The problem I had was somehow data/noise would get in during startup and fill the buffer with junk. It took me forever to figure out that was the problem, but adding the buffer flush after initialization fixed it. I used a regular USB to serial adapter to configure it, which will probably bypass whatever problems you are having.

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #25 on: April 23, 2011, 08:46:57 PM »
When training the VRBot, were you getting any "wait timeout has expired" or similar error messages?

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #26 on: April 23, 2011, 08:49:31 PM »
...and how the heck do these things plug into the VRBot anyhow? ???

Offline Admin

  • Administrator
  • Supreme Robot
  • *****
  • Posts: 11,659
  • Helpful? 169
    • Society of Robots
Re: Major VRBot Headaches
« Reply #27 on: April 23, 2011, 08:54:25 PM »
Nope . . .

this is the only problem I had in terms of configuration:
http://www.veear.eu/Forums/tabid/236/forumid/8/threadid/397/scope/posts/Default.aspx

...and how the heck do these things plug into the VRBot anyhow? ???

what things?

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #28 on: April 23, 2011, 08:59:12 PM »
Quote
what things?

The USB/serial adapter

Offline tzankoffTopic starter

  • Robot Overlord
  • ****
  • Posts: 122
  • Helpful? 0
Re: Major VRBot Headaches
« Reply #29 on: April 24, 2011, 12:31:03 AM »
That's it.

I am through with this damn thing! I am sick and tired of this "sometimes it works and sometimes it doesn't" crap! Half the time, I cannot even connect via the GUI. The half of the time that I do results in nothing but errors, errors, more errors, and more errors after that...none of which are documented might I add. I am fed up. I have spent wasted too much time on this piece of junk.

I am sorry for having tried this and I am sorry you folks had to waste your time reading your way through this debacle. I am really glad you are not in the same room with me right now because I am doing some serious ass shouting at my computer and at myself during times when I am not typing. That is how unbelievably pissed off I am right now.

Admin, I'm sorry...but asking me to try again is not helpful nor encouraging. It just adds to the frustration. I'm not blaming you, but I am sick and tired of doing everything (not just here, but from other sources as well) that has been asked of me and not having a damn thing to show for it.

On Monday, I am sending this thing back. One of these days, I will try finding something else...maybe.

 


Get Your Ad Here

data_list