-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v07 UnicodeDecodeError invalid continuation byte #111
Comments
@ivanfmartinez I have your branch running now. It's producing the same error, but is continuing with the Starting JuiceboxMITM Loop...and it did finally exit with:
The weird thing is that the problem ID in the message doesn't quite match my JuiceBox ID.
I'm not sure if it's gotten corrupted on the JuiceBox, or what? I'm not really sure how to change it either... |
@pbjfarm its TCP/IP which does have checkings, the value will not be corrupted on TCP/IP part, it should be corrupted before going out juicebox device. It appear to me something hardware related. Even if I change the \xc3 to 1 on the message you sent on first comment of the issue, the checksum still does not match. To try to understand if there is also another exception that I can catch probably I need a complete log to check. If you dont want to send log here you can send to my email (my github username at gmail) or telegram with same username . All messages are corrupted or some are correct ? |
@ivanfmartinez I thought this was UDP...but it does seem like my messages (or at least the ID) are corrupted somehow. I've now managed to brick my box somehow (it's not showing the local WiFi SSID on reboot), so I won't be able to provide logs until I can figure out what's going on. |
@pbjfarm JB used UDP and UDP is part of TCP/IP. If the ids are broken in all messages, them is something on the device. Maybe FalconFour can help with more ideas or maybe someone else on Discord check main page for link https://github.com/JuiceRescue |
Hi. Not trying to be critical at all. But I'd like to clarify about TCP and UDP. UDP isn't part of TCP/IP. IP is a layer 3 protocol. Both UDP and TCP are layer 4 protocols that run on top of IP. You use one OR the other. TCP establishes a stateful connection to a remote peer and provides reliable stream transport so that higher layer protocols can send data without worrying about issues such as resending data if packets are lost. TCP takes care of that. UDP is a best effort datagram protocol. It is connectionless. It sends a packet and it's done. When using UDP, the higher layer protocol must handle issues such as resending lost packets/data. While UDP doesn't guarantee packet delivery, it does support a checksum to try to detect any packet corruption. However, this checksum is optional and the implementation can set it to zero to disable it. UDP seems a logical choice for the JB as it sends a complete message in a single datagram, and even if a packet is lost, the JB is going to resend another soon anyway. TCP would add unnecessary overhead, especially on a busy server. As for the UDP checksum, I have no idea if the JB uses it or not. We could tell from a packet capture. Since the Enel X protocol provides its own checksum, there is a good chance they are not using the UDP checksum. |
This just started happening for me one day ago. Here's the error:
|
I tried rebooting the juicebox, and I found something interesting. After issuing the
Note: That HTTP thing wasn't there before and went away after a few seconds. Checking the response when visiting that URL, I saw this: {"key":"ef3c41c925ff10174684512b40beace03dd22aeeac5aa2fb97a8af49fcb4d38c","exp_date":"2025-11-14T14:27:30.802Z","err_msg":null} |
Found another bit of interesting information. I was using the DNS override method, and I had the What I saw after rebooting the juicebox again and running
This time there's another URL listed ( {
"control_api_endpoint" : "https://juicenet-prod4.enelx.com",
"device_https_endpoint" : "https://juicenet-prod4.enelx.com",
"device_ocpp_endpoint" : "https://juicenet-prod4.enelx.com",
"device_protocol" : "Both",
"device_udp_endpoint" : "juicenet-udp-prod4-exw.enelx.com:9004",
"encrypt" : "false"
} Note the presence of the OCPP protocol (Open Charge Point Protocol). Could this be the way to MITM this box and gain permanent control over it? |
One more error, this time a different one (
|
The enel X servers are enabling encryption on the devices. You have to block access to the enel x servers using something
I have tried to access the standard endpoint for some of the devices that are using encryption and all return encrypt false, probably the Juicebox send any header that makes the server know that device can support encryption and then are returning true or other thing to enable the encryption. |
@philipkocanda the line numbers from your exceptions does not match the lines from latest version in my branch. Latest version has better messages when encryption is found. Your device is sending v08 protocol version, can you add information about your device at, help understand if its a different version or just something that directory server changed : https://github.com/JuiceRescue/JuiceboxRescueWiki/wiki/Firmware-Versions https://github.com/JuiceRescue/JuiceboxRescueWiki/wiki/Hardware-Versions |
My JPP docker setup stopped working a couple weeks ago. It seems to be related to a character in the JuiceBox ID that the box is sending...although I haven't changed anything.
This appears to be different than the other issue mentioning UnicodeDecodeError - as that issue was using what appeared to be an encrypted version of the protocol...mine is still v07.
Startup just loops until finally erroring out.
The text was updated successfully, but these errors were encountered: