F30POST
F30POST
2012-2015 BMW 3-Series and 4-Series Forum
BMW Garage BMW Meets Register Today's Posts
BMW 3-Series and 4-Series Forum (F30 / F32) | F30POST > Technical Forums > N20, N26, B46, B48 Turbo Engine / Drivetrain / Exhaust Modifications > Bootmod3 Wifi Agent DIY Alternate Method
proTUNING Freaks
Post Reply
 
Thread Tools Search this Thread
      11-13-2019, 04:26 PM   #45
GreenF30N26
Lieutenant
GreenF30N26's Avatar
153
Rep
414
Posts

Drives: F30 328ix N26
Join Date: Mar 2019
Location: canada

iTrader: (0)

Quote:
Originally Posted by UnknownBeing View Post
Yes I followed this thread to the T.
It works using USB tethering, but it won't connect to my hotspot.
iPhone or android?
Appreciate 0
      11-14-2019, 11:13 AM   #46
UnknownBeing
Second Lieutenant
UnknownBeing's Avatar
United_States
132
Rep
248
Posts

Drives: 16 340i (22 M340i in-transit)
Join Date: Aug 2016
Location: New England

iTrader: (1)

Quote:
Originally Posted by Green33 View Post
iPhone or android?
Using Android, I can try it on an iPhone as well to see if it makes a difference.
Appreciate 0
      11-22-2019, 12:01 PM   #47
auie
New Member
0
Rep
5
Posts

Drives: F30 328i
Join Date: Nov 2019
Location: Basque Country

iTrader: (0)

Quote:
Originally Posted by UnknownBeing View Post
Yes I followed this thread to the T.
It works using USB tethering, but it won't connect to my hotspot.

Hello. I have the same issue. Did you solve it?
Appreciate 0
      11-22-2019, 12:28 PM   #48
dieselg5
Private
67
Rep
68
Posts

Drives: 2015 328i xdrive
Join Date: Jul 2018
Location: USA

iTrader: (0)

Quote:
Originally Posted by auie View Post
Hello. I have the same issue. Did you solve it?
Hey, can you try this fix? I don't have a raspberry pi with me right now but it should work. If it does, I'll modify the original script.

Copy this line into the terminal without the quotes and press enter:
"wget -q -O - https://www.dropbox.com/s/1b9ngmbwnrc7f6g/wifi_repair.sh | bash"

Last edited by dieselg5; 11-22-2019 at 12:41 PM..
Appreciate 1
Joe2402925.00
      11-23-2019, 07:01 AM   #49
auie
New Member
0
Rep
5
Posts

Drives: F30 328i
Join Date: Nov 2019
Location: Basque Country

iTrader: (0)

Quote:
Originally Posted by skoold2003 View Post
What version pi do you have?
B+
Appreciate 0
      11-23-2019, 07:02 AM   #50
auie
New Member
0
Rep
5
Posts

Drives: F30 328i
Join Date: Nov 2019
Location: Basque Country

iTrader: (0)

Quote:
Originally Posted by dieselg5 View Post
Hey, can you try this fix? I don't have a raspberry pi with me right now but it should work. If it does, I'll modify the original script.

Copy this line into the terminal without the quotes and press enter:
"wget -q -O - https://www.dropbox.com/s/1b9ngmbwnr...wifi_repair.sh | bash"
I wil try and come back with feedback..thanks!!
Appreciate 0
      11-23-2019, 08:22 AM   #51
auie
New Member
0
Rep
5
Posts

Drives: F30 328i
Join Date: Nov 2019
Location: Basque Country

iTrader: (0)

I tried but is not working.

I think that the problem is that there is no wifi interface detected.

When I try to enter wifi configuration at raspi-config it says "No wireless interface found".

May be B+ is the problem...
Appreciate 0
      11-23-2019, 09:22 AM   #52
dieselg5
Private
67
Rep
68
Posts

Drives: 2015 328i xdrive
Join Date: Jul 2018
Location: USA

iTrader: (0)

Quote:
Originally Posted by auie View Post
I tried but is not working.

I think that the problem is that there is no wifi interface detected.

When I try to enter wifi configuration at raspi-config it says "No wireless interface found".

May be B+ is the problem...
Is it a raspberry pi 1 B+ or raspberry pi 3 B+?

The 1 doesn't have wifi.
Appreciate 2
      11-23-2019, 01:57 PM   #53
auie
New Member
0
Rep
5
Posts

Drives: F30 328i
Join Date: Nov 2019
Location: Basque Country

iTrader: (0)

Quote:
Originally Posted by dieselg5 View Post
Is it a raspberry pi 1 B+ or raspberry pi 3 B+?

