Sensus to mobile data connection

Faults and Technical chat for the Volvo XC40
Mickr
Posts: 17
Joined: Tue Apr 10, 2018 3:51 pm
Location: Lincs

Post by Mickr »

I am having problems with my iPhone via Bluetooth connection. When an incoming call comes in, it shows in the centre console but there is no ringtone through the car only on my phone. It makes no difference if the phone is locked or unlocked.
FE/T5/Bursting Blue

Deleted User 1286

Post by Deleted User 1286 »

scottpcs wrote: Wed Sep 05, 2018 10:14 am
jagstyles wrote: Thu Aug 23, 2018 2:47 pm Downloaded Tasker but looks like I have quite a bit of learning to do. Lol. Any chance of posting those screenshots? Would love to get some of your scripts loaded into the phone. Thanks!
How did you get on with the guide jagstyles? I'm interested to know how it works for others before I start making more complicated routines that will do more things?
Sorry I haven't responded, just getting around to this now. I had been using Bluetooth tethering to use the Spotify app that comes with the sensus system but I see youre using WiFi hotspot and the Spotify app on your phone.

Does this mean that to change songs or see playlists you're having to use your phone each time? What attracted me to the built in Spotify app is the ability to see the playlists.

Any ideas or suggestions?
scottpcs
Posts: 70
Joined: Tue Aug 21, 2018 6:19 pm

Post by scottpcs »

jagstyles wrote: Mon Sep 10, 2018 2:24 am Sorry I haven't responded, just getting around to this now. I had been using Bluetooth tethering to use the Spotify app that comes with the sensus system but I see youre using WiFi hotspot and the Spotify app on your phone.

Does this mean that to change songs or see playlists you're having to use your phone each time? What attracted me to the built in Spotify app is the ability to see the playlists.

Any ideas or suggestions?
The only reason I'm using Spotify on my phone is because I'm too tight to pay the monthly subscription - the built-in Spotify app won't work with free accounts otherwise I would be using that. I can still see playlists and most other things if I use it via Android Auto but over bluetooth things are much more restricted and it wouldn't be any different no matter what type of account I have in this regard.

A lot of my journeys are relatively short so I like to be able to just get in the car and go without faffing about plugging my phone in and waiting for it all to initialise so using Spotify in this way works for me. I just have to ensure that the playlist I want to play is the last one used so that when the car connects and starts playing, it'll automatically play that one. I'm a bit stuck if I fancy something else whilst driving mind.

I would still suggest using WiFi rather than bluetooth for tethering but it depends how reliablie you're finding bluetooth, mine had a tendency to keep dropping out so I resorted to WiFi and it's been fine ever since. WiFi is also much faster than bluetooth so if you're using your phone for downloads in the car or you're making use of the car's WiFi hotspot via your phone then I'd recommend you use this method for tethering.
XC40 FE D4 AWD Auto - Crystal White ¦ Charcoal ¦ 20" AND Headlight Washers! ¦ Polestar
Deleted User 1286

Post by Deleted User 1286 »

scottpcs wrote: Thu Aug 23, 2018 6:31 pm OK, here we go...

First things first, you need to make sure that Tasker is disabled from battery optimisation, otherwise Android will put it to sleep and it won't activate automatically when you connect your phone to the car. On my phone, this is accessed by Settings -> Battery -> Battery Optimisation -> Tasker -> Don't Optimise (you'll also need to do this for any of the plug-ins that you may or may not use with Tasker.)

To also stop the annoying persistent notification that 'Tasker is running' on Android 8.0 and above, I also unchecked the 'Run In Foreground' under 'Preferences -> Monitor -> General' in Tasker itself and so far I haven't found this to have had any detrimental effect. If you find that Tasker runs unreliably then just re-check this box but I'm afraid you'll have to put up with the notification (this can be disabled using the AutoNotification plug--in but we'll address that in a later post.)

To get started, we'll create the task that will enable the phone's WiFi hotspot and launch Spotify when connected to the car. To do this, simply touch the '+' icon in the bottom-right, give the task a name and then touch the tick icon when done. The task should look like this when we're done:

Tasks-BT-Connect-Cars.jpg

