└── README.md /README.md: -------------------------------------------------------------------------------- 1 | # ecoflow-iot-reverse 2 | Trying to understand how to communicate with Ecoflow Portable Power Stations in **OFFLINE** mode. 3 | 4 | ## Initial considerations 5 | 6 | - Device cannot be reset to "factory settings". 7 | 8 | - The ip of an Ecoflow Delta Max in offline mode is 192.168.4.1 9 | 10 | ## Known open ports: 11 | * 80 12 | * 6093 13 | * 8055 14 | 15 | If you do an aggressive port scan with nmap (as soon as you touch port 6093, for example), it will exit offline mode. 16 | 17 | - On port 80 there's a http server where can change the wifi connection parameters. 18 | If you delete the SSID, password and save, it will no longer connect to the internet. 19 | 20 | - If you make a connection to port 6093, the device will return to IOT (online) mode. 21 | 22 | - The app communicates with the device via byte-stream to port 8055. 23 | 24 | - If you do an aggressive port scan with nmap (or touch port 6093), it will exit offline mode. 25 | 26 | 27 | ## Communication with device 28 | Classes that a priori take care of communication with the device from the app in offline mode: 29 | 30 | ### com.ecoflow.common.utils.StreamUtils 31 | - public static void closeStream(Closeable paramCloseable) 32 | - public static String[] convertStringToArray(String paramString, char paramChar) 33 | - public static byte[] getBytesFromStream(InputStream paramInputStream) 34 | - public static byte[] getBytesFromStream(InputStream paramInputStream, int paramInt) 35 | - public static int stringToInt(String paramString) 36 | 37 | ### com.ecoflow.common.utils.ByteUtils 38 | - public static byte[] File2byte(File paramFile) 39 | - public static byte[] addBytes(byte[] paramArrayOfbyte1, byte[] paramArrayOfbyte2) 40 | - public static byte bitToByte(byte[] paramArrayOfbyte) 41 | - public static int bytes2Uint16(byte[] paramArrayOfbyte) 42 | - public static int bytes2Uint32(byte[] paramArrayOfbyte) 43 | - public static int bytes2Uint8(byte[] paramArrayOfbyte) 44 | - public static int bytes4ArrraystoInt(byte[] paramArrayOfbyte) 45 | - public static String bytesToHex(byte[] paramArrayOfbyte) 46 | - public static int bytesToInt(byte[] paramArrayOfbyte, int paramInt) 47 | - public static int bytesToInt2(byte[] paramArrayOfbyte, int paramInt) 48 | - public static int convertByteToInt(byte paramByte) 49 | - public static int getBit(byte paramByte, int paramInt) 50 | - public static String getBitForLog(byte paramByte) 51 | - public static int getBits(byte paramByte, int paramInt1, int paramInt2) 52 | - public static byte[] getCrc16(byte[] paramArrayOfbyte) 53 | - public static float getFloat(byte[] paramArrayOfbyte) 54 | - public static byte[] getRunOnceDate(Date paramDate) 55 | - public static short getShort(byte[] paramArrayOfbyte, int paramInt) 56 | - public static byte[] getTRtcHalData(Date paramDate) 57 | - public static int getUint16(int paramInt) 58 | - public static int getUint32(int paramInt) 59 | - public static short getUint8(short paramShort) 60 | - public static byte[] hexStringToBytes(String paramString) 61 | - public static byte[] intToBytes2(int paramInt) 62 | - public static byte[] intToUint16(int paramInt) 63 | - public static byte[] intToUint32(int paramInt) 64 | - public static byte[] intToUint8(int paramInt) 65 | - public static float toFloat(byte[] paramArrayOfbyte) 66 | - public static String toHexStringForLog(byte[] paramArrayOfbyte) 67 | - public static int toSignInt(byte[] paramArrayOfbyte) 68 | - public static int toSignedInt(byte[] paramArrayOfbyte) 69 | - public static int toUnsignedInt(byte paramByte) 70 | - public static int toUnsignedInt(byte[] paramArrayOfbyte) 71 | 72 | ### com.ecoflow.iot.bean.socket 73 | - public class FrameInfo 74 | - public byte[] getAck_type() 75 | - public byte[] getCheck_type() 76 | - public byte[] getCmd_func() 77 | - public byte[] getCmd_id() 78 | - public int getData_len() 79 | - public byte[] getDest() 80 | - public byte[] getEnc_type() 81 | - public byte[] getIs_ack() 82 | - public byte[] getIs_queue() 83 | - public byte[] getIs_rw_cmd() 84 | - public byte[] getLdata() 85 | - public byte[] getLink_id() 86 | - public byte[] getNeed_ack() 87 | - public byte[] getPdata() 88 | - public byte[] getProduct_id() 89 | - public byte[] getSeq() 90 | - public byte[] getSrc() 91 | - public byte[] getTime_snap() 92 | - public void setAck_type(byte[] paramArrayOfbyte) 93 | - public void setCheck_type(byte[] paramArrayOfbyte) 94 | - public void setCmd_func(byte[] paramArrayOfbyte) 95 | - public void setCmd_id(byte[] paramArrayOfbyte) 96 | - public void setData_len(int paramInt) 97 | - public void setDest(byte[] paramArrayOfbyte) 98 | - public void setEnc_type(byte[] paramArrayOfbyte) 99 | - public void setIs_ack(byte[] paramArrayOfbyte) 100 | - public void setIs_queue(byte[] paramArrayOfbyte) 101 | - public void setIs_rw_cmd(byte[] paramArrayOfbyte) 102 | - public void setLdata(byte[] paramArrayOfbyte) 103 | - public void setLink_id(byte[] paramArrayOfbyte) 104 | - public void setNeed_ack(byte[] paramArrayOfbyte) 105 | - public void setPdata(byte[] paramArrayOfbyte) 106 | - public void setProduct_id(byte[] paramArrayOfbyte) 107 | - public void setSeq(byte[] paramArrayOfbyte) 108 | - public void setSrc(byte[] paramArrayOfbyte) 109 | - public void setTime_snap(byte[] paramArrayOfbyte) 110 | - public String toString() 111 | 112 | 113 | --------------------------------------------------------------------------------