Author Topic: Vantage Vue Linksys Router Server  (Read 25442 times)

0 Members and 1 Guest are viewing this topic.

Offline docbee

  • Forecaster
  • *****
  • Posts: 856
    • smartbedded
Re: Vantage Vue Linksys Router Server
« Reply #75 on: April 05, 2013, 05:09:01 AM »
I do fully understand that! Have fun!  :-P
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline gmu

  • Member
  • *
  • Posts: 23
Re: Vantage Vue Linksys Router Server
« Reply #76 on: April 17, 2013, 06:38:11 PM »
hmm, I'm having a little problem with my wrt54g v2 here.  The vantage vue works with Cumulus and an ftdi cable but won't upload via the router configured as per this thread. 

I'm starting to think the serial ports are kaput as they show 3.3vdc across Gnd and Tx/Rx, which is not what openwrt says here: http://wiki.openwrt.org/doc/hardware/port.serial#finding.serial.console

Has anyone blown up serial ports and have they acted this way?





Offline DeKay

  • Forecaster
  • *****
  • Posts: 399
    • Mad Scientist Labs
Re: Vantage Vue Linksys Router Server
« Reply #77 on: April 17, 2013, 09:10:58 PM »
hmm, I'm having a little problem with my wrt54g v2 here.  The vantage vue works with Cumulus and an ftdi cable but won't upload via the router configured as per this thread. 

I'm starting to think the serial ports are kaput as they show 3.3vdc across Gnd and Tx/Rx, which is not what openwrt says here: http://wiki.openwrt.org/doc/hardware/port.serial#finding.serial.console

Has anyone blown up serial ports and have they acted this way?


The location, pinouts, and voltages on the WRT54G are well documented.  There should indeed be 3.3VDC across those pins.
http://wiki.openwrt.org/toh/linksys/wrt54g.

The Vue should be connected across the row of pins closest to the very edge of the board (ttyS1).  Or to test out your setup, you could connect up to the inner row (ttyS0) and watch the Linux kernel spew messages to a terminal program running on your PC as the router boots up.

Offline gmu

  • Member
  • *
  • Posts: 23
Re: Vantage Vue Linksys Router Server
« Reply #78 on: April 18, 2013, 08:30:11 AM »
on bootup all I see is a '&' followed by a few null characters and a 6 on bootup  - a good indication?


Assuming that the hardware and thread-specific configuration is ok, can I ask a few noobie questions:

1) with the same linksys version as morter01, I'm flashing openwrt-wrt54g-squashfs.bin then over-flashing with openwrt-brcm-2.4-squashfs.trx - is this correct?

2) how does one go about viewing output from print statements placed in davissnd.lua?

any help appreciated :)

Offline DeKay

  • Forecaster
  • *****
  • Posts: 399
    • Mad Scientist Labs
Re: Vantage Vue Linksys Router Server
« Reply #79 on: April 18, 2013, 11:25:04 PM »
on bootup all I see is a '&' followed by a few null characters and a 6 on bootup  - a good indication?

You should see pages and pages of Linux kernel spew of readable text on boot.  Have you connected Tx->Rx and Rx->Tx?  Do you have your terminal program set to 115200,8N1?

Assuming that the hardware and thread-specific configuration is ok, can I ask a few noobie questions:

1) with the same linksys version as morter01, I'm flashing openwrt-wrt54g-squashfs.bin then over-flashing with openwrt-brcm-2.4-squashfs.trx - is this correct?

2) how does one go about viewing output from print statements placed in davissnd.lua?

any help appreciated :)

1) If your router is still routing and you can get at its web pages, you've likely done this right

2) The simplest way would be to ssh into the router on a wired or wireless connection and fire up the lua script manually from the command line rather than automatically via the cron job.

Offline gmu

  • Member
  • *
  • Posts: 23
Re: Vantage Vue Linksys Router Server
« Reply #80 on: April 19, 2013, 11:52:36 AM »
I can now talk serial to the console and router. Realterm shows LOOP command output :)

