Closed Paymaniha closed 2 years ago
Hi, yes you must lookup that 'WebSockets.h' file in your Arduino\libraries directory and patch that WEBSOCKETS_TCP_TIMEOUT define. I have myself set it to 200 (default is 5000 which is much too long).
Thanks compile is done, i'm not be able to get data from VAN BUS from my car also i just set SELECTED_PACKETS to VAN_PACKETS_ALL_VAN_PKTS but got nothing do have any advice?
Do you see any packets being dumped on the serial port when running https://github.com/0xCAFEDECAF/VanBus/blob/master/examples/VanBusDump/VanBusDump.ino ?
I'll check I could only get the information on the phone for a few seconds and then the Arduino does not process! And the numbers freeze I will work on this problem
As you can see, i am be able to get all of the packets, maybe it's related to the web server or socket side, please let me know if it's correct or not, Regards
That looks promising :-) It means that your vehicle has the VAN comfort bus, and your electronics are correctly wired.
Next you can try is to run https://github.com/0xCAFEDECAF/VanBus/tree/master/examples/PacketParser .
If that works fine, we can be pretty sure it is an issue with the WebSocket server (which could, in turn, be caused by a Wi-Fi connectivity issue). Which version of the WebSockets Library are you using? I tested only with version 2.2.0, 2.3.3, 2.3.4 and 2.3.5 . The WebSockets Library hangs up the system completely while it is trying to transmit a WebSocket packet. That is why I set the WEBSOCKETS_TCP_TIMEOUT to a low value of 200 milliseconds.
Did you apply all board settings as described here? The described patch in the platform.txt
file seemed to considerably improve the Wi-Fi performance in my situation.
Does the ESP board also freeze if you have no Wi-Fi client connected? To see if it freezes, you can simply edit Config.h and make sure the following #defines are defined:
#define PRINT_JSON_BUFFERS_ON_SERIAL
#define SELECTED_PACKETS VAN_PACKETS_ALL_VAN_PKTS
This will cause a permanent dumping of JSON data on serial, for all packets that would be / are being sent over the WebSocket (will print even if there is no client connected).
Also consider defining:
#define DEBUG_WEBSERVER
#define DEBUG_WEBSOCKET
in the same Config.h file.
Hi Buddy I hv a 2006 Peugeot 206 too I could receive pockets Bud the main problem is when i hve cheked packet parser thas just the live van connect its work for 1 sec or less
u can see in photo In addition the 8266 didnt work when all wires are connected,unless first connect the powe suply then connect Van Data wire
Could you try to apply the fix as described in https://github.com/0xCAFEDECAF/VanBus/issues/3#issuecomment-846454593 ?
"note: bypassing the queue overrun check by removing &isQueueOverrun from the VanBusRx.Receive() call in line 3770 of PacketParser.ino seems to fix the stop of parsing without any further issues for me"
Yes bro it works tnx Just 2 question 1-I didn't have fuel level in pegoeut 206 . In packetparser i can see the fuel level at prsentage but it didn't show how many liter remains 2-can i have oil temp when car engine is on?
Good!
Yes, fuel percentage and oil temp seem to be present in packets of IDEN 4FC. Byte 6 has been identified as oil temp and byte 7 as fuel percentage. Source: http://pinterpeti.hu/psavanbus/PSA-VAN.html#4FC_1 .
However, I have never seen any of these bytes have other values than 0xFF. Maybe it is depending on the specific vehicle. I have a 406 from 2003. But from your screen dump it looks like your vehicle is reporting that data.
If you want this data to appear on the screen you must add a field for them in the the MFD.html . The field names are "oil_temp
" and "fuel_level
"; see around line 1007 of PacketToJson.ino . As said, I never bothered, because my vehicle does not report them.
tnx a lot
Is it usual that sometimes it stuck and then run? And the other problem is the speedometer sometimes is on km\h and suddenly it changes to mph and when this happens the 8266 led is on
LED on means it is trying to send a packet on the WebSocket; see around line 53 of WebSocket.ino.
Serial will show if a WebSocket packet took very long to transmit, see line 68 of same file:
Sending XXX JSON bytes via 'webSocket.sendTXT' took: XXX msec
Do you see such output?
Hello after a few weeks :)) This time I ran PacketParser.ino You can see the result! I made all the settings according to the description. Of course I remove (& isQueueOverrun) but again I have only 1 second of processing and the board fails and the blue light does not turn on! What is the next Try? ;) !
I'm afraid I cannot reproduce your issue. So I cannot help you further at this point.
I'm afraid I cannot reproduce your issue. So I cannot help you further at this point.
Okay, thanks for the reply I try to find the problem Do you have a business email for communication?
I don't have a business email, this is a hobby project :-) Please communicate via this topic.
Okay. I wanted you to guide me on another project that was not related to this topic. Although this project did not work properly (maybe just for me) but it was interesting fun;) Good luck
Thanks, no problem. Good luck and success with your other project!
Hello buddy I was very happy to see your project. It is attractive In the initial check, I could not see the information on the server! I tested the first and second methods I did not try the third method without a network controller.
I tested with 8266 based Ardiono boards but I have no data on the server I have a compilation error, maybe this is the problem!
error "...\Arduino\libraries\WebSockets\src\WebSockets.h:"
error "Value for '#define WEBSOCKETS_TCP_TIMEOUT' is too large; set to at most 1000!"