The CodeLess™ library implements the Renesas CodeLess™ and DSPS protocols and provides helper classes to support the development of your own CodeLess™ and DSPS applications.
Import the CodelessLib
library source code into your Xcode project.
You can use the SmartConsole iOS application source code as reference.
For more information on how to use the library, refer to the documentation of the following classes.
- Use
CodelessBluetoothManager
to scan for Bluetooth devices. - Use
CodelessManager
to connect and interact with a CodeLess™ or DSPS device. CodelessCommands
contains helper methods for sending various AT commands to the peer device.CodelessLibEvent
contains event classes for all possible events that can be generated by the library.CodelessProfile
contains definitions and helper classes and methods.- See
CodelessCommand
on how supported AT commands are implemented and how to add new commands. - Modify
CodelessLibConfig
to configure various aspects of the library behavior. - Modify
CodelessLibLog
to configure the log output produced by the library.
See also: CodeLess User Manual
Note: There is also a CodeLess™ library for Android development, which is written in Java. While class names may be slightly different and the API uses the Java syntax, the Android library behavior is similar to the iOS one, except for some platform specific cases.
- Copy the
CodelessLib
source code directory to the root of the project. - Select "Add files" at the top level and select
CodelessLib.xcodeproj
. - Add dependencies in "Build Phases" in project settings.
- Add
CodelessLib
to "Target Dependencies" - Add
libCodelessLib.a
to "Link Binary With Libraries"
- Add
- Add library headers in "Build Settings" in project settings.
- Find "Header Search Paths"
- Add "recursive" search path
$(PROJECT_DIR)/CodelessLib/CodelessLib
- Add required privacy keys for Bluetooth in
Info.plist
- "Privacy - Bluetooth Always Usage Description" (
NSBluetoothAlwaysUsageDescription
) - "Privacy - Bluetooth Peripheral Usage Description" (
NSBluetoothPeripheralUsageDescription
)
- "Privacy - Bluetooth Always Usage Description" (
- If you are using Swift, add
#import <CodelessLib.h>
in the Objective-C bridging header. Create the bridging header if it does not exist.