jeffmcfadden / CarDash

OBD2 iOS Communications and Car Dashboard App
MIT License
57 stars 28 forks source link

"Can not connect to the host!" #1

Open NGLocanovic opened 8 years ago

NGLocanovic commented 8 years ago

Hello, first of all thank you for sharing your Code! I'm trying to connect to my OBDII-Adapter, but the App just says "Starting" and after a few time the Console says "Can not connect to the host!". IP-Address and Port should be identical to your Adapter. Is yours still working?

My Adapter: http://www.amazon.de/gp/product/B00DE8AAX2?psc=1&redirect=true&ref_=oh_aui_detailpage_o03_s00

Full Console-Log: 2016-01-07 11:36:17.703 CarDash[4251:4604560] -[FAOBD2Communicator startStreaming] 2016-01-07 11:36:19.708 CarDash[4251:4604560] -[FAOBD2Communicator sendInitialATCommands1] 2016-01-07 11:37:33.741 CarDash[4251:4604560] <0x15d47840 FAOBD2Communicator.m:(227)> Can not connect to the host! 2016-01-07 11:37:33.742 CarDash[4251:4604560] <0x15d47840 FAOBD2Communicator.m:(227)> Can not connect to the host! 2016-01-07 11:37:33.742 CarDash[4251:4604560] -[FAOBD2Communicator sendInitialATCommands2] 2016-01-07 11:37:33.743 CarDash[4251:4604560] -[FAOBD2Communicator streamPIDs] 2016-01-07 11:37:33.844 CarDash[4251:4604560] <0x15d47840 FAOBD2Communicator.m:(162)> askForPIDs 10

jeffmcfadden commented 8 years ago

Hm. Double check that you’re connected to the device via WiFi (My laptop was always jumping off even when I wanted it to stay connected, for example).

Also, you might need to be testing via device to get this to work rather than the simulator.

If you still have no luck I’d try just connecting to port 35000 via telnet to see if it will connect at all.

— Jeff

On Jan 7, 2016, at 3:43 AM, NGLocanovic notifications@github.com wrote:

Hello, first of all thank you for sharing your Code! I'm trying to connect to my OBDII-Adapter, but the App just says "Starting" and after a few time the Console says "Can not connect to the host!" IP-Address and Port should be identical to your Adapter Is yours still working?

My Adapter: http://wwwamazonde/gp/product/B00DE8AAX2?psc=1&redirect=true&ref_=oh_aui_detailpage_o03_s00

Full Console-Log: 2016-01-07 11:36:17703 CarDash[4251:4604560] -[FAOBD2Communicator startStreaming] 2016-01-07 11:36:19708 CarDash[4251:4604560] -[FAOBD2Communicator sendInitialATCommands1] 2016-01-07 11:37:33741 CarDash[4251:4604560] <0x15d47840 FAOBD2Communicatorm:(227)> Can not connect to the host! 2016-01-07 11:37:33742 CarDash[4251:4604560] <0x15d47840 FAOBD2Communicatorm:(227)> Can not connect to the host! 2016-01-07 11:37:33742 CarDash[4251:4604560] -[FAOBD2Communicator sendInitialATCommands2] 2016-01-07 11:37:33743 CarDash[4251:4604560] -[FAOBD2Communicator streamPIDs] 2016-01-07 11:37:33844 CarDash[4251:4604560] <0x15d47840 FAOBD2Communicatorm:(162)> askForPIDs 10

— Reply to this email directly or view it on GitHub https://github.com/jeffmcfadden/CarDash/issues/1.

NGLocanovic commented 8 years ago

Thanks for your quick reply!

I managed to connect to the Car. It also communicates with it:

"2016-01-08 17:42:51.052 CarDash[2997:39164] -[FAOBD2Communicator sendInitialATCommands2] 2016-01-08 17:42:51.081 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(202)> NSStreamEventHasBytesAvailable 2016-01-08 17:42:51.082 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(216)> server said: ATZ 2016-01-08 17:42:51.941 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(202)> NSStreamEventHasBytesAvailable 2016-01-08 17:42:51.941 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(216)> server said: ELM327 v1.5"

But it cannot get any data from the Pids:

2016-01-08 17:42:54.353 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(175)> askForPIDs 0D 2016-01-08 17:42:54.498 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(202)> NSStreamEventHasBytesAvailable 2016-01-08 17:42:54.498 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(216)> server said: 0D1 NO DATA

This is with all Pids. Do you know how I can fix this? My Pids that I can use with my car are shown in the screenshots attached

screen shot 2016-01-08 at 17 35 52

jeffmcfadden commented 8 years ago

You might try just using telnet to see if you can send the AT commands successfully and see what format the data is coming back in. Perhaps it’s close-but-not-quite exactly what CarDash is expecting?

— Jeff

On Jan 8, 2016, at 9:59 AM, NGLocanovic notifications@github.com wrote:

Thanks for your quick reply!

I managed to connect to the Car. It also communicates with it:

"2016-01-08 17:42:51.052 CarDash[2997:39164] -[FAOBD2Communicator sendInitialATCommands2] 2016-01-08 17:42:51.081 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(202)> NSStreamEventHasBytesAvailable 2016-01-08 17:42:51.082 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(216)> server said: ATZ 2016-01-08 17:42:51.941 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(202)> NSStreamEventHasBytesAvailable 2016-01-08 17:42:51.941 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(216)> server said: ELM327 v1.5"

But it cannot get any data from the Pids:

2016-01-08 17:42:54.353 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(175)> askForPIDs 0D 2016-01-08 17:42:54.498 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(202)> NSStreamEventHasBytesAvailable 2016-01-08 17:42:54.498 CarDash[2997:39164] <0x7fad40e2a370 FAOBD2Communicator.m:(216)> server said: 0D1 NO DATA

This is with all Pids. Do you know how I can fix this? My Pids that I can use with my car are shown in the screenshots attached

https://cloud.githubusercontent.com/assets/8858043/12203732/ca6d6684-b630-11e5-9a95-2d931a509f27.png — Reply to this email directly or view it on GitHub https://github.com/jeffmcfadden/CarDash/issues/1#issuecomment-170055256.