Skip to content
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

failed to obtain VIN #34

Open
aleks-mariusz opened this issue Dec 1, 2024 · 5 comments
Open

failed to obtain VIN #34

aleks-mariusz opened this issue Dec 1, 2024 · 5 comments
Labels
question Further information is requested

Comments

@aleks-mariusz
Copy link

aleks-mariusz commented Dec 1, 2024

I got your obd2-mqtt code loaded onto the a7670x, got my sim card activated and popped it in, i got the lte and gps antennas both connected, plugged in the bluetooth into obd2 port and...

failed to obtain VIN

(repeatedly... )

attached is the full log.. esp-web-tools-logs (10).txt

anyway, i can't tell if this is something that is causing it to not continue/hang indefinitely, or if it is continuing anyway and there's something weird about the serial console (since when i request to reset the device, i see a few more messages that didn't appear until the split-second i clicked reset, so maybe some serial-output-buffering or something?)..

however even with the above error, the bluetooth device (obd2 scanner) blinks continuously tho, so i presume data is being sent collected at least? however i don't see anything in my mqtt server tho (unless i'm not looking in the right place).. there seems to be little information about successfully transmitting mqtt packets (i am using the websocket option btw...

update - i just realized the port was still set to 1883, i think i will need to change it to https or one of the other ports cloudflared supports, i will try that and report back).

@adlerre
Copy link
Owner

adlerre commented Dec 2, 2024

Sorry for the late reply.
This VIN lines can be ignored. You're right, the problem was the connection to the MQTT broker.

@adlerre
Copy link
Owner

adlerre commented Dec 13, 2024

Hey, the new version supports TLS/SSL connections to MQTT/WS. Maybe that solves your problem.

@adlerre adlerre added the question Further information is requested label Dec 14, 2024
@aleks-mariusz
Copy link
Author

aleks-mariusz commented Dec 16, 2024

Hi @adlerre i had a chance to update my lilygo w/ the new firmware that has support for ssl.

Alas, I'm still having issues connecting. I see this repeatedly:

The client obd2mqtt-0123456789ba connects to the MQTT broker......failed with state -2

I also tried disabling SSL (and changing port to 80), that seems to give a different error:

The client obd2mqtt-0123456789ba connects to the MQTT broker......failed with state -4

Any advice what these failure codes mean? What can be tried? or if you have a debugging build you want me to give a go? Are there certain characters in my username and/or password (i have a dash in the username and also have a plus and exclaimation mark in the password)

@adlerre
Copy link
Owner

adlerre commented Dec 16, 2024

Hi @aleks-mariusz,

Error -2 means "MQTT_CONNECT_FAILED - the network connection failed" and -4 means "MQTT_CONNECTION_TIMEOUT - the server did not respond within the keepalive time".

You have several options to check the connection:

Use nmap to check the ports:

nmap <hostname/ip> -p 80 for http
nmap <hostname/ip> -p 443 for https or use any other port after -p.

Use openssl to check Certificate

echo "" | openssl s_client -showcerts -servername <fqdn> -connect <fqdn>:<port> 2>/dev/null

Check the Mosquitto Broker logs, they should give you a clue what is wrong.

Try connecting with MQTT Explorer.

If that works, we need to dig deeper.

Copy link

This issue is stale because it has been open for 30 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants