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

Supporting devices with SDL 2.0.0 #1541

Closed
peterkomar opened this issue Oct 28, 2020 · 13 comments · Fixed by #1558
Closed

Supporting devices with SDL 2.0.0 #1541

peterkomar opened this issue Oct 28, 2020 · 13 comments · Fixed by #1558
Labels
bug A defect in the library manager-lifecycle Relating to the manager layer - lifecycle manager
Projects

Comments

@peterkomar
Copy link

Bug Report

I'm using an old device with SDL 2.0 and I don't have the ability to upgrade to the latest. Looks like the last versions of android SDL doesn't support old SDL cores.

Reproduction Steps
  1. Set value for MediaTrackTextField it doesn't work with 4.12.x versions but work with 4.9.0 version
  2. Getting permissions from the server can't process it with success with 4.12.x versions (it tries several times) but works with 4.9.0 version, permissions are downloaded but not applied correctly.
OS & Version Information
  • Android Version: 9
  • SDL Android Version: 4.12.1
  • Testing Against: [What you tested with to observe this behavior]
@joeljfischer joeljfischer added bug A defect in the library manager-lifecycle Relating to the manager layer - lifecycle manager labels Nov 5, 2020
@joeygrover joeygrover added this to To do in 5.0.1 Nov 10, 2020
5.0.1 automation moved this from To do to Done Nov 17, 2020
@bilal-alsharifi bilal-alsharifi mentioned this issue Nov 18, 2020
1 task
@bilal-alsharifi
Copy link
Contributor

@peterkomar Thanks for reporting the issue. We fixed that bug in a hotfix release (v4.12.2) for the previous major version. We also included that fix in develop branch for the current major version (v5.0). We may also release a hotfix later (v5.0.1) for the current major version that includes the fix.

@peterkomar
Copy link
Author

@bilal-alsharifi issue with MediaTrackTextField was fixed, thanks.
But issues with permission still exist. In RPCBuilder app which was built with android sdk 4.9.0 to make it work I choose Spec as Mobile_API_3.1.xml instead of Mobile_API_4.1.xml. Is it something similar has 5.0 sdk or it detects automatically?

@bilal-alsharifi
Copy link
Contributor

@peterkomar Thanks for testing the fixes. Can you elaborate more on the permission issue? do you mean the policy table updates don't work? Would it be possible to provide the exact reproductions steps for that issue, the expected behavior, and what is the wrong behavior that you are seeing?

@peterkomar
Copy link
Author

20201123_090200

It's stuck in this state. I see some network traffic on my device from my app when retrieving permissions just starts, after that, I didn't see any network traffic until retrieving permissions didn't restart again. On the older version of Android SDL 4.9.0 it was able to successfully finish.

But the interesting thing I noticed on the older version (4.12.1 before the fix, also in 4.9.0) of Android SDL I was able to retrieve all vehicle data except tire pressure, it returned "Requested Vehicle Data is not available" but after the fix which you applied now I able to retrieve tire pressure as well. But I'm not totally sure if it related.

@joeygrover
Copy link
Member

I retested with our Sync 2.0 TDK through the automatic process and the manual process. In both scenarios it appears to complete successfully. Please note that downloading the policy table and sending it to the module doesn't take very much time, however, the TDK takes around ~30 seconds to update the policy table on its end. At this point I don't believe there is much we can do on the library side to determine what is happening in your situation. I would recommend doing a factory reset of the module in case maybe the policy table became corrupt and it's unable to apply the update. See video of the manual process attached.

Video capture of successful manual PTU.zip

@peterkomar
Copy link
Author

@joeygrover Thanks for checking 👍

@peterkomar
Copy link
Author

peterkomar commented Dec 4, 2020

@joeygrover just tried again after a factory reset but the problem still the same.
12345.mov.zip - it is a cut video

I waiting for 2 mins.

But when I run this app https://github.com/smartdevicelink/rpc_builder_app_android/releases lastest version I'm using this release https://github.com/smartdevicelink/rpc_builder_app_android/releases/download/1.4.0/RPCBuilder.apk with my app name and appid permissions were downloaded sucessfuly.

My device is Sync 1.1 get 2 with software 5.11 and SDL 2.0.0

What version of Sync contains your TDK?

@peterkomar
Copy link
Author

peterkomar commented Dec 8, 2020

Just noticed that I'm using sdl sdk 5.0.0 instead of 4.12.2. Sorry, my fault :(

@joeygrover
Copy link
Member

So, just to double check, does that mean everything is working on your end now with 4.12.2?

@peterkomar
Copy link
Author

I will give an answer later this week when I will have access to the vehicle.

@peterkomar
Copy link
Author

peterkomar commented Dec 9, 2020

Confirming that download permissions work with 4.12.2 on SDL 2.0 (I did a factory reset before the test ) but found the other issue:

I the head unit I have only one checkbox Body Info and it is selected. Also, SYNC says that I have permissions to get:

  • fuel
  • odometer
  • vin
  • external Temperature
  • Tire Pressure

But when I make a request I'm able to retrieve the odometer and vin only. Other data is not available (received response: vehicle data vas not available).

When I download permissions with sdl_java_suite 4.9.0 I'm able to retrieve all these data.

Could you check if data is available on your Sync 2.0 TDK after download permissions?

Also found when I check permissions with

sdlManager.getPermissionManager().isPermissionParameterAllowed(FunctionID.GET_VEHICLE_DATA, GetVehicleData.<param>);

it always returns false for all of them but actually, I'm able to get some of the data. when I call for example:

Integer odometer = ((GetVehicleDataResponse) response).getOdometer();

I'm able to get the odometer but android PermissionManager says that this data is not available.

Here some logs from my app, hope it will help

Screenshot_20201209-094815_MyCar

Screenshot_20201209-094812_MyCar

@joeljfischer joeljfischer removed this from Done in 5.0.1 Dec 10, 2020
@joeljfischer joeljfischer added this to Contributions in 5.1.0 via automation Dec 10, 2020
@joeljfischer joeljfischer moved this from Contributions to Done in 5.1.0 Dec 10, 2020
@joeygrover
Copy link
Member

I have confirmed that the policy table update occurs correctly with our unit. I was able to grant user consent when activating an app that requested vehicle data. After this consent, the app received an OnPermissionChange that contained the correct state of permissions. The permission manager then returns true for the following:

PermissionManager permissionManager = sdlManager.getPermissionManager();
Boolean bodyInfoAllowed = permissionManager.isPermissionParameterAllowed(FunctionID.GET_VEHICLE_DATA, GetVehicleData.KEY_BODY_INFORMATION);
Log.d(TAG, "Body info allowed: " + bodyInfoAllowed);

The app is then able to retrieve the body information successfully. My only suggestion would be to make sure you are using the correct app name and app ID that was provided to Ford for access.

At this point I'm really not sure how much more we are going to be able to help find the issue. This might be a better time to talk directly with your Ford contact. Of course we will assist if we can, but I don't see where the library would be at fault at this point.

@peterkomar
Copy link
Author

peterkomar commented Dec 11, 2020

Thanks for checking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A defect in the library manager-lifecycle Relating to the manager layer - lifecycle manager
Projects
No open projects
5.1.0
Done
Development

Successfully merging a pull request may close this issue.

4 participants