Additional Information

Site Information

 Loading... Please wait...

Blog

NMEA 2000 / SAE J1939 Data Scanner with BLE Interface for iOS Applications

Posted by Wilfried Voss on

CAN and SAE J1939 to Bluetooth Gateway

This post is a follow-up on NMEA 2000 Data Scanner with Bluetooth, BLE for Android, iOS, PC Applications. In this new post, I also include SAE J1939, since NMEA 2000 is based on J1939. 

Also, in this particular case, instead of the NMEA2000-compatible 5-pin M12 connector, I used a DSUB9 as it applies to the CAN Bus and SAE J1939. Nevertheless, the functionality is the same between the J1939 and N2K version.

JCOM.CAN.BT

In the above-mentioned post, I described the Bluetooth connection between the Copperhill JCOM gateway and a Windows PC. However, BLE is a requirement for communication with Apple's iOS. The testing environment is, of course, different, i.e., we are using an iMac, and an iPhone in combination with the BT Terminal app.

Software

We are using an ASCII protocol to transmit the CAN data frames. The module receives the CAN Bus data frames and processes it to provide readable information such as:

  • Data Page
  • PGN
  • Priority
  • Destination Address
  • Source Address
  • DLC (Data Length Code)
  • Data
  • Checksum

Under Bluetooth, all of the above listed data fits into one ASCII String. BLE, however, supports only 20 bytes per wireless data frame. Thus, we are using 2 BLE message frames:

Data Frame 1: Total Length = 13 bytes

Byte   Length Description

0      1      Data Page (DP) = 0/1

1…4    4      PGN

5      1      Priority

6…7    2      Destination Address (DA)

8…9    2      Source Address (SA)

10     1      DLC = Data Length Code

11…12  2      Checksum

Data Frame 2: Total Length = 18 bytes

Byte   Length Description

0…15   16     0…8 data bytes; unused data = 0x00

16…17  2      Checksum

Proof of Concept

I used our  JCOM1939Monitor software in combination with our SAE J1939 Simulator Board to set up three sample PGNs for transmission between the JCOM gateway and an iMac:

On the iMac, I use the BT Terminal app:

I connect to the JCOM-BLE-1001 device:

I click on the "Write" arrow to see the data received. In the JCOM1939Monitor software, I first initiate an address claim (first message as shown below, PGN 0xEE00, source address = 0x80), then I transmit three different PGNs (0xFF00, 0xFF08, 0xFF0D):

Status and Availability

Officially, both modules, NMEA 2000 and SAE J1939, are still under development, and we target a release in October 2022. We consider the software development as finished regarding the mere data scanning capabilities, but we are considering, among others, the implementation of PGN filters to reduce the wireless data traffic.

Please feel free to contact us in case you need further information. We are also available to develop customized hardware and software to meet your requirements.


Getting Started with Bluetooth Low Energy: Tools and Techniques for Low-Power NetworkingGetting Started with Bluetooth Low Energy: Tools and Techniques for Low-Power Networking

With Bluetooth Low Energy (BLE), smart devices are about to become even smarter. This useful guide shows how this impressive wireless technology helps developers create mobile applications that share data with external hardware and how hardware engineers can obtain easy and reliable access to mobile operating systems.

This book renders a reliable, high-level overview of how devices use BLE to communicate with each other. You learn about valuable low-cost tools for developing and testing BLE-enabled mobile apps and embedded firmware and get examples using various development platforms, including iOS and Android for app developers and embedded platforms for product designers and hardware engineers.

  • Understand how data is organized and transferred by BLE devices
  • Explore BLE’s concepts, key limitations, and network topology
  • Dig into the protocol stack to grasp how and why BLE operates
  • Learn how BLE devices discover each other and establish secure connections
  • Set up the tools and infrastructure for BLE application development
  • Get examples for connecting BLE to iPhones, iPads, Android devices, and sensors
  • Develop code for a simple device that transmits heart rate data to a mobile device

More Information...