Page 1 of 1

Unexpected end of stream

Posted: Sat May 11, 2019 8:32 am
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 :(

Re: Unexpected end of stream

Posted: Sat May 11, 2019 9:22 am
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.

Re: Unexpected end of stream

Posted: Sat May 11, 2019 10:56 am
by knapp870
That's great except I already have two of the older wifi attachments...

Re: Unexpected end of stream

Posted: Sat May 11, 2019 12:49 pm
by rimai
Do you know how to get the "get e" log from the wifi attachment? Can you post?

Re: Unexpected end of stream

Posted: Mon May 13, 2019 10:37 am
by knapp870
I've never done that. I'll have to find instructions

Re: Unexpected end of stream

Posted: Mon May 13, 2019 9:17 pm
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.

Re: Unexpected end of stream

Posted: Tue Jun 11, 2019 4:20 am
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>

Re: Unexpected end of stream

Posted: Tue Jun 11, 2019 6:57 am
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

Re: Unexpected end of stream

Posted: Tue Jun 11, 2019 9:49 am
by rimai
I would recommend resetting the settings.
https://forum.reefangel.com/viewtopic.php?f=3&t=4601

Re: Unexpected end of stream

Posted: Wed Jun 19, 2019 5:19 pm
by knapp870
Ok I tried resetting and still getting unexpected end of stream. What's next?

Re: Unexpected end of stream

Posted: Wed Jun 19, 2019 8:41 pm
by rimai
Does uapp give you these error too?

Re: Unexpected end of stream

Posted: Thu Jun 20, 2019 7:13 pm
by knapp870
It says unable to Process controller data

Re: Unexpected end of stream

Posted: Thu Jun 20, 2019 7:13 pm
by knapp870
Screenshot

Re: Unexpected end of stream

Posted: Thu Jun 20, 2019 10:08 pm
by rimai
What do you get if you connect to the controller?
http://ipaddress:2000/r99

Re: Unexpected end of stream

Posted: Fri Jun 21, 2019 6:05 pm
by knapp870
Says page did not send any data

Re: Unexpected end of stream

Posted: Fri Jun 21, 2019 8:57 pm
by rimai
The log you showed earlier said your ip address was 192.168.0.2.
Did anything change?

Re: Unexpected end of stream

Posted: Sat Jun 22, 2019 11:29 am
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....

Re: Unexpected end of stream

Posted: Sat Jun 22, 2019 11:40 am
by rimai
Ok, if you are sure that is the IP address, there may be something wrong with either the module or the cable.

Re: Unexpected end of stream

Posted: Sat Jun 22, 2019 5:42 pm
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..

Re: Unexpected end of stream

Posted: Sun Jun 23, 2019 6:45 pm
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

Re: Unexpected end of stream

Posted: Mon Jun 24, 2019 5:54 pm
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.

Re: Unexpected end of stream

Posted: Thu Jul 11, 2019 8:03 am
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

Re: Unexpected end of stream

Posted: Thu Jul 11, 2019 9:42 am
by rimai
Sounds like port forwarding

Re: Unexpected end of stream

Posted: Thu Jul 11, 2019 5:25 pm
by lnevo
I agree 100%

Re: Unexpected end of stream

Posted: Fri Jul 12, 2019 9:33 am
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?

Re: Unexpected end of stream

Posted: Fri Jul 12, 2019 4:37 pm
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)