The 1 doesn't have wifi.
Sorry, it is 3 B+
Appreciate 0
      12-01-2019, 10:20 PM   #54
Joe240
Major
Joe240's Avatar
United_States
2925
Rep
1,303
Posts

Drives: 2021 C8 Corvette 1LT
Join Date: Jul 2016
Location: Pensacola

iTrader: (0)

Garage List
Love the idea of this DIY on the 3b+ platform. Easier to find complete kits on the cheap for the obd agent.

I do have a question that hopefully you can answer, @dieselg5

There’s a Raspberry Pi PoE HAT for the 3b+ and 4 models. My goal is to use the power from the OBD itself to power the agent instead of running a usb cable through my center console (G29 has USB-A in the front change area, USB-C in the armrest). Does the ENET cable (typically) pass through the 12v pin-16 from the OBD port that you’re aware of?

If it doesn’t, I’m assuming with your method I could just use the 12v to 5v step down that PTF says works on their OBD agent build from this post: https://f80.bimmerpost.com/forums/sh....php?t=1662845
Appreciate 0
      12-02-2019, 06:38 AM   #55
dieselg5
Private
67
Rep
68
Posts

Drives: 2015 328i xdrive
Join Date: Jul 2018
Location: USA

iTrader: (0)

Quote:
Originally Posted by Joe240 View Post
Love the idea of this DIY on the 3b+ platform. Easier to find complete kits on the cheap for the obd agent.

I do have a question that hopefully you can answer, @dieselg5

There’s a Raspberry Pi PoE HAT for the 3b+ and 4 models. My goal is to use the power from the OBD itself to power the agent instead of running a usb cable through my center console (G29 has USB-A in the front change area, USB-C in the armrest). Does the ENET cable (typically) pass through the 12v pin-16 from the OBD port that you’re aware of?

If it doesn’t, I’m assuming with your method I could just use the 12v to 5v step down that PTF says works on their OBD agent build from this post: https://f80.bimmerpost.com/forums/sh....php?t=1662845
Hi Joe240,

I’m not familiar with the pin out of the ODB II connector or the ENET cable. I know the ODB II connector does provide some power to devices,
but like I said I’m not familiar with it. Sorry, I can’t offer any more help.
Appreciate 1
Joe2402925.00
      12-15-2019, 01:46 PM   #56
dieselg5
Private
67
Rep
68
Posts

Drives: 2015 328i xdrive
Join Date: Jul 2018
Location: USA

iTrader: (0)

Hi all, I fixed the wifi hotspot issues with the script. Please check OP for details.
Appreciate 0
      01-10-2020, 01:28 PM   #57
Unspec
Colonel
Unspec's Avatar
1306
Rep
2,591
Posts

Drives: 2015 BMW 535xi
Join Date: Apr 2019
Location: DMV

iTrader: (1)

Quote:
Originally Posted by dieselg5 View Post
Hi all, I fixed the wifi hotspot issues with the script. Please check OP for details.
Out of curiosity, what was the fix?

I noticed that the agent tends to just give up after a bit on looking for the wifi hotspot, so I made a simple script and used cron to reattempt wifi conection every minute. Works pretty well, I'll post info on it when I get a chance. I'm not 100% if it's just that I didn't wait long enough for it to retry or if it actually just doesn't retry at all, but this fixes it regardless

Additionally, Milan from PTF has confirmed that Firefox is not going to be supported. If you try and use Firefox Preview as your default browser, the app can't login. Pretty disappointing to those who are more privacy oriented.
Appreciate 0
      01-10-2020, 02:26 PM   #58
dieselg5
Private
67
Rep
68
Posts

Drives: 2015 328i xdrive
Join Date: Jul 2018
Location: USA

iTrader: (0)

Quote:
Originally Posted by Unspec View Post
Out of curiosity, what was the fix?

I noticed that the agent tends to just give up after a bit on looking for the wifi hotspot, so I made a simple script and used cron to reattempt wifi conection every minute. Works pretty well, I'll post info on it when I get a chance. I'm not 100% if it's just that I didn't wait long enough for it to retry or if it actually just doesn't retry at all, but this fixes it regardless

Additionally, Milan from PTF has confirmed that Firefox is not going to be supported. If you try and use Firefox Preview as your default browser, the app can't login. Pretty disappointing to those who are more privacy oriented.
The problem was that “bootmod3” wasn’t in quotes in /etc/wpa_supplicant/wpa_supplicant.conf for SSID and psk. It should look like this:

network={
ssid="bootmod3"
psk="bootmod3"
}
Appreciate 0
      01-18-2020, 10:43 PM   #59
Unspec
Colonel
Unspec's Avatar
1306
Rep
2,591
Posts

Drives: 2015 BMW 535xi
Join Date: Apr 2019
Location: DMV