However davisrcv.lua hangs when it reads the serial port.  

I've tried other lua scripts to read/write to the serial port but they hang too.  It seems a lua rs232 package is missing?  I've tried chmod on ttyS1.

/btw, I found the post about the OP's corrupted files and sourced them elsewhere.
« Last Edit: April 19, 2013, 03:58:45 PM by gmu »

Offline DeKay

  • Forecaster
  • *****
  • Posts: 399
    • Mad Scientist Labs
Re: Vantage Vue Linksys Router Server
« Reply #81 on: April 19, 2013, 10:45:42 PM »
I can now talk serial to the console and router. Realterm shows LOOP command output :)

However davisrcv.lua hangs when it reads the serial port.  

I've tried other lua scripts to read/write to the serial port but they hang too.  It seems a lua rs232 package is missing?  I've tried chmod on ttyS1.

/btw, I found the post about the OP's corrupted files and sourced them elsewhere.

Do you see the lua script spit out any errors?  It will if it can't find the rs232 package, I would think.

Have you set up the serial port on the router properly?  Does the config match that shown in this post?

If so, get the console to spit out STRMON stuff using your PC.  Don't start the lua scripts on the router.  Just ssh into the router, connect the console to the router, and try to

cat < /dev/ttyS1

from the router command line.  This will take whatever comes in on the serial port and spew it to your window.   If you don't see anything, either your connection is wrong or your serial port setup is wrong.

Also, I think some people see /dev/ttyS1 and some see something like /dev/ttyS01.  You'll have to work with whatever name Linux assigns to the port.

Offline gmu

  • Member
  • *
  • Posts: 23
Re: Vantage Vue Linksys Router Server
« Reply #82 on: April 20, 2013, 06:54:43 AM »
cat hangs.  I can write to but not read from the serial port.
« Last Edit: April 20, 2013, 08:35:53 AM by gmu »

Offline DeKay

  • Forecaster
  • *****
  • Posts: 399
    • Mad Scientist Labs
Re: Vantage Vue Linksys Router Server
« Reply #83 on: April 20, 2013, 08:53:36 AM »
/bin/ash: CAT: not found

there's a symbolic link to cat in /bin/ash with all permissions

using lower case it just hangs

stty & luasocket in place

Linux is case sensitive.  That is why I wrote "cat < /dev/ttyS1" and not "CAT < /dev/ttyS1".

Run this command and cut and paste the output here.

stty -F /dev/ttyS1 -a

Offline gmu

  • Member
  • *
  • Posts: 23
Re: Vantage Vue Linksys Router Server
« Reply #84 on: April 20, 2013, 12:41:00 PM »
root@OpenWrt:~# stty -F /dev/tts/1 -a
speed 19200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke

I found the same kernel version as the OP which uses /dev/tts/1.

The pinouts on the pcb silkscreen in this EU model are rotated 180 deg, ie edge pins 4,6 & 10 instead of 3, 5 & 9. No difference in using either port.

Poking around with setserial package now..

root@OpenWrt:~# setserial /dev/tts/1 -v autoconfig
Cannot autoconfigure port: Device or resource busy

root@OpenWrt:~# setserial /dev/tts/0 -v autoconfig
Cannot autoconfigure port: Device or resource busy

root@OpenWrt:~# setserial -g -a /dev/tts/1
/dev/tts/1, Line 1, UART: 16550A, Port: 0x0000, IRQ: 3
        Baud_base: 3125000, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal

root@OpenWrt:~# setserial -g -a /dev/tts/0
/dev/tts/0, Line 0, UART: 16550A, Port: 0x0000, IRQ: 3
        Baud_base: 3125000, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal
« Last Edit: April 20, 2013, 05:19:08 PM by gmu »

Offline DeKay

  • Forecaster
  • *****
  • Posts: 399
    • Mad Scientist Labs
