[Ovmsdev] DIAG port to bluetooth

Mark Webb-Johnson mark at webb-johnson.net
Fri Jun 28 12:51:04 HKT 2013


Giannis,

There is some information in github vehicle/CarModule. But, not for Twizy. Michael looks after that, and he is on this mailing list, so perhaps he can help if he knows any definitive list.

The other place to look is in the code. The Twizy module is vehicle_twizy.c in vehicle/OVMS.X.

Regards, Mark.

On 26 Jun, 2013, at 4:58 PM, Giannis Bakas wrote:

> Thank you Mike, 
> 
> you helped me a lot. I don't know how involved you are in the whole
> project but do you know if there exists an excel file with the IDs and formulas to calculate the
> values come from the CAN bus of the vehicles supported by the OVMS?
> 
> Best regards,
> Giannis
> 
> 
> On 23/6/2013 15:58, Mark Webb-Johnson wrote:
>> Giannis,
>> 
>> Quite frankly, today a simple bluetooth ELM237 might be easiest. The ELM chipset has a MA command that can just monitor and output can bus messages.
>> 
>> To use an OVMS module, it is tricky. You would have to modify the board to cut the power to the modem and rearrange the tx and rx lines on the modem.
>> 
>> The DIAG mode is fine, but not really intended for what you want. The timing to get into it is tricky, and once there you have to take care to fight the modem and its responses.
>> 
>> I have exactly the same problem as you - I want to use my Parrot Asteroid as a display for my OVMS to allow access to all sorts of real-time status from the car. To achieve that, though, I'm having to work on getting bluetooth directly supported by OVMS and/or a simple USB CAN bus board (my preference is the USB solution). That means it is longer-term - not something we can do today but probably within the next few months.
>> 
>> Regards, Mark
>> 
>> On 21 Jun, 2013, at 5:27 PM, Giannis Bakas <giannis.bakas at iccs.gr> wrote:
>> 
>>> Mark,
>>> 
>>> I read in the OVMS_Development.pdf (git hub) this:
>>> 
>>> So you've got about 20 seconds after powering the module / reset to send the
>>> magic word. You may send the word as often as you want, the module will
>>> normally respond to it after the first modem init (i.e. after "Call Ready" / "GPS
>>> Ready"). If it does not, reboot.
>>> 
>>> Once you're in DIAG mode, enter:
>>> • "HELP" to list available commands (also lists SMS and MSG commands)
>>> • "DIAG" to see a short status overview
>>> • "S command" to execute an SMS command
>>> • "M command" to execute a MSG command
>>> 
>>> In DIAG mode, all SMS and MSG outputs are sent to the DIAG port instead of the
>>> GPRS network. MSG output will not be encrypted.
>>> 
>>> and I thought that it was possible. I don't want the modem but I am not a specialist
>>> in electronics and embeded systems. My first thought was to use an ELM237 to get
>>> data from OBDII but I can not find the PIDs of Twizy and I thought of using this interface
>>> like I would with ELM. Just send a command via bluetooth and get back a response.
>>> 
>>> Regards, Giannis
>>> 
>>> PS: Thanks again for the support!
>>> 
>>> On 21/6/2013 07:55, Mark Webb-Johnson wrote:
>>>> Giannis,
>>>> 
>>>> As the DIAG port is just a tap (not a separate port), I don't think you will have much success just spoofing commands into it.
>>>> 
>>>> Do you need the modem? If not, you can wire up instead of the modem and adjust firmware as necessary.
>>>> 
>>>> Regard, Mark.
>>>> 
>>>> On 20 Jun, 2013, at 9:42 PM, Giannis Bakas wrote:
>>>> 
>>>>> Thank you Mark for your quick reply,
>>>>> 
>>>>> I have made a connection (SPP) with a bluetooth connected to my PC from parrot and seems 
>>>>> to work fine.
>>>>> 
>>>>> My question was if DIAG port would work with a bluetooth serial adapter. And working on DIAG
>>>>> MODE I can send SMS or MSG commands to get data like SOC, speed, gps position.
>>>>> 
>>>>> Cheers Giannis
>>>>> 
>>>>> On 20/6/2013 11:56, Mark Webb-Johnson wrote:
>>>>>> Giannis,
>>>>>> 
>>>>>> You are having the same problem as me - we both have Parrots in our cars :-)
>>>>>> 
>>>>>> Work I have done on this so far:
>>>>>> 
>>>>>> I investigated USB serial adaptors to the Parrot. The FTDI driver is in the Parrot Android, but there are some problems with loading it (you can hack it from the adb shell, or from an App with root access). Parrot themselves say it is not yet supported, but planned for future.
>>>>>> 
>>>>>> I investigated bluetooth. Prior to the latest firmware it didn't work at all. With the latest 2.1.1 firmware I have had more success. I managed to get bluetooth to my Pebble smartwatch working (which means I can control Parrot volume from my wrist), but so far I haven't managed to get bluetooth SPP working. It should work, so maybe just me,
>>>>>> 
>>>>>> From the OVMS hardware point of view, things are not so easy. The PIC18F is very limited and it is hard to get extra connections. It should be possible to disconnect the connection to the modem and instead go to a bluetooth module on that single ASYNC port (both 5v and 3.3v lines are available on the OVMS v2 board). I have heard, but not tried, that it might be possible to get a software async working on one of the free I/O pins - low baud rate with no flow control.
>>>>>> 
>>>>>> I am working on more sophisticated hardware with 6 ASYNC ports and 2 CAN buses! But, the bluetooth situation is a mess at the moment (Android supports bluetooth 2.2 but not BLE 4.0, and                                 iPhone supports BLE 4.0 but not bluetooth 2.2 - good grief).
>>>>>> 
>>>>>> If you don't need the modem, the easiest would be to try to cut the RX+TX lines from the PIC to the MODEM and use them for your bluetooth module. The comms is at 9600 baud.
>>>>>> 
>>>>>> Regards, Mark.
>>>>>> 
>>>>>> On 20 Jun, 2013, at 3:41 PM, Giannis Bakas wrote:
>>>>>> 
>>>>>>> Hi all,
>>>>>>> 
>>>>>>> is it possible to use a serial to bluetooth dongle on the DIAG port of the module
>>>>>>> to get data via bluetooth, requesting data with "MSG commands"? What I want
>>>>>>> to do is to use OVMS like a bridge between my car and my parrot device (Android device)
>>>>>>> in order to visualize the data I get to the screen. I want to avoid the SIM card and to get
>>>>>>> data from the server.
>>>>>>> 
>>>>>>> Best regards,
>>>>>>> Giannis
>>>>>>> 
>>>>>>> _______________________________________________
>>>>>>> OvmsDev mailing list
>>>>>>> OvmsDev at lists.teslaclub.hk
>>>>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> _______________________________________________
>>>>>> OvmsDev mailing list
>>>>>> OvmsDev at lists.teslaclub.hk
>>>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>>>>> 
>>>>> _______________________________________________
>>>>> OvmsDev mailing list
>>>>> OvmsDev at lists.teslaclub.hk
>>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>>>> 
>>>> 
>>>> 
>>>> _______________________________________________
>>>> OvmsDev mailing list
>>>> OvmsDev at lists.teslaclub.hk
>>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>>> 
>>> _______________________________________________
>>> OvmsDev mailing list
>>> OvmsDev at lists.teslaclub.hk
>>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
>> 
>> 
>> 
>> _______________________________________________
>> OvmsDev mailing list
>> OvmsDev at lists.teslaclub.hk
>> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev
> 
> _______________________________________________
> OvmsDev mailing list
> OvmsDev at lists.teslaclub.hk
> http://lists.teslaclub.hk/mailman/listinfo/ovmsdev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.teslaclub.hk/pipermail/ovmsdev/attachments/20130628/463058be/attachment.html>


More information about the OvmsDev mailing list