iTrader: (1)

Here's the code for the reconnect script I wrote:

Code:
#!/bin/bash

if [ "$(iw dev wlan0 link)" = "Not connected." ]; then
        sleep 5s
        if [ "$(iw dev wlan0 link)" = "Not connected." ]; then
                sudo wpa_cli -i wlan0 reconfigure >&-
        fi
fi
The idea is that if ifconfig wlan0 contains the string "inet", it'll just print out whatever to console (you can just have it do absolutely nothing as well). wlan0 will always have "inet" if it's connected to any kind of network. If inet isn't found, meaning no WiFi is connected, it runs a command that forces wlan0 to reconfigure, making it attempt to connect to the network configured in wpa_supplicant.conf.

Run this with cron (google how to use it, pretty simple) every minute.

Has anyone noticed that the agent likes to drop the hotspot or crash altogether when on the data logging dashboard?

Edit: Fixed the reconnect script, was causing the issues with the agent dropping. The logic is more robust and reliable now. The script now waits 5 seconds to make sure that it wasn't a temporary disconnect/network stutter. Change the "sleep 5s" to "sleep [whatevernumberyouwant]s" to customize. Don't make it wait more than how often the script is set to run via crontab.
__________________
2015 BMW 535xi
Bootmod3 Stage 2 | ER charge pipe | ER Catted DP | Remus Exhaust | Gplus FMIC | KW V3 | Turner Monoball thrust arm bushings | Wallet regrets
ISTA VM Setup/Tutorial

Last edited by Unspec; 01-27-2020 at 01:42 PM..
Appreciate 0
      01-23-2020, 07:55 AM   #60
dieselg5
Private
67
Rep
68
Posts

Drives: 2015 328i xdrive
Join Date: Jul 2018
Location: USA

iTrader: (0)

Quote:
Originally Posted by Unspec View Post
Here's the code for the reconnect script I wrote:

Code:
#!/bin/bash

if ifconfig wlan0 | grep -q "inet" ; then
        echo "Agent connected to hotspot"
else
        echo "Agent disconnected, reconnecting to hotpost"
        sudo wpa_cli -i wlan0 reconfigure > /dev/null
fi
The idea is that if ifconfig wlan0 contains the string "inet", it'll just print out whatever to console (you can just have it do absolutely nothing as well). wlan0 will always have "inet" if it's connected to any kind of network. If inet isn't found, meaning no WiFi is connected, it runs a command that forces wlan0 to reconfigure, making it attempt to connect to the network configured in wpa_supplicant.conf.

Run this with cron (google how to use it, pretty simple) every minute.

Has anyone noticed that the agent likes to drop the hotspot or crash altogether when on the data logging dashboard?
My agent connects automatically when I turn my hotspot on, even if I've been driving for a while so I assume it's constantly looking for a network like any other device would.
Appreciate 0
      01-27-2020, 01:39 PM   #61
Unspec
Colonel
Unspec's Avatar
1306
Rep
2,591
Posts

Drives: 2015 BMW 535xi
Join Date: Apr 2019
Location: DMV

iTrader: (1)

Quote:
Originally Posted by skoold2003 View Post
This sounds like the issues I had when using the model 1 PI. I haven't seen this issue on my model 2 or Zero.
Turns out to have been faulty logic in my if statement. It tried to reconnect to the hotspot even when it was connected, causing the agent to lose connection for a split second. I've updated the script/post and the issue's gone away.
__________________
2015 BMW 535xi
Bootmod3 Stage 2 | ER charge pipe | ER Catted DP | Remus Exhaust | Gplus FMIC | KW V3 | Turner Monoball thrust arm bushings | Wallet regrets
ISTA VM Setup/Tutorial
Appreciate 0
      01-27-2020, 05:51 PM   #62
DadzBmer_N2o
First Lieutenant
DadzBmer_N2o's Avatar
United_States
93
Rep
338
Posts

Drives: F30 320ix
Join Date: Jan 2020
Location: Frederick, MD

iTrader: (0)

Hi Ya'll,

New mbr here, first post. I just ordered this Pi3 model B, i was told that this is the preferred one for the OBD agent to work with BM3. I will try to update once i get my parts in from Pishop.us, if this thing works; wow what a hack way to save a crap load of money from the official wifi agent that PTF sells. Overall my total out the door costs were less than $80 (Pi3, Micro USB-6ft, and Samsung Evo SDHC 32gb card)..Update on 02/01/20: everything worked woth this Pi3-B, a great hack to save on the $300 for the OBD Agent..🤤
__________________
2013 320ix N20 8AT|BM3 stg1|Muff Res Delete|HPB-LED-Amber-DRL's
IG: DadzBmer_N2o
Appreciate 0
      02-05-2020, 10:23 AM   #63
