-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
218 changed files
with
133,701 additions
and
243,678 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,34 @@ | ||
# Land Rover Freelander 2 > 2012 - Infotainment System | ||
# flos | ||
|
||
## Work in progress | ||
A Electron-React App to one day replace the Infotainment Module of my Freelander 2! | ||
### Features | ||
- Decode IDs from the Medium Speed Can-Bus network | ||
- Work in progress | ||
- VIN Decoding | ||
- Parse the VIN and decode the age/make/model of the vehicle | ||
- The first time the app launches, this will take a moment to configure | ||
- Decode IDs from the "Entertainment Bus" | ||
- The special bus between the "Audio Head Unit" and the Headunit Display | ||
- Decipher Radio Source (FM/DAB/AM/Aux/BT/[CD Pending]) | ||
- Radio Station Name + Additional RDS Data | ||
- Volume Level (Pops up when using the cars original hardware rotary switch) | ||
- Bluetooth Media Song Title/Artist | ||
- Personalise the theme settings | ||
- Create a CanDump from the vehicles MS/HS CanBus (used for debugging and development) | ||
An Electron application with React | ||
|
||
### Upcoming Features | ||
- Apple CarPlay/Android Auto integration | ||
- Car Configuration File parsing | ||
- ~~The app will then only show options relevent to the current vehicle~~ TBC .. Is it needed? | ||
- Bluetooth connection | ||
- Notifications | ||
- Music | ||
## Recommended IDE Setup | ||
|
||
### Install | ||
1) Make sure RPi is running latest version | ||
2) Install NodeJs: This has only been tested on the latest 19.2.0 | ||
4) Install CanUtils: sudo apt-get -y install can-utils libsocketcan2 libsocketcan-dev | ||
5) Modify /boot/config.txt to include | ||
* CAN bus controllers | ||
``` | ||
dtparam=spi=on | ||
dtoverlay=mcp2515-can1,oscillator=16000000,interrupt=25 | ||
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=23 | ||
``` | ||
6) Modify /etc/rc.local to include the next lines **BEFORE** "exit 0" | ||
``` | ||
sudo /sbin/ip link set can1 up type can bitrate 500000 | ||
sudo /sbin/ip link set can0 up type can bitrate 125000 | ||
``` | ||
7) Reboot Pi | ||
8) Download FLos Repo | ||
9) run `npm i` | ||
10) Run `npm run` + either | ||
* pi64-build - For RPi 4 - 4GB+ (npm run pi64-build) | ||
* pi32-build - For Rpi 3 or Rpi 4 < 4GB (npm run pi32-build) | ||
* electron-build - For Ubuntu (Testing ONLY) (`npm run electron-build`) | ||
* This requires an additional step, see below | ||
11) Locate the `/dist` folder and run the .AppImage | ||
- [VSCode](https://code.visualstudio.com/) + [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) + [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) | ||
|
||
## Project Setup | ||
|
||
## Local Host vCAN for Testing | ||
### Install | ||
|
||
`sudo /sbin/ip link set can1 down` | ||
```bash | ||
$ npm install | ||
``` | ||
|
||
`sudo /sbin/ip link set can1 up type can bitrate 125000` | ||
### Development | ||
|
||
Can also be tested on Ubuntu by running the same commands above but this needs to be ran before loading AppImage: | ||
(Can be copied and pasted in one go) | ||
```bash | ||
$ npm run dev | ||
``` | ||
sudo modprobe vcan && sudo ip link add dev can0 type vcan && sudo ip link add dev can1 type vcan && sudo ip link set up can0 && sudo ip link set up can1 && sudo modprobe can-gw && sudo cangw -A -s can0 -d can1 -e && sudo cangw -A -s can1 -d can0 -e | ||
|
||
### Build | ||
|
||
```bash | ||
# For windows | ||
$ npm run build:win | ||
|
||
# For macOS | ||
$ npm run build:mac | ||
|
||
# For Linux | ||
$ npm run build:linux | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,13 @@ | ||
const fs = require("fs"); | ||
const files = fs | ||
.readdirSync("../Tools/temp") | ||
.filter((fn) => fn.includes(".exml-decrypted")); | ||
const xmlParser = require("xml2json"); | ||
const fs = require('fs') | ||
const files = fs.readdirSync('../Tools/temp').filter((fn) => fn.includes('.exml-decrypted')) | ||
const xmlParser = require('xml2json') | ||
|
||
for (const a in files) { | ||
console.log("Processing: " + files[a] + " | " + a + "/" + files.length); | ||
var data = fs.readFileSync("../Tools/temp/" + files[a]); | ||
console.log('Processing: ' + files[a] + ' | ' + a + '/' + files.length) | ||
var data = fs.readFileSync('../Tools/temp/' + files[a]) | ||
const xmlObj = xmlParser.toJson(data, { | ||
reversible: true, | ||
alternateTextNode: "text", | ||
}); | ||
fs.writeFileSync( | ||
"../Tools/CCF-XML/" + files[a].replace(".exml-decrypted", "") + ".json", | ||
xmlObj | ||
); | ||
alternateTextNode: 'text' | ||
}) | ||
fs.writeFileSync('../Tools/CCF-XML/' + files[a].replace('.exml-decrypted', '') + '.json', xmlObj) | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>com.apple.security.cs.allow-jit</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-unsigned-executable-memory</key> | ||
<true/> | ||
<key>com.apple.security.cs.allow-dyld-environment-variables</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.