Porting Leaf Spy to the iPhone

My Nissan Leaf Forum

Help Support My Nissan Leaf Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

QueenBee

Well-known member
Joined
Aug 8, 2010
Messages
1,565
Location
Portland
I concur that a new topic is in order :)

Turbo3 said:
QueenBee said:
Turbo3 said:
Any suggestions for a Windows PC based development system for iOS apps?
It'll probably be best to go through the pains of getting OSX to run in VMWare. Are you looking for any help in porting it to OSX?
Just started looking into this. I see there is software out there that lets you run the development on a Windows PC (Mobione) but don't know what if any restrictions it has on the apps I could develop. My app would need to handle the WiFi stream coming from a WiFi OBDII adapter.

One advantage of a WiFi OBDII adapter would be speed of transfer over the 9600 baud the Bluetooth adapter limits me to.

So at the moment I am looking for help in setting up the right environment to port Leaf Spy to iOS.

Perhaps I should start a separate thread for this topic.

I'm thinking it depends on if your goal is to develop one app that works on "all" platforms or if you want to develop the iPhone version using the native Apple tool, xCode.

In looking at Mobione I'm a bit concerned about how difficult it will be to interface with a network device/bluetooth. It seems like there are plugins for this but they aren't part of the core framework so their support might be iffy and the bluetooth one will need some work. For example: http://simonmacdonald.blogspot.nl/2013/03/phonegap-bluetooth-plugin-updated.html" onclick="window.open(this.href);return false;
https://github.com/purplecabbage/phonegap-plugins/tree/master/iPhone/GapSocket" onclick="window.open(this.href);return false;
 
I would love to see Leaf Spy running on iOS. It is a very cool app on the andorid. Thanks again Turbo3.
 
So in my readings it is possible to get SPP/serial over Bluetooth under three conditions. Jail break, Bluetooth device that has a MFi chip or using a Bluetooth 4.0 device. So this has me thinking about what the existing iPhone ODBII devices are doing. I see three alternatives that I think are better than wifi or jail breaking.

An existing ODBII reader that has a MFi chip and still uses SPP
An existing Bluetooth 4.0 device that exposes SPP
A physical serial ODBII reader that is either plugged into a serial->MFi or 4.0 Bluetooth adapter or lightning/30pin apple connectors.

I haven't researched what kind of products exist that work in one of the above manners but this new info has me excited about the possibilities. I'm also excited that this is even something Turbo3 is interested in!
 
Note that BT 4 is only compatible with the iPhone 4S or later, iPad 3rd gen or later, and the iPad Mini. Personally, for an Apple device, I think WiFi is a better way to go...

QueenBee said:
An existing Bluetooth 4.0 device that exposes SPP
 
TomT said:
Note that BT 4 is only compatible with the iPhone 4S or later, iPad 3rd gen or later, and the iPad Mini. Personally, for an Apple device, I think WiFi is a better way to go...

WIFI is the only way to go.

I'm using this ELM 327 WiFi ODB2 adapter with my iPhone.

So far, I'm only able log "standard" data from ICE vehicles - RPM, Speed, etc.... If I knew a bit more I'm sure I could pull all the same data that the Android LEAF Battery app pulls.

I'd be up to creating a github repo and uploading what I have already done for creating an app on iOS if anyone is interested.
 
ampitupco said:
TomT said:
Note that BT 4 is only compatible with the iPhone 4S or later, iPad 3rd gen or later, and the iPad Mini. Personally, for an Apple device, I think WiFi is a better way to go...

WIFI is the only way to go.

I'm using this ELM 327 WiFi ODB2 adapter with my iPhone.

So far, I'm only able log "standard" data from ICE vehicles - RPM, Speed, etc.... If I knew a bit more I'm sure I could pull all the same data that the Android LEAF Battery app pulls.

I'd be up to creating a github repo and uploading what I have already done for creating an app on iOS if anyone is interested.

For some reason I thought the WIFI ELM327s were much more expensive than that. I'm sure any of the devices out there that might work for non wifi on iOS are going to be significantly more than that.

My concern with using WIFI is if this app works on the iPhone then I would want to just use my primary phone. Although I have not used the WIFI ODB2 scanners so my assumptions might be off. I assume that it creates a WIFI network that you join. Then when you join this network you will not be able to access the internet as well.
 
QueenBee said:
My concern with using WIFI is if this app works on the iPhone then I would want to just use my primary phone. Although I have not used the WIFI OBD2 scanners so my assumptions might be off. I assume that it creates a WIFI network that you join. Then when you join this network you will not be able to access the internet as well.