For each action listed above, touch the '+' icon and then:

1. Net -> WiFi Tether -> Set ON
2. App -> Launch App -> Spotify
3. Task -> Wait -> 5 Seconds
4. Audio -> BT Voice Volume -> 12
5. Audio -> Media Volume -> 30

Now we'll create the exit task that will turn off the phone's WiFi hotspot and kill Spotify. Create another task and give it a name as above then:

Tasks-BT-Disconnect-Cars.jpg

1. App -> Go Home
2. Task -> Wait -> 1 Second
3. App -> Kill App -> Spotify
4. Net -> WiFi Tether -> Set OFF
5. Net -> Bluetooth -> Set OFF
6. Net -> WiFi -> Set OFF
7. Task -> Wait -> 5 Seconds
8. Net -> Bluetooth -> Set ON
9. Net -> WiFi -> Set ON

Finally, we need to create a profile that will run the first task when the phone is connected to the car via bluetooth and will run the second task when the phone disconnects from the car:

Profiles-BT-Cars.jpg

Create this by clicking the + icon in the bottom-right then select State -> Net -> BT Connected. Leave the Name field blank and select the magnifying glass icon in the Address field, then select your car's ID/MAC address:

BT-Connected-State.jpg

Back on the main screen, you'll be prompted to choose a task to run - select 'BT - Connect - Cars' (or whatever you named it.) Finally, long-press on the task that's just been associated with that profile and select 'Add Exit Task' then select 'BT - Disconnect - Cars' (or whatever you named it.)

That's it! You should now have created an automated task that will run each and every time your phone connects to the car. I know the exit task in particular looks a bit long-winded but it's been put together through through trial and error and it just works now - any questions just ask :)
So I was able to set this all up and the exit tasks run no problem without any errors but when I try to run the start tasks it fails at the WiFi Tether ON command.

Believe it has something to with the plugins. Not sure.
scottpcs
Posts: 70
Joined: Tue Aug 21, 2018 6:19 pm

Post by scottpcs »

jagstyles wrote: Wed Sep 12, 2018 2:33 am So I was able to set this all up and the exit tasks run no problem without any errors but when I try to run the start tasks it fails at the WiFi Tether ON command.

Believe it has something to with the plugins. Not sure.
First I'd make sure that you've set WiFi tethering up properly and tested it works. Assuming you've done that, it should work but it won't be anything to do with plugins as it doesn't require any. Have you tried running the task manually to see if it works?

The only other reason it may not work is it depends what version of Android you're running on your phone - if it's Nougat or below then you may need a plugin (there should be a warning pop up when you set the WiFi Tether action in Tasker to this effect.)
XC40 FE D4 AWD Auto - Crystal White ¦ Charcoal ¦ 20" AND Headlight Washers! ¦ Polestar
Deleted User 1286

Post by Deleted User 1286 »

When I try running the WiFi Tether ON task I get this error message in Tasker:

