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

Hi. Problem configuring #16

Open
acetuning opened this issue Apr 17, 2024 · 52 comments
Open

Hi. Problem configuring #16

acetuning opened this issue Apr 17, 2024 · 52 comments

Comments

@acetuning
Copy link

acetuning commented Apr 17, 2024

Hi

I did use your example app but XcodeGen always had problem with dependency never could find the git repo of SwiftOBD2.
I use latest code and ios17.

Any way of advice please? Lov the project but definitely would prefer to start from sample app then from scratch

Edit: solved

@kkonteh97
Copy link
Owner

Thank mate. I'm still looking into this issue.
Did you get it working by adding it as a local package.

@acetuning
Copy link
Author

acetuning commented Apr 17, 2024 via email

@acetuning
Copy link
Author

acetuning commented Apr 17, 2024 via email

@kkonteh97
Copy link
Owner

kkonteh97 commented Apr 17, 2024

I will check it out out to see what the bugs are, unfortunately I only have access to a Nissan Altima to test it on. if you have access to various car and want to help improve the repo I would really appreciate it. I don't know much about the uds protocol but I am still learning some of the reading material gets expensive. but if you have experience with any input would be appreciated. does it provide any error codes?

@acetuning
Copy link
Author

acetuning commented Apr 17, 2024 via email

@acetuning
Copy link
Author

acetuning commented Apr 17, 2024 via email

@kkonteh97
Copy link
Owner

lemme add that really quick

@kkonteh97
Copy link
Owner

check the latest commit

@acetuning
Copy link
Author

acetuning commented Apr 17, 2024 via email

@kkonteh97
Copy link
Owner

I can't see the screenshot

@acetuning
Copy link
Author

acetuning commented Apr 17, 2024 via email

@kkonteh97
Copy link
Owner

Still nothing

@acetuning
Copy link
Author

acetuning commented Apr 17, 2024 via email

@acetuning
Copy link
Author

acetuning commented Apr 17, 2024 via email

@kkonteh97
Copy link
Owner

I just fixed the Xcodegen and the error. I'll add loggers in a little bit so we can see the error you are getting

@acetuning
Copy link
Author

acetuning commented Apr 17, 2024 via email

@kkonteh97
Copy link
Owner

I just add a logger you can try updating the package let me know where is logs are.

@acetuning
Copy link
Author

acetuning commented Apr 18, 2024 via email

@kkonteh97
Copy link
Owner

What are the logs you are getting? if it in bluetooth or wifi?

@acetuning
Copy link
Author

acetuning commented Apr 18, 2024 via email

@kkonteh97
Copy link
Owner

for wifi I need to include the instructions you currently have to go into your wifi settings and connect to the device first

@acetuning
Copy link
Author

acetuning commented Apr 18, 2024 via email

@acetuning
Copy link
Author

acetuning commented Apr 18, 2024 via email

@kkonteh97

This comment was marked as outdated.

@acetuning
Copy link
Author

acetuning commented Apr 18, 2024 via email

@kkonteh97
Copy link
Owner

it was an issue with the way I was slicing an array, should be fixed now.

@acetuning
Copy link
Author

acetuning commented Apr 22, 2024 via email

@kkonteh97
Copy link
Owner

in CustomTabNavigator > CustomTabBarView.swift set the preferedProtocol to .protocol6 and see if that works

 private func connectButtonAction() {
        Task {
            guard !isLoading else {
                return
            }
            self.isLoading = true
            let notificationFeedback = UINotificationFeedbackGenerator()
            let impactFeedback = UIImpactFeedbackGenerator(style: .medium)
            impactFeedback.prepare()
            notificationFeedback.prepare()
            impactFeedback.impactOccurred()

            var vehicle = garage.currentVehicle ?? garage.newVehicle()

            do {
                self.statusMessage = "Initializing OBD Adapter (BLE)"
                toggleDisplayType(to: .halfScreen)

                vehicle.obdinfo =  try await obdService.startConnection(preferedProtocol: .protocol6)

@acetuning
Copy link
Author

acetuning commented Apr 23, 2024 via email

@kkonteh97
Copy link
Owner

Sources/SwiftOBD2/commands.swift has all the commands but I send 0100 to get the list of supported pids for the vehicle.

@acetuning
Copy link
Author

acetuning commented Jun 2, 2024 via email

@kkonteh97 kkonteh97 reopened this Jun 2, 2024
@kkonteh97
Copy link
Owner

can you provide me with the logs? I'll take a look at It and let you know what I find.

@acetuning
Copy link
Author

acetuning commented Jun 2, 2024 via email

@acetuning
Copy link
Author

acetuning commented Jun 2, 2024 via email

@acetuning
Copy link
Author

acetuning commented Jun 4, 2024 via email

@kkonteh97
Copy link
Owner

I am working on the fix for the wifi and only logs will give me an idea on why the connection to the car fails.

@acetuning
Copy link
Author

acetuning commented Jun 4, 2024 via email

@kkonteh97
Copy link
Owner

I meant for the 5.0 le device what brand adapter is it?.

@acetuning
Copy link
Author

acetuning commented Jun 4, 2024 via email

@acetuning
Copy link
Author

acetuning commented Jun 4, 2024 via email

@kkonteh97
Copy link
Owner

I will check it out tonight with I'm off work

@acetuning
Copy link
Author

acetuning commented Jun 13, 2024 via email

@kkonteh97
Copy link
Owner

sorry for the late response had to get away for a while, sometimes you get 2 response because there are multiple ecu's responding to the request mainly the engine and transmission, you can tell which is which by the header. I am still fleshing out the multi ecu support so you can specify with you request which ecu you want.

@acetuning
Copy link
Author

acetuning commented Jun 16, 2024 via email

@kkonteh97
Copy link
Owner

Nope the engine ecu always responses to supported pids sometimes so does the transmission.

@IvanIvanovScaleFocus
Copy link

IvanIvanovScaleFocus commented Aug 29, 2024

Hello, @kkonteh97. I am an iOS developer interested on building an app for personal testing on my own Audi A6 C6 2007. I found your great library. You have done a great job, man! I have Elm327 OBD2 WiFi adapter but cannot connect to the car over wifi. I tried out your sample app and also have built my own using your documentation. I am able to connect to the adapter but cant connect to the ecu. I saw previous comments here with the same issue and wanted to ask you if you have any idea or fix for this? Thanks a lot for your work!

@kkonteh97
Copy link
Owner

hey thank you I am glad you found the library helpful. does it provide logs for the command it's sending the the response. also is it finding the protocol

@IvanIvanovScaleFocus
Copy link

IvanIvanovScaleFocus commented Aug 29, 2024

Only this kind of logs:
Sending: 010C0D
SWIFT TASK CONTINUATION MISUSE: sendCommand (_:) leaked its continuation!

@kkonteh97
Copy link
Owner

I just pushed a fix I'm testing it out but seems to be working so far @acetuning @IvanIvanovScaleFocus

@IvanIvanovScaleFocus
Copy link

Great! Will test it out later today! Thanks a lot!

@IvanIvanovScaleFocus
Copy link

IMG_0160

@kkonteh97
Copy link
Owner

just push another potential fix

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

No branches or pull requests

3 participants