You are right. You'd likely want to use an iPod Touch or iPad instead of your iPhone.
 
ampitupco said:
QueenBee said:
My concern with using WIFI is if this app works on the iPhone then I would want to just use my primary phone. Although I have not used the WIFI OBD2 scanners so my assumptions might be off. I assume that it creates a WIFI network that you join. Then when you join this network you will not be able to access the internet as well.

You are right. You'd likely want to use an iPod Touch or iPad instead of your iPhone.

But if that's the case the cracked screen Android device that I leave in the car will do :) Android devices are so cheap that I only see marginal value in porting the app to the iPhone just so old iDevices can be repurposed for this. The value for me is just having one less device and using my main iPhone.
 
QueenBee said:
ampitupco said:
TomT said:
Note that BT 4 is only compatible with the iPhone 4S or later, iPad 3rd gen or later, and the iPad Mini. Personally, for an Apple device, I think WiFi is a better way to go...

WIFI is the only way to go.

I'm using this ELM 327 WiFi ODB2 adapter with my iPhone.

So far, I'm only able log "standard" data from ICE vehicles - RPM, Speed, etc.... If I knew a bit more I'm sure I could pull all the same data that the Android LEAF Battery app pulls.

I'd be up to creating a github repo and uploading what I have already done for creating an app on iOS if anyone is interested.

For some reason I thought the WIFI ELM327s were much more expensive than that. I'm sure any of the devices out there that might work for non wifi on iOS are going to be significantly more than that.

My concern with using WIFI is if this app works on the iPhone then I would want to just use my primary phone. Although I have not used the WIFI ODB2 scanners so my assumptions might be off. I assume that it creates a WIFI network that you join. Then when you join this network you will not be able to access the internet as well.
I have one of these wifi elm devices in my car. I paid about $20 for it on ebay. It does create an adhoc network that you join. The iPhone is smart enough to know that it is not a path to the Internet, as long as you don't set it as a router/gateway. You still get your phones normal data connection, I do it all the time. You can even use the phone Bluetooth at the same time. You won't be able to join another wifi at the same time though.

I have been just taking data from the wifi by using a telnet app in raw mode. i then post process it to get battery and other data. I do have a developer's license but no time to work on an app right now.
 
adspguy said:
I have one of these wifi elm devices in my car. I paid about $20 for it on ebay. It does create an adhoc network that you join. The iPhone is smart enough to know that it is not a path to the Internet, as long as you don't set it as a router/gateway. You still get your phones normal data connection, I do it all the time. You can even use the phone Bluetooth at the same time. You won't be able to join another wifi at the same time though.

I have been just taking data from the wifi by using a telnet app in raw mode. i then post process it to get battery and other data. I do have a developer's license but no time to work on an app right now.

That's great! So does the iPhone automatically join the adhoc network over the wifi network at home?
 
ampitupco said:
TomT said:
Note that BT 4 is only compatible with the iPhone 4S or later, iPad 3rd gen or later, and the iPad Mini. Personally, for an Apple device, I think WiFi is a better way to go...

WIFI is the only way to go.

I'm using this ELM 327 WiFi ODB2 adapter with my iPhone.

So far, I'm only able log "standard" data from ICE vehicles - RPM, Speed, etc.... If I knew a bit more I'm sure I could pull all the same data that the Android LEAF Battery app pulls.

I'd be up to creating a github repo and uploading what I have already done for creating an app on iOS if anyone is interested.
That would be great. I'm interested.
I'm an iOS dev and have been planning to get a OBDII to Wifi adapter and see what I could extract.
 
Actually, here is what I started with:

OBD2Kit

I removed the code that connects to a remote server and logs data as you drive... although that may be useful in the future. I modified it to just display the RPM and Speed (which it already did, more or less).

If you can take this and figure out what to send to get battery temperature or whatever... then thats a start.
 
Any feedback on this one?

http://broadreachsoftware.com/products/leafStat/" onclick="window.open(this.href);return false;
 
3rdclass said:
Any feedback on this one?

http://broadreachsoftware.com/products/leafStat/" onclick="window.open(this.href);return false;

Working fine for me.

http://www.mynissanleaf.com/viewtopic.php?f=44&t=16670" onclick="window.open(this.href);return false;

http://www.mynissanleaf.com/viewtopic.php?f=44&t=15566" onclick="window.open(this.href);return false;
 
Back
Top