Re: Vantage Vue Linksys Router Server
« Reply #85 on: April 20, 2013, 06:51:22 PM »
root@OpenWrt:~# stty -F /dev/tts/1 -a
speed 19200 baud; rows 0; columns 0; line = 0;
intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = <undef>;
eol2 = <undef>; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R;
werase = ^W; lnext = ^V; flush = ^O; min = 1; time = 0;
-parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff
-iuclc -ixany -imaxbel
-opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0
-isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase -tostop -echoprt
-echoctl -echoke

I found the same kernel version as the OP which uses /dev/tts/1.

The pinouts on the pcb silkscreen in this EU model are rotated 180 deg, ie edge pins 4,6 & 10 instead of 3, 5 & 9. No difference in using either port.

Poking around with setserial package now..

root@OpenWrt:~# setserial /dev/tts/1 -v autoconfig
Cannot autoconfigure port: Device or resource busy

root@OpenWrt:~# setserial /dev/tts/0 -v autoconfig
Cannot autoconfigure port: Device or resource busy

root@OpenWrt:~# setserial -g -a /dev/tts/1
/dev/tts/1, Line 1, UART: 16550A, Port: 0x0000, IRQ: 3
        Baud_base: 3125000, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal

root@OpenWrt:~# setserial -g -a /dev/tts/0
/dev/tts/0, Line 0, UART: 16550A, Port: 0x0000, IRQ: 3
        Baud_base: 3125000, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal

Hmmm.  That looks right.  I'm assuming that from the router command line you've been trying

cat < /dev/tts/1

I'm also assuming you've edited the lua script from this

local comr = assert(io.open("/dev/ttyS1", "rb"))

to this

local comr = assert(io.open("/dev/tts/1", "rb"))

and that you've edited davissnd.sh to this:

echo > /dev/tts/1
sleep 1s
echo LOOP 1 > /dev/tts/1


So either your connectivity between the console and the router is wrong, or your console isn't actually spitting anything out in the first place when you hook it up to your router.  Dunno, but you're probably pretty close to getting it working.

Offline gmu

  • Member
  • *
  • Posts: 23
Re: Vantage Vue Linksys Router Server
« Reply #86 on: April 21, 2013, 01:55:50 PM »
"I'm assuming that from the router command line you've been trying cat < /dev/tts/1"

I was using that command but it still hangs so I've run out of ideas using serial. Perhaps the USB port will work but I think I'll throw in the towel and move on to an NLSU2 Slug.

Interestingly, within davissnd.sh, the protocol manual says:
"To halt the sending of LOOP packets before receiving all of the requested packets, send a <CR> by itself. Note that this is the same as the Wakeup sequence." So if one tries to wake up the console when it's already awake it'll go to sleep.

Thanks for your help DeKay.



----------------------------

Update:

It now works (with the slug).  The problem was no timeout had been set on the serial port.  I changed it using info from this page:

http://stackoverflow.com/questions/6713668/how-i-can-read-tty-file-with-timeout


//btw, the dewpoint calc in davisrcv is abit low. apparently he is using a value of 12.271 whereas the same formula on this web page uses 17.271

http://ag.arizona.edu/azmet/dewpoint.html


//bbtw, I recommend incorporating also the LOOP2 packet, as found in the VantageSerialProtocolDocs_v261.pdf  this packet gives 10 min wind gust and a few others which are not found in LOOP


« Last Edit: May 09, 2013, 10:55:48 AM by gmu »

Offline skycatcher

  • Member
  • *
  • Posts: 6
Re: Vantage Vue Linksys Router Server
« Reply #87 on: October 17, 2023, 08:49:26 AM »
Its been a while! My linksys router solution with the ancient software has been working very well for years now. I have recently moved home and wanted to update my location on wunderground. I created a new device there with the new address and updated the davisrcv.lua script with the new staion id....unfortuately no data is being uploaded to the new wunderground device. I changed the script back and it uploaded to the old.

What am I missing?

TIA

Offline skycatcher

  • Member
  • *
  • Posts: 6
Re: Vantage Vue Linksys Router Server
« Reply #88 on: January 18, 2024, 06:48:14 AM »
Bump ](*,)