Wireless CAN Bus Logger - WiFi Web Server Interface
Need to collect your CAN bus data via WiFi?
The CANedge2 is a 2 x CAN/LIN data logger with WiFi. In this intro we focus on the CANedge2 'web server interface' WiFi mode, which lets you interface with the device SD in a wireless manner.
We cover connectivity modes, features and use case examples.
CANedge connectivity modes
The CANedge2/CANedge3 connect via WiFi/LTE connectivity, respectively. Below we describe the available connectivity modes:
S3 interface
Both devices support an 'S3 interface'. Here, the devices automatically upload log files from the SD card to your own S3 bucket (e.g. in AWS/GCP/Azure) - deleting files from the SD once successfully uploaded. This mode is ideal for use cases where you wish to collect all of your recorded data.
Web server interface
The CANedge2 also supports a 'web server interface'. Here, the device SD card can be accessed via a web browser or REST API from a PC on the same WiFi network. This mode is ideal when you need to collect data selectively. Optionally use your PC as WiFi AP to avoid the use of a separate WiFi router.
Below we briefly explain how to set up the web server interface. For detailed guidance see the CANedge2 Intro.
- Configure the CANedge2 with your WiFi name/password
- Configure the device to use web server interface mode
- Identify the IP of your device (e.g. via your router overview)
- Enter the IP in your browser (e.g. http://192.168.1.124)
You can now access the SD card via your browser (or REST API) to download/delete files and perform over-the-air updates.
The S3 interface enables the CANedge2/CANedge3 to connect to an S3 bucket and upload data with TLS enabled (i.e. via HTTPS). In contrast, the web server interface does not currently support TLS.
As a result, you should consider the use of the web server interface accordingly. If you are concerned about data communication being sniffed by third parties, one option is to configure the device to encrypt all CAN/LIN data logged by the device. Assuming you also encrypt all passwords, no sensitive information is being communicated via the web server interface. While not a replacement for TLS, it can serve as a practical safe guard of your data.
If you need to use the web server interface remotely via the internet, we generally recommend to do so through a VPN for the above reasons.
A common use case is to skip the need for a separate WiFi router by using e.g. your laptop as the WiFi access point. This works seamlessly when you have internet connectivity on the laptop - you simply enable the 'Mobile Hotspot' WiFi sharing with the SSID/password configured on the CANedge2.
However, if you do not have internet access, this option will by default be disabled. This can be a challenge if you are looking to use this to extract data in the field in areas with poor cellular coverage.
Differnet work-arounds exist. One option is to install the free software tool 'Hotspot Lite' from the Windows Microsoft Store. You can use this tool to create a hotspot while offline - effectively enabling you to manage the Mobile Hotspot settings as if you had an internet connection.
The transfer speed via the web server interface depends on various factors, but is normally 0.5-1.0 MB/s. This makes it suitable for downloading select log files (or e.g. scripted batches of log files) to a PC - but less ideal for e.g. pulling a full 8-32 GB SD card.
Simply configure your WiFi name/password - no server required
Browse/download files from the SD via WiFi - directly in your browser
Use Python scripts to e.g. extract all log files from a specific period
Optionally use your laptop as WiFi AP for direct access (no separate WiFi)
Use VPN to securely access your device remotely via the internet
Perform immediate over-the-air config/firmware updates in 3 clicks
Set up in 30 seconds - no server required
The CANedge2 can be configured to use the web server interface in seconds. Simply provide your WiFi name/password to get started - no server setup required.
Restrict web server access via encrypted password
You can optionally deploy the web server with a user/password to restrict access. The password can optionally be encrypted (similar to the WiFi router password).
Easily download specific log files via your browser
Access the device SD card via WiFi - incl. on local networks or via the internet (e.g. by VPN). Browse log files by recording date and easily download data of interest.
Update device config/firmware over-the-air
Upload a new configuration file or firmware image to immediately trigger an update (and power cycle) of the CANedge2 - avoiding the need for extracting the SD card.
Use REST API to interface with the SD card
Use Python to e.g. pull all log files from a specific time period or enable sophisticated use cases - incl. plug & play script examples.
In the following we outline example use cases for the CANedge2 web server interface.
Some use cases are tagged
with a Mode, which is referenced in the CANedge2 Intro deployment guide.
Pull data over local WiFi [Mode 1]
Need to easily extract selective data on an ad hoc basis?
If you use the CANedge2 in e.g. a test bench or lab setup, you may want to access data 'ad hoc' - while ideally leaving the device continuously installed (and logging data to the SD card). With the web server interface, you can configure the device to connect to your office WiFi network and thus enable access to the SD via standard web browsers from any PC on the network. The access can be restricted via use of an encrypted password. With this, your team can easily fetch the data they need, when they need it.
Pull data remotely via the internet [Mode 2]
Need to pull select files remotely via the internet from your CANedge2?
The CANedge2 may be deployed in an area with internet coverage - but where you do not want it to offload all of the data to a remote server. For example, it might be used as a blackbox in windmills for rare issue diagnostics. In such cases, offloading all of the data via 3G/4G can be expensive/superfluous. However, sending a technician to fetch the data physically is costly. If you instead deploy a standard 3G/4G WiFi router to provide a local WiFi network for the CANedge2, you can access the web server interface securely through the internet using a VPN. This lets you identify data of interest (based on the file timestamps) and download these for remote troubleshooting. See also our Ematec case study.
Pull data without a separate WiFi router [Mode 3, 4]
Need to collect data in the field without a separate WiFi router?
The CANedge is often used as a blackbox in vehicles/machines, e.g. mining trucks, generators and more. In such applications, the device is often installed in an electrical cabinet or other protected manner - making it difficult to access. However, you can extend the WiFi antenna outside of the box using a WiFi extension cable to enable connectivity, while still shielding the device. Further, you can setup your laptop to expose a WiFi access point recognized by the CANedge2. This way you can perform wireless data extraction in the field - without extracting the SD card. If a field technician is to pull a specific time period of data, a simple Python script can be used to automate this process. With this setup, you avoid the need for a separate WiFi router entirely. Sharing your laptop's WiFi can be done easily if the laptop has internet connectivity [Mode 3] - but you can also do it if your laptop is completely offline [Mode 4]
Create scripted data monitoring processes
Need to sample your data for specific observations in an automated way?
The web server REST API lets you create custom scripts in e.g. Python to interface with the SD card. The most common use case is to download all log files from a specific time period (e.g. the last 7 days) to your local disk. However, more sophisticated use cases can be implemented. For example, you could create a web based dashboard that would allow end users to visualize specific signals from specific devices and time periods - and then have the relevant data be pulled, DBC decoded and visualized on-the-fly in response to user interaction. You could also enable 'remote control' functionality by using the REST API to perform OTA config updates with different transmit lists.
Ready to collect your CAN data via WiFi?
Get your CANedge2 today!