DadzBmer_N2o
First Lieutenant
DadzBmer_N2o's Avatar
United_States
93
Rep
338
Posts

Drives: F30 320ix
Join Date: Jan 2020
Location: Frederick, MD

iTrader: (0)

Quote:
Originally Posted by DadzBmer_N2o View Post
Hi Ya'll,

New mbr here, first post. I just ordered this Pi3 model B, i was told that this is the preferred one for the OBD agent to work with BM3. I will try to update once i get my parts in from Pishop.us, if this thing works; wow what a hack way to save a crap load of money from the official wifi agent that PTF sells. Overall my total out the door costs were less than $80 (Pi3, Micro USB-6ft, and Samsung Evo SDHC 32gb card)..Update on 02/01/20: everything worked woth this Pi3-B, a great hack to save on the $300 for the OBD Agent..🤤
Well here is an update in case, anybody else have that wifi issue on these Pi's:

I ended up just reflashing my SD card with BM3's firmware and tried it out again this time w/o having to tether to my iphone from the Pi. And long and behold it finally worked wirelessly, woo hoo

These Pi's on the iphone are really picky and make sure you disable the Wi-Fi Networking button under >System Services, here is the path FYI:

>Settings >Privacy >Location Services >System Services >Wi-Fi Networking
__________________
2013 320ix N20 8AT|BM3 stg1|Muff Res Delete|HPB-LED-Amber-DRL's
IG: DadzBmer_N2o
Appreciate 0
      02-12-2020, 08:47 PM   #64
MTWO
Captain
473
Rep
932
Posts

Drives: M2
Join Date: Dec 2016
Location: Innisfil

iTrader: (0)

Quote:
Originally Posted by DadzBmer_N2o View Post
Hi Ya'll,

New mbr here, first post. I just ordered this Pi3 model B, i was told that this is the preferred one for the OBD agent to work with BM3. I will try to update once i get my parts in from Pishop.us, if this thing works; wow what a hack way to save a crap load of money from the official wifi agent that PTF sells. Overall my total out the door costs were less than $80 (Pi3, Micro USB-6ft, and Samsung Evo SDHC 32gb card)..Update on 02/01/20: everything worked woth this Pi3-B, a great hack to save on the $300 for the OBD Agent..🤤
Agent is 149 not 300. They changed the price a long while back. I am just happy they let people build these themselves and platform is so open. They could lock all this shit up if they wanted so kudos to them for making this an option for those willing to tinker
Appreciate 0
      02-12-2020, 09:55 PM   #65
DadzBmer_N2o
First Lieutenant
DadzBmer_N2o's Avatar
United_States
93
Rep
338
Posts

Drives: F30 320ix
Join Date: Jan 2020
Location: Frederick, MD

iTrader: (0)

Quote:
Originally Posted by MTWO View Post
Quote:
Originally Posted by DadzBmer_N2o View Post
Hi Ya'll,

New mbr here, first post. I just ordered this Pi3 model B, i was told that this is the preferred one for the OBD agent to work with BM3. I will try to update once i get my parts in from Pishop.us, if this thing works; wow what a hack way to save a crap load of money from the official wifi agent that PTF sells. Overall my total out the door costs were less than $80 (Pi3, Micro USB-6ft, and Samsung Evo SDHC 32gb card)..Update on 02/01/20: everything worked woth this Pi3-B, a great hack to save on the $300 for the OBD Agent..🤤
Agent is 149 not 300. They changed the price a long while back. I am just happy they let people build these themselves and platform is so open. They could lock all this shit up if they wanted so kudos to them for making this an option for those willing to tinker
Oh wow didn't know that, my guess they dropped it due to the comps with the Pi3 like mine, got that alone with a nice case for under $50, and finally got it to work with Wifi
__________________
2013 320ix N20 8AT|BM3 stg1|Muff Res Delete|HPB-LED-Amber-DRL's
IG: DadzBmer_N2o
Appreciate 0
      02-18-2020, 10:56 AM   #66
yebokmj
New Member
United_States
3
Rep
16
Posts

Drives: BMW 335i, Porsche Cayman
Join Date: Jan 2020
Location: Salem, NH

iTrader: (0)

RPi 4

Has anyone tried this with RPi 4? According to OP it should work with any. I'd like to go with the 4 in case I want to use it for something else down the road.
Appreciate 0
Post Reply

Bookmarks


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -5. The time now is 02:51 AM.




f30post
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
1Addicts.com, BIMMERPOST.com, E90Post.com, F30Post.com, M3Post.com, ZPost.com, 5Post.com, 6Post.com, 7Post.com, XBimmers.com logo and trademark are properties of BIMMERPOST