Author Topic: Moteino Receiver Help  (Read 6201 times)

0 Members and 1 Guest are viewing this topic.

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: Moteino Receiver Help
« Reply #25 on: December 10, 2017, 04:52:13 PM »
Sorry, I think the timing issue was a red herring.  Not really an issue, in fact if I pay attention to the Delta in your serial output I can see that each packet is about 2.5 secs.   I'm including an attachment with some output in case you want to peruse it. 
At times there's about a 2 minute pause that is indicated by the  gap in bad backets with about 51 bad packets (as indicated by the count). An example would be after the first 20 good packets.  Also at this point when it start again the delta is 0.


Thanks.
« Last Edit: December 10, 2017, 04:55:14 PM by mathgui »

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: Moteino Receiver Help
« Reply #26 on: December 10, 2017, 04:59:32 PM »
having a little trouble with attachment ...
« Last Edit: December 10, 2017, 05:01:13 PM by mathgui »

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #27 on: December 10, 2017, 05:04:26 PM »
Hm, sorry, I don't know what to make of this log. Every other packet is received steadily, I don't get it. Unfortunately I don't have access to US devices so I can't test it with original equipment, and using the US band is illegal here as it interferes with GSM frequencies, so I can't really try with my Moteino transmitter, either.

What you could try is to test what you would receive with a cheap USB SDR receiver. It helped me many times in debugging such problems. Maybe the frequency table is off (those FEI values are suspicious) a bit. Are you 100% sure your device is an US model and not just one sold as? Just as an experiment, could you try the AU or NZ band?

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #28 on: December 10, 2017, 05:05:15 PM »
having a little trouble with attachment ...

No worries, even in your previous post it was downloadable fine.

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: Moteino Receiver Help
« Reply #29 on: December 10, 2017, 05:08:53 PM »
Thanks.  I'm reasonably sure it's a U.S. model from authorized dealer, etc.  But I'll check the other tables just to be sure that's not it.  I'll check into the USB receiver too, haven't explored those.

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1132
    • Wilmslow Astro
Re: Moteino Receiver Help
« Reply #30 on: December 10, 2017, 05:37:27 PM »
Maybe the frequency table is off (those FEI values are suspicious) a bit.
The US table works fine for me, you've seen my modified code, but it the frequency tables are unaltered.
Mark

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #31 on: December 10, 2017, 05:41:44 PM »
Thanks for confirming, and yeah, I have other reports of the US table working. And after all that was the first one to be discovered and working. I though maybe Davis has devised a new trick for new devices knocking out 3rd-party receivers by shifting the frequencies or something.

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: Moteino Receiver Help
« Reply #32 on: December 11, 2017, 04:55:17 PM »
Well, I'm not sure of the reason, but I decided to give the MCrossley fork a try since he indicated he had used the US table.  It worked great.  I get about 97% good packets.  Channel 40 still fails most of the time, but otherwise it looks really good.  I tried doing a diff on a couple of modules but I was unable to determine what might be the difference.  I even went back to the previous version to verify with same results as before, every other channel working.  Thanks to all for the input on this.  I'm left with a working version but not sure why.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #33 on: December 11, 2017, 05:02:08 PM »
My version is in use in a lot of devices in the EU frequency band but they all work fine. Variable reception quality is usually caused by the hardware being used (antenna, cabling, other interference). Well, it's all good if you can use the other version from McCrossley, his code has a somewhat revamped reception and timing logic but in essence it does the exact same thing as mine, being based on my code. I will look at the differences again, but from this it's very hard to tell what makes the difference.

@McCrossley, are you still using the US band? If yes, just as a quick test, could you test my code to see if it exhibits the same problem (I kind of doubt it, but still possible)?

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 1132
    • Wilmslow Astro
Re: Moteino Receiver Help
« Reply #34 on: December 11, 2017, 06:42:03 PM »
I can give it a whirl, but it may be a few days before I'm in a position to try it. Poke me again in few days if you haven't heard anything, I'll probably have forgotten about it!
Mark

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #35 on: December 11, 2017, 06:43:09 PM »
OK, thanks!

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #36 on: December 11, 2017, 09:06:19 PM »
Mathgui, could you try another thing? There's a sketch named WxReceiver in my repo which is a WeeWx compatible driver, but can be easily used via a serial terminal for testing. If you can flash that into the Moteino, you can connect to the sketch via a serial terminal (115200N81, just the standard 115k) and issue the following commands:

Code: [Select]
# WxReceiver v2017091302 ready to accept commands
?
t1
# OK listening to 1
m0
# OK band US
I 102 E0 00 00 77 05 00 29 55  -82 0 22
B 0 0 250 101320 1 0 45
I 103 50 00 00 FF 75 00 48 5B  -81 2562472 7
I 104 60 00 00 FF C5 00 79 DA  -81 2562472 17
...

You need to type the t1 and m0 lines. This sequence turns on listening to station ID 1 on the US band. You should see output lines that start with "I" after the receiver has synced to the transmitter. Lines starting with "#" are just informational lines. This method is useful because there is little room for errors, as all parameters are automatically set for normal reception on a given band. The value before the last in the "I" lines is the packet delay.

