Unexpected end of stream

Basic / Standard Reef Angel hardware
Post Reply
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Unexpected end of stream

Post by knapp870 »

Wifi on my reef angel has gotten to the point I rarely even try to get it set up anymore. I know part of this is due to my internet service provider and their system updates but I had some time today and I can't get it to connect. I keep getting an end of stream error when I try to connect from the app. Suggestions? I've been a RA user for years but unfortunately it's starting to get to the pii t of becoming a fancy timer :(
Attachments
Screenshot_20190511-102649.png
Screenshot_20190511-102649.png (183.49 KiB) Viewed 9403 times
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Unexpected end of stream

Post by rimai »

The new cloud wifi should take care of that as it doesn't require any connection from the app to the controller.
It uses a cloud server so you no longer need firewall setup and the data just keep streaming all the time.
Roberto.
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

That's great except I already have two of the older wifi attachments...
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Unexpected end of stream

Post by rimai »

Do you know how to get the "get e" log from the wifi attachment? Can you post?
Roberto.
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

I've never done that. I'll have to find instructions
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Unexpected end of stream

Post by rimai »

Connect the wifi attachment to USB-TTL cable and open putty or tera term.
Open a new connection to the serial port at 57600 baud
Type $$$ within a second
Then type get e and hit enter.
It should dump the settings.
Roberto.
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

rimai wrote:Connect the wifi attachment to USB-TTL cable and open putty or tera term.
Open a new connection to the serial port at 57600 baud
Type $$$ within a second
Then type get e and hit enter.
It should dump the settings.
thanks. Here they are:

wifly-GSX Ver: 4.41 Build: r1057, Jan 17 2014 10:26:29 on RN-131
SSID=WiFly-GSX-58
Pass=
Linkmon=3600
Beacon=102
Reboot=0
IF=UP
DHCP=ON
IP=192.168.0.2:2000
NM=255.255.255.0
GW=192.168.0.1
HOST=198.171.134.6:80
PROTO=TCP,
MTU=1524
FLAGS=0x6
TCPMODE=0x0
BACKUP=0.0.0.0
OPEN=
CLOSE=
REMOTE=
FlushSize=1420
MatchChar=0
FlushTimer=5
IdleTimer=3
CmdChar=$
DNS=209.18.47.63
Name=www.reefangel.com
Backup=rn.microchip.com
Lease=86400
FTP=198.175.253.161:21
File=wifly-GSX.img
User=roving
Pass=Pass123
Dir=public
Timeout=200
FTP_mode=0x0
SSID=TG1672GF2
Chan=0
ExtAnt=0
Join=1
Auth=OPEN
Mask=0x1fff
Rate=12, 24 Mb
Linkmon=5
Passphrase=TG1672G2391F2
EAP_Id=userid
EAP_User=peap-user
SleepTmr=0
WakeTmr=0
Trigger=0x10
Autoconn=0
IoFunc=0x0
IoMask=0x20f0
IoValu=0x0
DebugReg=0x0
PrintLvl=0x0
LaunchStr=web_app
TimeEna=0
TIMEADR=64.90.182.55:123
Zone=7
Baudrate=57600
Flow=0x0
Mode=0x2
Cmd_GPIO=0
JoinTmr=1000
Replace=0x24
DeviceId=ReefAngelWifi
Password=
Format=0x0
Signal=0
Average=5
BCAST=255.255.255.255:55555
Interval=0x7
Backup=0.0.0.0:0
Sensor=0x0
SensePwr=0x0
<4.41>
Image
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

Jun 10, 2019 9:08:57 PM
Profile: Home
Host: 192.168.0.2:2000
User ID: knapp870
IOException
java.io.IOException: unexpected end of stream on Connection{192.168.0.2:2000, proxy=DIRECT hostAddress=/192.168.0.2:2000 cipherSuite=none protocol=http/1.1}
Stack Trace:
java.io.IOException: unexpected end of stream on Connection{192.168.0.2:2000, proxy=DIRECT hostAddress=/192.168.0.2:2000 cipherSuite=none protocol=http/1.1}
at okhttp3.internal.d.a.a(Unknown Source:114)
at okhttp3.internal.c.b.a(Unknown Source:174)
at okhttp3.internal.c.g.a(Unknown Source:165)
at okhttp3.internal.b.a.a(Unknown Source:34)
at okhttp3.internal.c.g.a(Unknown Source:165)
at okhttp3.internal.c.g.a(Unknown Source:6)
at okhttp3.internal.a.a.a(Unknown Source:137)
at okhttp3.internal.c.g.a(Unknown Source:165)
at okhttp3.internal.c.g.a(Unknown Source:6)
at okhttp3.internal.c.a.a(Unknown Source:160)
at okhttp3.internal.c.g.a(Unknown Source:165)
at okhttp3.internal.c.j.a(Unknown Source:63)
at okhttp3.internal.c.g.a(Unknown Source:165)
at okhttp3.internal.c.g.a(Unknown Source:6)
at okhttp3.y.f(Unknown Source:114)
at okhttp3.y.a(Unknown Source:37)
at info.curtbinder.reefangel.service.a.run(Unknown Source:120)
at info.curtbinder.reefangel.service.UpdateService.a(Unknown Source:13)
at info.curtbinder.reefangel.service.UpdateService.a(Unknown Source:105)
at info.curtbinder.reefangel.service.UpdateService.onHandleIntent(Unknown Source:33)
at android.app.IntentService$ServiceHandler.handleMessage(IntentService.java:76)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.io.EOFException: \n not found: limit=0 content=…
at a.n.e(Unknown Source:206)
at okhttp3.internal.d.a.f(Unknown Source:4)
at okhttp3.internal.d.a.a(Unknown Source:37)
... 23 more
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Unexpected end of stream