19.26.14/E current state: 1
19.26.14/E WiFi Tether: cur: false new: true
19.26.14/M lastWifiDisableAgoMS: 1536794774699
19.26.14/E check AP state
19.26.14/E AP state: 1
19.26.14/M lastWifiDisableAgoMS: 1536794774699
19.26.14/E current state: 1
19.26.14/E curval: 1
19.26.14/E WiFi: cur: false new: false
19.26.14/E wait for 200ms
19.26.14/E wait finished
19.26.14/E WiFi Tether: setWifiEnabled()
19.26.14/E WiFi Tether: Enabling wifi tether
19.26.14/E WiFi Tether: Got method with package false
19.26.14/E WiFi Tether: java.lang.RuntimeException: java.lang.NoSuchFieldException: No field mService in class Landroid/net/ConnectivityManagerEx; (declaration of 'android.net.ConnectivityManagerEx' appears in /system/framework/framework.jar)
at a.a.e.j.f.a(Unknown Source:16)
at a.a.e.d.a.b(Unknown Source:30)
at a.a.g.a(Unknown Source:8)
at com.joaomgcd.taskerm.helper.actions.execute.m.a(Unknown Source:25)
at net.dinglisch.android.taskerm.ExecuteService.a(Unknown Source:251)
at net.dinglisch.android.taskerm.ExecuteService.a(Unknown Source:3280)
at net.dinglisch.android.taskerm.ExecuteService.a(Unknown Source:275)
at net.dinglisch.android.taskerm.ExecuteService.a(Unknown Source:0)
at net.dinglisch.android.taskerm.ExecuteService$1.run(Unknown Source:496)
at java.lang.Thread.run(Thread.java:764)
Caused by: java.lang.NoSuchFieldException: No field mService in class Landroid/net/ConnectivityManagerEx; (declaration of 'android.net.ConnectivityManagerEx' appears in /system/framework/framework.jar)
at java.lang.Class.getDeclaredField(Native Method)
at com.joaomgcd.taskerm.helper.actions.execute.m$a.a(Unknown Source:20)
at b.f.a(Unknown Source:24)
at com.joaomgcd.taskerm.helper.actions.execute.m.d(Unknown Source:7)
at com.joaomgcd.taskerm.helper.actions.execute.m.b(Unknown Source:0)
at com.joaomgcd.taskerm.helper.actions.execute.m$b.a(Unknown Source:242)
at a.a.e.e.c.a.b(Unknown Source:10)
at a.a.g.a(Unknown Source:14)
at a.a.g.a(Unknown Source:5)
... 7 more

19.26.14/E Action WiFi Tether failed.
19.26.14/E result: stop task (error)
19.26.14/E Error: 1
19.26.14/MacroEdit action finished exeID 1 action no 0 code 113 status: Err next 0
Deleted User 1286

Post by Deleted User 1286 »

Also, I'm running Android Oreo on a LG G6 phone.
scottpcs
Posts: 70
Joined: Tue Aug 21, 2018 6:19 pm

Post by scottpcs »

I'm not sure what to suggest other than test that WiFi tethering works normally before you try using it in Tasker (I assume you've done this already.)

If WiFi tethering works under normal circumstances and it's just Tasker that's throwing a wobbler, I'd suggest e-mailing the developer with your report above. I've e-mailed him several times over various issues and feature requests and always found that he responds very promptly with suggestions and solutions.

The developer's name is João Dias and you can e-mail him at support@joaoapps.com - incidentally, he's also the developer responsible for all the 'autoapps' plug-ins for Tasker so he's a one-stop solution for any problems.

Hope this helps!
XC40 FE D4 AWD Auto - Crystal White ¦ Charcoal ¦ 20" AND Headlight Washers! ¦ Polestar
Jibers
Posts: 18
Joined: Fri Mar 02, 2018 12:06 pm

Post by Jibers »

When you have a sim installed in the car, do you need to also connect your phone to its Wi-fi to get internet connection to your phone. Even when connected via CarPlay or can you still use your phones own data for internet?
1 Year In :D - FE AWD D4 bright silver, 20”, Lava, Apple Car Play. Loving it!
scottpcs
Posts: 70
Joined: Tue Aug 21, 2018 6:19 pm

Post by scottpcs »

Jibers wrote: Sat Sep 15, 2018 8:03 am When you have a sim installed in the car, do you need to also connect your phone to its Wi-fi to get internet connection to your phone. Even when connected via CarPlay or can you still use your phones own data for internet?
I can't see any reason why you wouldn't be able to continue using your phone's own data connection for internet, even if the car has its own SIM card. The car can be set to use EITHER its own SIM card or the phone via bluetooth or WiFi tethering.

The phone would only use the car's SIM card for internet if it was connected to the car's WiFi hotspot which of course you'd have to set up manually anyway. What you can't do is use the car's WiFi for both tethering to a phone AND act as a hotspot, it's one or the other.

I can't answer what would happen when using CarPlay / Android Auto as I don't have a SIM card in my car (no point as I have unlimited data on my phone :D ) but I do remember reading in the manual that WiFi tethering (from phone to car) cannot be used with CarPlay, although it can with Android Auto as that's how I use mine.
XC40 FE D4 AWD Auto - Crystal White ¦ Charcoal ¦ 20" AND Headlight Washers! ¦ Polestar
Post Reply