Oh, and you'd need to select SENSOR_TYPE_EMULATED at the beginning of the sketch before compilation.

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: Moteino Receiver Help
« Reply #37 on: December 12, 2017, 12:22:05 AM »
Yes, I'll do that.  It will probably be tomorrow, but no problem.

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: Moteino Receiver Help
« Reply #38 on: December 12, 2017, 01:02:07 AM »
Got a chance to try.  Here is the output.  Haven't had a chance to look at it closely.
« Last Edit: December 12, 2017, 10:40:46 AM by mathgui »

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #39 on: December 12, 2017, 03:26:00 AM »
Something bad happened with your post, all I can see is some HTML code, but no attachment...

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #40 on: December 12, 2017, 10:45:48 AM »
Maybe another browser and/or antivirus software could help...?

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: Moteino Receiver Help
« Reply #41 on: December 12, 2017, 10:48:28 AM »
not sure what's going on, but it's there now.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #42 on: December 12, 2017, 10:54:27 AM »
Yeah, thanks for your efforts. Unfortunately it exhibits the same problem. I've absolutely no idea what's going on with your setup. Perfectly working here using EU band. I tried to use my transmitter and receiver in the US band but I received an ungodly amount of noise so I had to drop the idea. What baffles me is that McCrossley's version works fine. Mine works perfectly, but skipping every other packet. I want to get to the bottom of this so I'm waiting for McCrossley's tests when he'll have the time for it.

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: Moteino Receiver Help
« Reply #43 on: December 12, 2017, 10:57:50 AM »
Okay.  It would be nice to figure it out.  I'll help if you need me to try anything.

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #44 on: December 12, 2017, 11:27:12 AM »
Thanks. Checking the delay values in your log, the packets are consistently late about 2.5 ms. I changed a few timing values and pushed new code, could you try it later when you have time?

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: Moteino Receiver Help
« Reply #45 on: December 12, 2017, 01:54:14 PM »
Here's some output.  Looks about the same.

Code: [Select]
# WxReceiver v2017091302 ready to accept commands
?
# OK listening to 1
# OK band US
B 0 0 250 101320 0 0 45
I 102 80 00 96 1A A9 00 16 62  -58 0 -36
I 104 E0 00 96 09 01 00 C7 9E  -64 5130044 -37
I 106 80 00 96 1A A9 0E F7 AC  -75 5130012 -37
I 108 E0 00 96 09 01 06 A7 58  -55 5130028 -36
B 0 0 250 101320 7 3 45
I 110 80 00 96 1A A9 06 76 A4  -67 5130032 -36
I 112 E0 00 96 09 01 05 97 3B  -67 5130032 -37
I 114 80 00 96 1A A9 04 56 E6  -55 5130020 -36

Here is some output from the mcrossley library:

Code: [Select]
# WxReceiver v2016071301 ready to accept commands
?
# OK listening to 1
# OK
# OK band US
# OK
B 0 0 214 100913 0 0 300
I 101 80 00 96 1A 79 00 03 45  -53 0 -36
I 102 90 00 96 01 01 69 D6 2C  -55 2565040 -36
I 103 E0 00 96 09 01 00 C7 9E  -66 2564980 -36
B 0 0 215 100918 3 0 311
I 104 50 00 96 FF 71 00 65 99  -58 2560904 -37
I 105 80 00 96 1A 79 00 03 45  -54 2564996 -36
I 106 A0 00 96 31 29 00 4E C5  -74 2565020 -37
I 107 E0 00 96 09 01 00 C7 9E  -67 2565004 -37

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #46 on: December 12, 2017, 02:51:52 PM »
I removed my previous post because I wanted to check something before posting. Could you please check out the branch Branch_57dd1ba95a540d12c7bc1006a8fa5c759f67df1c, this is one commit before I started playing around with my new transmit code. I think it should work for you. Thanks for your help so far, I hope I don't need to bother you too much with this again :)

Offline mathgui

  • Member
  • *
  • Posts: 19
Re: Moteino Receiver Help
« Reply #47 on: December 12, 2017, 04:31:51 PM »
No problem helping.  But it appears to not be there yet. Sorry:

Code: [Select]
# WxReceiver v2017061601 ready to accept commands
?
# OK listening to 1
# OK band US
B 0 0 250 101320 0 0 45
I 100 90 00 3D 01 33 13 9E 6F  -54 0 -36
I 102 50 00 3D FF 73 00 F7 92  -52 5127944 -35
I 104 A0 00 48 F3 1B 07 1F 1B  -52 5128964 -36
I 106 50 00 63 FF 71 0B F7 FA  -57 5126920 -36

Is there a way to verify I got the right branch?

Offline kobuki

  • Forecaster
  • *****
  • Posts: 838
Re: Moteino Receiver Help
« Reply #48 on: December 12, 2017, 04:35:02 PM »
Yeah, figured. I was able to fire up the US transmitter for a short while and had the same results. Yes, the version string shows you're on the right branch. Thanks again, I need to go farther and/or deeper. I have a vague idea now what could cause the problem but still I don't get why it's only broken in a specific band.

 

anything