Capstone Implementation Weekly Reflection - RichardSwierk/Champlain-Capstone GitHub Wiki

Week of 2/1/2021

  • Began to write program to pull data from the PCV (Power Commander V)
  • Found that the PCV is seen as a HID device
  • Found that in order for the PCV to start sending data it first needs to receive an alive command
  • The project that I found that someone else did to pull data from a PCV no longer works
  • The code for the PCV android app has to many dependencies, so I am trying to make my own code
  • Issue that I can not really continuously test my code. I have to try an write all of the code without testing it
  • Usually when I code I would write a piece of the code test it to make sure it work then wire the next and test it, but with this project my motorcycle is about a 5 minute walk away from me so I can not do that
  • Spent about 3 hours trying to get the project I found that interfaces with the PCV to work and it needed dependencies that no longer existed
  • Spent about 2.5 hours on coding and trying to find ways to send command to the PCV, still have not found a good way to send command to the PCV

Week of 2/8/2021

  • Started to try and find the commands, in the android app code, that are sent to the PCV to get information from it 2 hours
  • Wrote more code for the program to pull data from the PCV 1.5 hours
  • An issue was trying to find the information that I wanted in the code of the android app
  • Trying to find programs on linux that I can use to send commands to the PCV

Week of 2/15/2021

  • Wrote code to get data from the PCV - 7 hours
  • Found a python package that can be used to send packet to HID device
  • Started to look at java code made by someone else to pull data from the PCV
  • Started to write code to create packet to send to PCV based off other code I found
  • Will need at least another week to be able to finish code

Week of 2/22/2021

  • Decided to write the code in java
  • Started to write the coed using the code from the android app and from another project I found
  • Ran into some issues with the java code I was referencing being outdated and had to find newer ways
  • Spent a total of 5 hours on the code this week, will hopefully finish it by next week

Week of 3/1/2021

  • Very close to finishing the code
  • Code works for sending the packet
  • Code works for creating the packet to receive valves from the PCV (rpm, throttle position, gear, etc)
  • Code for creating the packet is in java and uses code from https://github.com/pisarenko-net/pcv-streamer
  • Tried to edit the code from https://github.com/pisarenko-net/pcv-streamer to work but I can not get usb4java to work
  • Code to send command to the PCV is written in python with the hid module
  • Wrote a C program that will send a constant stream of random 64 byte packets and put it on a teensy lc arduino board
  • Teensy lc arduino plugged into raspberry pi, so that I cant a continual stream of 64 byte packets for testing so that I do not have to do all testing with the bike (Teensy LC arduino is seen as a HID device)
  • I still need to finish the code for receiving packets from the PCV
  • Code for creating packet and sending the packet put together in one program
  • Need to code in multi threading, so that I can send the packet and at the same time receive packets
  • Then need to write a program to parse the packets received for the ID that is in the send packet to make sure that the PCV is responding with the packets I want
  • Then to write code to parse packets received for rpm, throttle position, gear, speed, etc
  • Spent 7 hours in total on the code

Week of 03/7/2021

  • Spent 20+ hours on writing the code
  • Tested the code and it did not work
  • Trying to find ways to fix the code and then will test again and hopefully it works this time

Week of 03/15/2021

  • Total hours worked this week 8
  • Tested C and C+ packages for interfacing with HID devices and none of the ones I found worked
  • Looked at raw dumps from the PCV to try to figure out if there is something that I was missing
  • Edited my python code to send a packet then check the next 5 packets received from the PCV for a response packet
  • Before code was just sending the same packet to the PCV and now it sends a new one every time

Week of 3/22/2021

  • Total hours worked 5
  • looked at raw data dumps form the PCV and found that the PCV will send data with the bike off
  • Installed a on/off switch for the raspberry pi on the motorcycle
  • Wired the switch into motorcycle wiring harness

Week of 3/28/2021

  • Tested my program out on the PCV and did not get any packets back from the PCV
  • Figure out that my PCV was not working and would not even connect to the software made for it
  • Started to write a simulated PCV in C that will be uploaded to a teensy arduino

Week of 4/5/2021

  • All of my time has been going into coding the simulated PCV
  • Found out that I will not be able to get the packet ID that is sent, so I will have to send back a specific ID if the packet is received

Week of 4/12/2021

  • Looked into other modules for Arduino and HID packets, but could not find any that still worked
  • Decided to use the module I am already using, but will just send a specific ID back instead of the same ID
  • Worked more on the simulation code
  • Will have simulation code done next week and the main code should also be done

Week of 4/19/2021

  • Finished all code for the project
  • Added new code to log only response packets
  • Finished C code for the simulator
  • I could not get the exact packet ID that was sent in the C code, so I had to make it send a specific packet for the main code to look for
  • Could not get a random hex value to work by generating a random number then converting it to hex and then converting it to little endian, so I had to type out all 255 1 byte hex values into a list and get a random position in the list