Hello and welcome to our community! Is this your first visit?
Register
Page 1 of 2 12 LastLast
Results 1 to 10 of 19
  1. #1
    New Recruit
    Join Date
    Jan 2011
    Posts
    17
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0

    use a "TP-LINK TL-WR703N Wireless N 150M Router" to create a wireless connection

    Hi,
    I have been trying to use a "TP-LINK TL-WR703N Wireless N 150M Router" to create a wireless connection between my AeroQuad Quadcopter, and the AeroQuad configurator program, running on my laptop.
    The WR703n has been reflashed with OpenWrt, and is running the 'ser2net' program which redirects the arduino mega's, USB serial port, to the WR703n's, TCP port 4000.
    By using the 'PuTTY' terminal program, I can access the 'Aeroquad Flight Software' using the single letter commands that would, more normally, be issued from the 'arduino ide serial monitor', or the configurator serial console.
    The 'Aeroquad configurator program' is not able to take its input from a tcp port, so a couple of extra steps are required.

    On the laptop computer, a virtual com port needs to be created, and connected to the WR703n routers, 4000 port.
    I have tried a few potential solutions to this, and the only one I have been able to get working, is 'com0com' and 'com2tcp', which are open source.
    When 'com0com' is installed it creates two virtual com ports that are connected together. This can be demonstrated by opening both ports with PuTTY and observe that, what is typed in one, appears on the other, and visa/versa.
    The com2tcp program, is then used to connect one of the virtual com ports, to the routers 4000 port.
    I have verified this is working by opening the other virtual serial port in PuTTY, and interacting with the aeroquad, as I did when opening the routers 4000 port directly.
    The next step is to run the configuator program using this virtual serial port.

    This is where things start to not work.
    I have found the configurator program to be very unreliable, to say the least.

    The main problem has been 'TIMEOUT EXPIRED BEFORE OPERATION COMPLETED' errors.

    My first tests were done using the wired connection I used to setup the WR703N Routers.
    After increasing the timeout values as suggested in the web posts, I thought I had fixed the problem. However after a variable number of minutes running correctly, the timeouts re-occured. After looking at the raw data on a PuTTY screen, I noticed that the data stream paused, every now and again, for no obvious reason. I was able to work around this by increasing the 'Timout = 5' to 'Timeout = 95' in the 'AeroQuadConfigurator.ini' file. (Note. This not the 'Boot Delay' value on the configurator screen, which is also in the .ini file.)

    The next task was to get it all working with a wireless connection. (There is no point doing it otherwise.)

    After getting the WiFi connection working, I found I was still getting TIMEOUT ERRORS. More investigation indicated that this was not he same problem. This time the configurator would run for a variable number of minutes, and the arduino would suddenly stop sending the data stream, for no apparent reason.

    I am at a complete loss to explain any of these problems, and need help.

    I do not want to give up, because these routers can be bought for $23, which makes it a very low cost way of getting wireless connectivity, not only for quadcopters, but a hole range of other devices as well.

    If you need more information please ask.

    Thanks
    Robw001

  2. #2
    New Recruit
    Join Date
    Jan 2011
    Posts
    17
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0
    Hi again,
    In the absence of any replies to my original post, I have done a lot of further testing.
    Yesterday, I decided to eliminate one of the main pieces of software, and do all tests without using the 'AeroQuad Configurator Program'. Instead I observed the raw data output from the 'AeroQuad Flight control Board', using a 'PuTTY' window. (it could have been a serial console window.)
    After looking at the data scrolling past for tens of minutes, I noticed that it paused sometimes for varying amounts of time. This would have caused the timeout problems with the Configurator program, but since it was not running at that time, it could not have caused them. In some cases the output completely stopped.

    In all my testing, whenever an error has occured, the only way I have been able to get it all working again, is to power everything off and start again.
    One change I have made, after rereading the documentation, is to add the '--ignore-dsr' switch to the 'com2tcp' command line. The complete line is:-

    "C:\Program Files\com0com\v2_4_6\com2tcp.exe" --baud 57600 --ignore-dsr \\.\com6 192.168.1.87 4000

    The config file line for the 'ser2net' program running on the router is:-

    4000:raw:0:/dev/ttyUSB0:57600 NONE 1STOPBIT 8DATABITS XONXOFF LOCAL -RTSCTS tw=tw1 tr=tr1

    The tw=tw1 and tr=tr1 parameters create log files of input and output. This has helped me test the system.

    I am now confident that the 'com0com', 'com2tcp' running on the computer, and the 'ser2net' program running on the router are working correctly.
    With the configurator not being used, this only leaves the arduino and the ftdi USB to serial converter.

    This morning, I connected the arduino's USB cable directly to the computer, and ran the configurator. While moving the aeroquad board violenty, to simulate aerobatics, I got some timeout errors. This leads me to believe that, at least some of these problems, are caused by random transmition errors, that the AeroQuad flight controller, and/or the configurator, cannot recover from.

    Considering what is required to get everything running again, power cycle everything, this problem needs to be addressed.

    I also believe there may be two problems here. Sometimes when the timeout error apears, the serial leds on the arduino have continued to flash, indicating that it is still sending data. At other times the leds are off indicating the arduino has stopped sending.

    I have now enabled wireless communications and switched to com3, and a different USB to serial device. This works much better, but after a much longer time, the timeout error occures.

    The good news is that now it works for long enough to be useful.

    Thanks
    Robw001

  3. #3
    Senior Pilot Sicarius's Avatar
    Join Date
    May 2012
    Location
    Zaandam, The Netherlands
    Posts
    1,187
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    7
    The absence of replies might have to do with the fact that what you are trying is not very widely used. That said, it looks very interesting! Unfortunately i have no experience with this, but i hope others can help. What are you trying to achieve by strapping a WLAN router to a flying object? Flying access point?
    Fleet: AQ32 Y6 FPV, Mega v2.1.2 FPV quad, Blade mcp-X, 6' Skywalker 1900, 20" Flying wing, 100 mph 1:10 car
    Gear: GoPro Hero 2, Gopro hero 3 Black, Fatshark Predator, 600mw 5.8, 9XR, 850mw 1.2, scherrer lrs
    Carnage: This year: 1.2 TX, several ESC's, mostly due to polarity.. CHECK YOUR BATTERY LEADS!!

  4. #4
    Senior Pilot xtrmtrk's Avatar
    Join Date
    Jan 2012
    Location
    Bellevue, Washington USA
    Posts
    1,168
    Blog Entries
    10
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    5

    use a "TP-LINK TL-WR703N Wireless N 150M Router" to create a wireless connection

    I've always imagined something like this built into an FC. Then the "Configurator" could be in the FC and you could access it via a built in http server with any browser on any platform over wifi. No separate program needed. No serial problems.
    It would be easiest with a RTOS.
    Last edited by xtrmtrk; 05-10-2013 at 08:55 AM.
    2013 Carnage (so far!): 26 propellers, 1 frame, 5 arms, 1 motor mount, 2 motors, 2 ESCs, 1 GPS

  5. #5
    New Recruit
    Join Date
    Jan 2011
    Posts
    17
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0
    Sicarius, thanks for the reply.
    Yes, it is indeed, a flying access point. An access point with a USB2 host port, and a builtin hardware serial port. The USB port can be connected to USB hub(s) to create more USB ports. Drivers already exist for a variety of devices including, my favorite, a USB camera for FPV.
    There are also hardware mods available to drive the SPI bus, I2C bus and One Wire bus. This covers most of the devices available today, and the possibility of controlling I2C ESC's directly, thus eliminating the need for a separate flight controller board. The main problem here is the Linux running on the router may not be the real time version.
    I believe I have now got this working well enough, to continue with the rest of my quadcopter project, such a fully tuning it , and taking some flight videos.

    - - - - - - - - - - The following text was automatically merged with this post to prevent doubleposts - - - - - - - - - -

    xtrmtrk thanks for the reply,
    Yes, this concept has a lot of possibilities. There is already a http server, Luci, which can be be installed. This could be added to, or changed, to provide the functionality required. The router runs embedded Linux, but I do not know if it is the real time version or not. I think it is more likely not to be. I know that Linux does have 'real time extensions' from my experience with 'Linux CNC'. This is for desk top computers, however, and I do not know if it has been ported to the embedded devices yet.

  6. #6
    New Recruit
    Join Date
    Jan 2011
    Posts
    17
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0
    Hi again,
    I have just received information that the wr703n 's USB host port is USB2 only, and is unreliable when connected to USB1 devices. This can, however, be easily fixed by connecting the device through a USB2 hub.
    I originally had a hub in the circuit, but removed it because I thought it was causing trouble. I am now using a different hub, which claims to be USB2, and it has helped with the problems, but not completely solved them. I have not yet been able to verify whether these devices are USB1 or USB2.
    To work around the problem, I have decided to try the wr703n's hardware serial port instead. I was always going to do it this way, but I was worried about disabling the wr703n's console, which is very useful for debricking the router if all goes wrong. My worries were unfounded, however, since the Uboot console comes up anyway.
    This method involves wireing out, the TTL RS232 port, by soldering wires onto the routers PCB board, then through a 3.3V to 5V level converter, to the arduino's com port.
    The good news is that this is working very well. I have had it running the configurators 'vehicle status' page for hours, with no timeouts. The previous record was about 25 minutes.
    I still need to do more testing, but I have to go now.

  7. #7
    New Recruit
    Join Date
    Jan 2011
    Posts
    17
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0
    Hi,
    I have done more testing and have found a problem with transmitter calibration.
    When I try to do the transmitter calibration, everything seems normal until it is time for the values to be stored to eeprom. I then get the error message 'Parameter update was not successful' and then the connection is lost. A search of the net found the following post of describing an identical error. http://aeroquad.com/showthread.php?5...ibration-fails. I am running Windows with 6 channels and no amount of retries works. The post asks what is output in response to the 'g' and 'h' command, in the serial terminal, and the answer in my case is a 'newline' only, without any data values of any kind. All the other commands appear to output lists of values as expected.
    The post suggests changing the 'MINCHECK' and 'MAXCHECK' values in 'Receiver.h'. I have done this but it did not fix the problem.
    I do not know what to do next.

  8. #8
    AeroQuad Core Software Developer ala42's Avatar
    Join Date
    Sep 2010
    Location
    Germany
    Posts
    1,788
    Downloads
    1
    Uploads
    0
    Reputation Points (Add)
    13
    What does the configurator display as "Receiver Channels:" ? You see that in the same place where it shows Software version, board type and such stuff.

  9. #9
    New Recruit
    Join Date
    Jan 2011
    Posts
    17
    Downloads
    0
    Uploads
    0
    Reputation Points (Add)
    0
    The "Receiver Channels:" is 6 which is what it should be.

    Yesterday I also had a strange problem which might be of interest. When I changed the 'MINCHECK' and 'MAXCHECK' values, and reloaded the flight software, the configurator stopped showing the configuration settings in window at the top right of the screen. When I say 'stopped showing' I mean completely stopped. The grid lines were still there, but both the values, and the name of the values, were blank.

    I have retried the 'g' and 'h' commands from a serial terminal, this morning, and they are still returning a new line only.

  10. #10
    Senior Pilot wooden's Avatar
    Join Date
    Dec 2011
    Location
    Pacific Northwest
    Posts
    4,866
    Blog Entries
    1
    Downloads
    1
    Uploads
    0
    Reputation Points (Add)
    27
    I've seen some occasions where the upper right box in Configurator (mostly PID settings and whatnot) won't display values - I've had to restart Configurator and my quad to get it working again. Not sure if that will work for you or if you already tried it but worth a shot.

    I can't think of a reason why changing MINCHECK and MAXCHECK would help you here as it has nothing to do with the storing of receiver slopes and offsets into the EEPROM...
    push the envelope, watch it bend


 
Page 1 of 2 12 LastLast

Similar Threads

  1. combined telemetry / FPV / serial wireless connection?
    By KSoggs in forum AeroQuad Tutorials
    Replies: 1
    Last Post: 02-11-2012, 05:35 AM
  2. Replies: 4
    Last Post: 11-30-2010, 08:00 PM
  3. Replies: 7
    Last Post: 09-11-2010, 01:59 PM
  4. Replies: 3
    Last Post: 05-16-2010, 10:53 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •