How can i changeIOIO bluetooth PIN code and bluetooth name IOIO(XX:XX)?

535 views
Skip to first unread message

徐子軒

unread,
Jun 29, 2012, 2:26:08 AM6/29/12
to ioio-...@googlegroups.com
I installed MPLAB X IDE v1.20,and import the IOIO firmware project (libbtstack) .
But I can't find source code to change the bluetooth default PIN code and change  name IOIO(XX:XX) or change the GUID(UUID).
How can I do ? 

FelixG

unread,
Jun 30, 2012, 3:22:42 AM6/30/12
to ioio-...@googlegroups.com
So solve this you can use the seach function of file contents. With Linux for example: 
grep -R "4545" *

Here is the output. You have to change all these 4545 to the value you want.
firmware/libconn/bt_app.c:          log_printf("Pin code request - using '4545'\n\r");
firmware/libconn/bt_app.c:          hci_send_cmd(&hci_pin_code_request_reply, &event_addr, 4, "4545");
firmware/latency_tester/main.c:    return ConnectionOpenChannelAdb("tcp:4545", &AppCallback);
firmware/app_layer_v1/README:tries to establish an ADB channel with TCP port 4545 of the ADB device.
firmware/app_layer_v1/main.c:      return ConnectionOpenChannelAdb("tcp:4545", &AppCallback);
software/IOIOBluetoothBridge/src/ioio/bluetooth_bridge/MainActivity.java: static final int IOIO_PORT = 4545;
software/IOIOLib/src/ioio/lib/impl/SocketIOIOConnectionBootstrap.java: public static final int IOIO_PORT = 4545;
software/IOIOLatencyTester/src/ioio/latency_tester/LatencyTesterActivity.java: "ioio.lib.impl.SocketIOIOConnection", 4545));
felix@ThinkPad-Ubuntu12:~/Dropbox/Desktop/Semesterarbeit2/ytai-ioio-b93dfc7$ grep -R "4545" *
firmware/libconn/bt_app.c:          log_printf("Pin code request - using '4545'\n\r");
firmware/libconn/bt_app.c:          hci_send_cmd(&hci_pin_code_request_reply, &event_addr, 4, "4545");
firmware/latency_tester/main.c:    return ConnectionOpenChannelAdb("tcp:4545", &AppCallback);
firmware/app_layer_v1/README:tries to establish an ADB channel with TCP port 4545 of the ADB device.
firmware/app_layer_v1/main.c:      return ConnectionOpenChannelAdb("tcp:4545", &AppCallback);
software/IOIOBluetoothBridge/src/ioio/bluetooth_bridge/MainActivity.java: static final int IOIO_PORT = 4545;
software/IOIOLib/src/ioio/lib/impl/SocketIOIOConnectionBootstrap.java: public static final int IOIO_PORT = 4545;
software/IOIOLatencyTester/src/ioio/latency_tester/LatencyTesterActivity.java: "ioio.lib.impl.SocketIOIOConnection", 4545));

For PIN and device name you have to make changes in the firmware and the java libraries. 

Now to the device name. Use again grep:
grep -R "IOIO (" *

The Output:
firmware/libconn/bt_app.c:static char       local_name[] = "IOIO (00:00)";  // the digits will be replaced by the MSB of the BD-ADDR
firmware/libconn/bt_app.c:            sprintf(local_name, "IOIO (%02X:%02X)", event_addr[4], event_addr[5]);

Then you also have to change the name in the Java library, but at the moment I don't not in which file. If you were successful, please post which file you've edited.

Cheers
Felix

Ytai Ben-Tsvi

unread,
Jun 30, 2012, 5:20:28 PM6/30/12
to ioio-...@googlegroups.com
Note that the current Android software will filter Bluetooth devices by the "IOIO" prefix to the name, so make sure you change that too.

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/mHjYOPc-2psJ.

To post to this group, send email to ioio-...@googlegroups.com.
To unsubscribe from this group, send email to ioio-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ioio-users?hl=en.

徐子軒

unread,
Jul 2, 2012, 2:04:10 AM7/2/12
to ioio-...@googlegroups.com
If I change Bluetooth GUID , how can i do  ? 

Ytai Ben-Tsvi

unread,
Jul 3, 2012, 1:20:45 AM7/3/12
to ioio-...@googlegroups.com
You can change the GUID on both the IOIO side and the Android side, if that's what you mean. The side effect of this will be that the IOIO will no longer be recognized as a RFCOMM device, and will not be able to work with anything except the Android.
What are you trying to achieve exactly?

On Sun, Jul 1, 2012 at 11:04 PM, 徐子軒 <littleor...@gmail.com> wrote:
If I change Bluetooth GUID , how can i do  ? 

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/WNpIqEow1GsJ.

徐子軒

unread,
Jul 3, 2012, 6:20:20 AM7/3/12
to ioio-...@googlegroups.com
Android side I know ,but I want to change  the GUID on the IOIO  side,how can change to firmware  MPLAB X  project to do? 

Ytai Ben-Tsvi

unread,
Jul 4, 2012, 12:29:10 AM7/4/12
to ioio-...@googlegroups.com
On Tue, Jul 3, 2012 at 3:20 AM, 徐子軒 <littleor...@gmail.com> wrote:
Android side I know ,but I want to change  the GUID on the IOIO  side,how can change to firmware  MPLAB X  project to do? 

--
You received this message because you are subscribed to the Google Groups "ioio-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ioio-users/-/vIMqIwmYNh8J.
Reply all
Reply to author
Forward
0 new messages