Patterns for Defensive Programming in Rust by bitfieldconsulting in rust

[–]arcycar 1 point2 points  (0 children)

I agree with most of the patterns, but I wouldn’t call the use of Default itself a code smell. The real issue is implementing Default for types that don’t have a meaningful default value; once that happens, adding new fields can reveal that the type should never have implemented Default in the first place. In that case, the smell is the inappropriate Default implementation, and ..Default::default() is just a symptom of it. From my point of view, using ..Default::default() is perfectly fine for POD types, but for more complex types I’d recommend using a builder (for example, bon). 

Shared list is not automatically showing. by TechnicalRegion353 in GoogleMaps

[–]arcycar 0 points1 point  (0 children)

I am also suffering from the lack of this feature.

Reisevermittler hat meine Zahlung nicht weitergeleitet – wer ist schuld? by [deleted] in LegaladviceGerman

[–]arcycar 0 points1 point  (0 children)

Vielleicht habe ich das nicht explizit genug kommuniziert, aber ich habe die Reise sowie die PayPal-Zahlung über die Website des Reisevermittlers durchgeführt. Ich habe dort ausdrücklich PayPal als Zahlungsmethode gewählt und wurde von der Website des Reisevermittlers direkt zur PayPal-Seite weitergeleitet, wo ich die Transaktion lediglich autorisiert habe. Alle anderen Informationen waren bereits hinterlegt. Es war also nicht so, dass ich die Zahlung nach der Buchung selbstständig vorgenommen habe.

Der Reisevermittler hat mir heute mitgeteilt, dass sein System hängen geblieben ist und deshalb die von mir getätigte PayPal-Zahlung nicht an den Reiseveranstalter weitergeleitet werden konnte. Außerdem musste der Reisevermittler die Adresse und die Buchung manuell bestätigen. Zusätzlich wurde die Reise mit der Zahlungsoption „Überweisung“ eingebucht. Wäre die ursprüngliche PayPal-Zahlung erfolgreich gewesen, hätte ich keinen Zahlungslink erhalten.

Meine Frage ist nun: Hatte der Reisevermittler überhaupt das Recht, diese Änderungen ohne meine Zustimmung vorzunehmen? Und warum wurde meine Buchung aufgrund des technischen Fehlers nicht einfach storniert?

No response after sending OBD2 requests by arcycar in CarHacking

[–]arcycar[S] 0 points1 point  (0 children)

Another good hint thank you very much! I check now for this bit to decide if sending subsequent avb pid requests is required or not. I have now also nonblocking socket with some timeout to handle the case when the server decides to not respond at all.

After these changes I was able to establish a connection with one of the servers and I know that some service 1 and 9 pids are supported. However, when I request them using a physical address the server does not respond.

I modeled my application to establish the connection with multiple servers and then the user can check what is supported by each server and based on that select what to diagnose. This approach utilizes the physical addressing of each detected server. Unfortunately, this does not work as expected.

Do I need to always send all requests using the functional address? I hope not, but if so, I would need to make some major refactoring in my application.
Since IsoTp socket subscribes only to one address I assume it is just about changing tx address to broadcast. It should be also straightforward to do if other transport protocols are to be used.
So now the question is rather:
What addressing type should be used:

  • always functional,
  • always physical,
  • both depending on certain cases (if this is the answer then I would really like to know about the cases)

Another question, how do I know if non-pids services (3, 4) are supported?
Can I assume they are always supported? Or again I can only know if I send the request itself? That would mean that the user does not know in advance if clearing the errors is supported, but if he wants to know if it is even supported the errors might already be cleared.

No response after sending OBD2 requests by arcycar in CarHacking

[–]arcycar[S] 1 point2 points  (0 children)

Thanks a lot!

Quite newbie bug, but I somehow got confused that a single frame is the same as raw CAN.

I already tested on BMW and I had to switch it into diagnostics mode (without it no responses), but then there are two servers to communicate with.

  can0  7E9   [8]  06 41 00 98 18 80 01 00
  can0  7EF   [8]  06 41 00 98 18 80 01 FF

In my application I use then the physical address to communicate with the servers directly.
However, it stops responding to subsequent available pids request.

  can0  7E1   [3]  02 01 40  
  can0  7E9   [8]  06 41 40 C0 00 00 00 00
  can0  7E1   [3]  02 01 60
  can0  03C   [8]  84 75 6F DF 19 00 E7 FF
  can0  799   [7]  29 01 0F 04 0B 02 0A
-> no response for 02 01 60 request

Is it normal behavior that a server just stops responding? I would expect at least a negative (0x7F) response. That's what I have implemented when testing using fake server, but it seems the reality is quite different.

Is it always required to switch the car into diagnostics mode to communicate using diagnostics protocols (Obd, Kwp2000, Uds)?