How to configure a Reyax RYRR30D NFC reader


Richard Grundy

Updated December 31, 2024 03:04

Overview

This guide provides detailed instructions on setting up the Reyax RYRR30D USB-C NFC reader to interact with Apple and Google Wallet passes. The RYRR30D offers a versatile interface supporting both USB and UART connectivity, making it ideal for developers seeking to integrate NFC functionality into their systems. We'll cover the steps needed to connect the device, generate the required credentials, and configure it for successful operation.

More details about the product can be found on the Reyax RYRR30D product page.

[Placeholder for Reyax RYRR30D device image]

This tutorial assumes you've met the following pre-requisites:

  1. A Reyax RYRR30D reader.
  2. USB or UART cables compatible with the device (details provided below).
  3. Access to Apple Merchant IDs or Google Collector IDs from pass-issuing organizations (like PassNinja!)
  4. A computer running Windows with Docklight installed (Download Docklight).
  5. OpenSSL installed for generating cryptographic keys (Download OpenSSL).
  6. An NFC-enabled phone with Apple or Google passes installed.

Step 1: Setting up Connectivity

USB Connection

The RYRR30D supports USB connectivity through a USB-C OTG cable. This method is ideal for modern systems that prioritize USB over UART. Ensure the USB interface is enabled by sending the appropriate AT command. If your device does not enumerate as a USB device upon connection, verify the firmware version or check for additional dependencies.

To enable USB connectivity:
- Use a USB-C OTG cable to connect the Reyax RYRR30D to your computer.
- Execute the following command to activate USB mode:

AT+MODE=2

UART Connection

If USB connectivity is unavailable, the UART interface serves as a reliable alternative. This requires a USB-to-UART bridge, such as the RYLS135 board. Make sure the baud rate and other communication parameters are configured correctly to establish communication.

Step 2: Generating Apple and Google Credentials

At this stage, you'll prepare the cryptographic credentials required to authenticate passes. Both Apple and Google wallets require unique keys and IDs, which can be derived from your pass-issuing organization's provided data.

Apple Pass Type ID and Key

Generate the Apple Pass Type ID Hash:
This hash is derived from your Apple Merchant ID and ensures compatibility with the pass reader.

echo -n "pass.com.example" | openssl dgst -sha256 | tr '[:lower:]' '[:upper:]' 36CEA63BDA4BE5E17F99CAEF06860507E9D8F021C2095A47668ACEB00DE3ADB2

Extract the Apple Private Key Bytes:
The private key bytes are necessary for secure data transmission. Use OpenSSL to extract and format them as shown below:

openssl ec -in apple_vas_key.pem -text -noout | awk '/priv:/{flag=1; next}/pub:/{flag=0}flag' | tr -d ': ' | tr '[:lower:]' '[:upper:]' 0533B37ECD04FFDDBB2948E71BBCC89C83536C0CEA1924297A27ABC118706425

Google Collector ID and Key

For Google Wallet, convert the provided Collector ID into hexadecimal format and retrieve the associated key. This process follows the same methodology as Apple's credentials generation.

If you need our Collector ID for reader config, it is 77501435 and our key version id is 69. Issuer ID 3175895186863635130

[Placeholder for step-by-step screenshots]

Step 3: Configuring the RYRR30D

Once the credentials are ready, they must be loaded onto the RYRR30D. This process involves connecting the device to your computer and issuing specific AT commands.

Enter AT Commands

Using Docklight, connect to the RYRR30D and input the following commands to set up the credentials:

AT+APPLE=1,36CEA63BDA4BE5E17F99CAEF06860507E9D8F021C2095A47668ACEB00DE3ADB2,0533B37ECD04FFDDBB2948E71BBCC89C83536C0CEA1924297A27ABC118706425 AT+GOOGLE=1,00A98AC7,A541XXXXXXXXXXXXXBE242CA AT+MODE=2

After sending these commands, the device will store the credentials in its EEPROM, ready for operation.

Step 4: Testing the Configuration

With the configuration complete, it’s time to verify the RYRR30D’s functionality.

To test NFC pass reading:
1. Enable NFC on your phone.
2. Bring the phone close to the RYRR30D antenna area.
3. Observe the output in the Docklight terminal, which should display details about detected passes, such as:

+APPLE=1,Hello World!
  1. A green LED flash indicates a successful NFC read.

Troubleshooting

If you encounter issues during setup or testing, consider the following:
- USB Enumeration Fails: Verify that USB OTG mode is enabled with the AT+MODE=2 command.
- Slow NFC Scans: Disable unnecessary scanning protocols using:

AT+CTYPE=1100000000000000

Conclusion

Congratulations! You’ve successfully configured the Reyax RYRR30D USB NFC reader for use with Apple and Google Wallet passes. This device offers robust NFC capabilities, and its flexibility makes it an excellent choice for developers building pass-interactive applications.

For more details and updates, visit the Reyax RYRR30D product page.

Was this article helpful?
Yes No