I am having a problem giving real time commands to the robot via these 2 applications --> Serial port control Panel and Serial_H3 software wirelessly. When I try to connect these applications via wireless communication, they both don’t work.
I am using a serial adapter for Bluetooth device on the serial port of the robot, (semiconductorstore.com/cart … duct=42977) and it works with my USB Bluetooth dongle.
For this device, for example the connection COM port is COM9 for outgoing. When I connect C++ Demo program serial_H3 for COM9, the button changes to “disconnectâ€
I should have mentioned that it does work with the normal cable absolutely fine initially.
So lets say I just installed these applications. It will work fine with the serial cable. Now I try to connect it with the wireless, and it doesn’t transfer bytes and then after trying wireless, even if I try serial cable again - it doesn’t work.
I have re-install the application to make it work with the serial cable again.
Yes, I am trying one application at a time to talk to the serial port.
So lets say I download the application. I work with the serial cable - it works fine, as it is supposed to.
Then I try to make it work wirelessly. (The details are in my first post). It doesn’t work - connection established but no transfer of bytes.
Then I try to work with the cable again – same thing happens as with the wireless connection. Connection is there, but no transfer of bytes. Now it will never work. Its broken permanently. It won’t work even if I re-start computer.
I have to reinstall the application again.
Please read the first post, as I give details about how it doesn’t work and what it shows.
THanks.
I have already read it. I can only speculate. Perhaps the bluetooth driver has grabbed the serial port and will not let it go. Uninstall the bluetooth driver?
Although eventually I want bluetooth working with my robot.
Any ideas on why it doesn’t transfer bytes? Like, the COM port number shouldn’t make a difference right? the application can accept any numbers right?
Or do you think the problem should be on the bluetooth side?
so actually I tried to send data via a different application - not from Lynxmotion, and it works fine.
So the problem is definitely with the Lynxmotion applications. For now, I don’t need them working - so its ok with me. But yea, just a heads up for other people who might wanna use it with bluetooth.
You haven’t really given any useful information here. We need more information. What program works? How have you come to this conclusion? A heads up for all bluetooth or just the brand you have tried. You’re making some broad statements with little technical information to back them. All Lynxmotion applications, have you tried LynxTerm?
The program I used now, is an application developed by someone in my lab, which simply transfers bytes via the serial port. The program from BASIC micro IDE that I downloaded recieves those bytes and does something with them, for example a “ff” from keyboard will make the robot take half a step forward, so continuous “ff” will make the Robot move forward.
So, I used the bluetooth serial adapter device from Rowing Networks - I have put the link in my first post. That is the only device I used so far to make it wireless, so I can say that for sure for this device only. I used these applications from Lynxmotion that crashed --> Serial port Control panel, C++demo (Serial_H3) application (both that come with powerpod) and also the BASIC micro IDE itself crashes. No I have not tried Lynxterm.
My first post says exactly what happens when I use these applications – I can only see the difference inteh C++ demo application, for others, like the serial port control panel - nothing happens. It seems on the screen that it is working, but robot does nothing. For the basic micro IDE, I goto tools and hit “program” and then the application freezes.
Let me know if you need more information and about what exactly.
THanks.
I am not surprised that you can’t program an Atom with a bluetooth adapter. Timing for programming is tight and will not survive the latency associated with Bluetooth. Everyone here will agree with this, so it’s not a bug, but a known limitation in the way the device is programmed.
What baud rate are you using with the bluetooth device?
The applications that come with PowerPod do work. Many forum members have verified this. You even told me it used to work before you installed the bluetooth connection. So your bluetooth installation appears to prevent these applications from accessing the serial port.
I’m not a programmer so I’m not even sure what to tell you to try. I’ll ask Laurent to look at this when he gets back.
Yes, they work with the serial cable ofcourse. Thats exactly what I am trying to say that they don’t work with my bluetooth adapter. Now that you tell me that I cannot program on ATOM because of its limitations with bluetooth, it makes sense.
The baudrate I am using is 38400. Thats what I use with the serial cable too.
Although, that makes me wonder why after using it with bluetooth, they don’t work with serial cable either.
Initially there is no problem with a serial cable.
Please check if the correct Com port is selected with the “H3/H3R serial Control Demo” program.
the program can connect to any port even if there nothing connected on the other end, it means that the "button changing to " does not mean that you are connected to the Robot, it just means that you are connected to “a” Comport, it could be the wrong COM port #.
The COM port # to use with the wireless thing is different than the one used with the cable, for example if cable was COM1, wireless could be COM2…3 or COM15.
SO please check first if the right COM port is selected then clic “Connect”
Then, i’ve read that you use 38400 bauds (i suppose that you have clic “setup” in the program then selected 38400 bauds)
the problem is that the Basic Atom program is using 9600 bauds to communicate with the “H3/H3R serial Control Demo” program, so you must use 9600 with the windows program too.
It can explain too why it was not working when testing again with cable…maybe it was still in 38400 bauds and when reinstalling again it was using the default 9600 bauds value.
So to be short, please use 9600 bauds and check if the right COM port is selected.
but I am selecting the right port for wireless. My bluetooth device usually takes up COM4 and COM5. When the button changes to “disconnect” – the COM port selected is the right one. I am changing the baudrate to 38400 - since thats the baudrate I use with the serial cable and it works fine.
I am not sure what you mean by that line, because when I use baudrate 38400 with serial cable for any application - it works fine – I thought the microcontroller itself needed a baudrate of 38400.
For all my tests so far, I haven’t used a different baudrate. Everything else is same, the only thing I changed was used bluetooth serial adapter instead of a serial cable.
I have been following this myself and am unsure of all of the configurations of the different software pieces. So let me try to summarize what I think you have done.
You have a hex with an BB2 with an Atom 28 on it. You ran powerpod and built the serial controlled program, you used the atom compiler and downloaded it to the the Atom 28
you ran the Serial test programs that come with the power pod and it worked fine with the standard serial cable.
you hooked up your BT module to the serial port of the Bot Board 2 and then configured it to use the BT module at 38400. It did not work.
You then tried the serial cable and it did not work.
I also believe the baud rate is the problem. I don’t have the Atom version of the Powerpod program on my machine, I have the Atom Pro version. If you look at the code that is generated:
[code]main
;SerialQuery
serout S_OUT,i9600,“Rd”] ; ‘Ready’ to recieve data now
serin S_OUT,i9600,100,NoData,[str DualShock(0)\7]
[/code]
There will be code near the top that looks like this (maybe slightly different for Atom version). Note the 9600, this is the baud rate the program is expecting to communicate with the PC with. So you have a couple of choices.
configure your serial ports on the PC to use 9600, which is what his test program initially defaults to.
Change the code that powerpod generated from 9600 to whichever baud rate you want such as 38400.