Post by rimai »

I would recommend resetting the settings.
https://forum.reefangel.com/viewtopic.php?f=3&t=4601
Roberto.
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

Ok I tried resetting and still getting unexpected end of stream. What's next?
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Unexpected end of stream

Post by rimai »

Does uapp give you these error too?
Roberto.
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

It says unable to Process controller data
Image
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

Screenshot
Attachments
Screenshot_20190620-211216.png
Screenshot_20190620-211216.png (171.02 KiB) Viewed 8078 times
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Unexpected end of stream

Post by rimai »

What do you get if you connect to the controller?
http://ipaddress:2000/r99
Roberto.
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

Says page did not send any data
Attachments
Screenshot_20190621-200508.png
Screenshot_20190621-200508.png (92.97 KiB) Viewed 8068 times
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Unexpected end of stream

Post by rimai »

The log you showed earlier said your ip address was 192.168.0.2.
Did anything change?
Roberto.
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

Every time you set it up almost it gets a new IP from the router. We'll, it jumps between 5 or 6 different ones depending on what is available at the time....
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Unexpected end of stream

Post by rimai »

Ok, if you are sure that is the IP address, there may be something wrong with either the module or the cable.
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Unexpected end of stream

Post by lnevo »

You need to set it static on your router. If you aren't using cloud wifi or star then it's not going to work with your port forwarding..
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

lnevo wrote:You need to set it static on your router. If you aren't using cloud wifi or star then it's not going to work with your port forwarding..

Sorry but i think you must be misunderstanding. It doesn't receive a new IP every time it connects...just when setting it up. I'vehad one of these for 6 years and never had to set static IP.

That being said I reset everything again, deleted the manual port forwarding I put in place and disconnected and reconnected all cables. I can now connect when on wifi but I cannot connect externally using the gateway ip or the router ip
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Unexpected end of stream

Post by lnevo »

Ok well at least you know that it's working now. So the app is working properly now?

Did you re-setup the port forwarding? It sounded like you went from .2 to .8 or vice-versa. The port-forwarding needs to match that.

Apologies for any miscommunication.
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

Here is the current state. When home on wifi, connecting works (sometimes takes a few attempts of getting errors), but when the app is set to away and I'm off home network it will not connect and says timeout. However....the portal updates all parameters but shows connection status of unreachable address.....thoughts on this? Appreciate the help as always! @rimai @lnevo
Image
rimai
Posts: 12857
Joined: Fri Mar 18, 2011 6:47 pm

Re: Unexpected end of stream

Post by rimai »

Sounds like port forwarding
Roberto.
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Unexpected end of stream

Post by lnevo »

I agree 100%
knapp870
Posts: 39
Joined: Mon Apr 16, 2012 10:52 am
Location: Kansas City, MO

Re: Unexpected end of stream

Post by knapp870 »

So it's possible that port forwarding is half set up? Forwarding on home network but not off network? How is the portal updating partially via external networks?
Image
User avatar
lnevo
Posts: 5422
Joined: Fri Jul 20, 2012 9:42 am

Re: Unexpected end of stream

Post by lnevo »

There is no forwarding in the "Home" network. Forwarding is to get you from your router to the RA inside your network. The portal gets updated because the RA makes an *outgoing* connection to the portal every 5 minutes, but you cannot connect internally to a device (RA) behind your firewall/router which is where the forwarding comes into play. On the router you want to make sure the port 2000 is forwarded to the IP address of your RA on port 2000 and make sure the port is open on the outside. (sometimes you have to add this also to the firewall)
Post Reply