You Went to Oracle Open World 19 and got a Code Card, now what?

We handed out several hundred Code Cards this year and I’m guessing a few of you are wondering what to do next.

If you got home and pressed one of the buttons you more than likely saw this screen.

Don’t worry, it’s not broken, you just need to get it connected to the internet.  There are a few different ways to do this.

Note: The Code Card uses a 2.4 GHz WiFi connection.

Create a WiFi Network

The easiest way to get it connected is to create a WiFi network using the credentials that are already set on the Code Card.

One way you can do this is to create guest network on your WiFi router.  Please refer to your router manual for instructions on setting this up.

Alternatively, you could create a hotspot on your phone, but make sure you’re OK with any charges from your service provider.

Edit:

At Oracle we like to keep everything patched and up to date.  After I published this post, the security certificate for the REST back end was updated.  This means you will also need to update the fingerprint settings for the four button options.

This also means that creating a WiFi SSID as in the paragraph above will only work if you also update the following four settings.  For that you’ll need to choose one of the methods below.   (I have added them to the examples below.)

Change the WiFi credentials on the card

If you’d rather just connect the Code Card to your existing WiFi network (2.4 GHz only), you can change the settings on the card.

In order to do this you need to open a serial connection to the card and send the following commands (using your WiFi credentials):

A Little Python

If you’d like to use Python:

  1. Install Python 3 if you don’t already have it.
  2. Open a terminal and install pyserial.
  3. Create a file using the following code.  I named mine ccSerial.py.
  4. Change lines 7 and 8 to use your WiFi credentials.
  5. In the terminal run the new module and follow the instructions.
    You should see something similar to the following.
Arduino IDE

If you have a Serial communication tool that you like, you should be able to use it to change the settings.

If not the Arduino IDE includes a Serial Monitor tool that work great.

  1. Do not connect your Code Card to the computer yet.
  2. Download, install and run the Arduino IDE.
  3. Click on Tools / Port.
  4. See what Ports are already in use.
  5. Connect your Code Card and turn it on.
  6. Click on Tools / Port.
  7. The newest Port should be your Code Card; select it.
  8. Click on Tools / Serial Monitor.
  9. On the bottom of the Serial Monitor, choose 115200 baud.
  10. Turn your Code Card off and on again.
  11. Press and release the A and B buttons at the same time.
    You should see something like this.
  12. In the input field at the top enter (use your SSID)
    Click Send.
    You should see something like
  13. At the top enter (use your password)
    Click Send.
    You should see something like
  14. At the top enter (use your password)
    Click Send.
    You should see something like
  15. At the top enter (use your password)
    Click Send.
    You should see something like
  16. At the top enter (use your password)
    Click Send.
    You should see something like
  17. At the top enter (use your password)
    Click Send.
    You should see something like
  18. Unplug your Code Card.
  19. Turn it off and on again.
  20. It should now connect to your network and the buttons should work.

What Else Can You Do?

There are a lot of things you can do with your Code Card.

For some ideas check out this GitHub page for some how to guides and other information.

20 thoughts on “You Went to Oracle Open World 19 and got a Code Card, now what?”

  1. IP address: 192.168.0.103
    MAC address: CC:50:E3:CC:**:**
    >>>
    Button a – short pressed
    >>>
    Connecting to ‘****’ connected!
    IP address: 192.168.0.103
    MAC address: CC:50:E3:CC:**:**
    >>>
    Request:
    host: apex.oracle.com
    port: 443
    url: https://apex.oracle.com/pls/apex/appslab/functions/master
    fingerprint: 19 D1 5D 53 82 89 49 F6 92 7F 93 E5 06 EE 6D 40 16 41 4A 47
    method: GET
    Unexpected response: HTTP/1.0 200 OK

    Oracle Events App ( Code Card Designer) where we could use prebuilt template to configure short/long press button A and B, it is still not working. It was working before but something changed on apex about 2 days ago and then it broke .
    I always get A- short pressed, please wait ……

    1. Do you always get the “Unexpected response: HTTP/1.0 200 OK”?

      When you set the 4 fingerprints, make sure there are no spaces around the = and no spaces after the end

      Also, make sure you turn the card off and on again before pressing A.

      1. Yes, I just copied your python script and ran it ( just changed my ssid and password) and that steps works fine
        but still press button a or b, does not bring template on oracle events app.

        Yes, I am getting Unexpected response when using screen and giving command shortpressa or shortpessb

        screen /dev/cu.SLAB_USBtoUART 115200 -L

        >>>
        Request:
        host: apex.oracle.com
        port: 443
        url: https://apex.oracle.com/pls/apex/appslab/functions/master
        fingerprint: 19 D1 5D 53 82 89 49 F6 92 7F 93 E5 06 EE 6D 40 16 41 4A 47
        method: GET
        Unexpected response: HTTP/1.0 200 OK
        Button b – short pressed
        >>>
        Connecting to ‘sg’ connected!
        IP address: 192.168.0.103
        MAC address: CC:50:E3:**:**:**
        >>>
        Request:
        host: apex.oracle.com
        port: 443
        url: https://apex.oracle.com/pls/apex/appslab/functions/master
        fingerprint: 19 D1 5D 53 82 89 49 F6 92 7F 93 E5 06 EE 6D 40 16 41 4A 47
        method: GET
        Unexpected response: HTTP/1.0 200 OK

        1. A couple things to check.
          1. Make sure when you edit the screen in the Code Card Editor that you sign in using all upper case.
          2. Make sure there are no special characters in the text. !@#$%^… Just send text. I think some may work but others will cause an unexpected response.

          1. Sorry, what is Code Card Editor. I did not use any editor.
            I have used screen command to connect to card and simulate shortpessa etc. I have also used your python script ( which can do same thing as in screen command e.g. setting up wifi ssid and password etc).

            See configuring card section :
            https://developer.oracle.com/codecard/

            Then there was Mobile app ( Oracle Events) where we can use some which goes to and I can select some template etc http://groundbeakershub.com/codecarddesigner)

  2. I just checked and it seems the Security Certificate Fingerprint has changed again.

    The current values are:
    fingerprinta1=D1 E4 3B A6 23 07 D8 16 81 D4 73 B1 AC E9 AE 55 08 D9 A0 32
    fingerprinta2=D1 E4 3B A6 23 07 D8 16 81 D4 73 B1 AC E9 AE 55 08 D9 A0 32
    fingerprintb1=D1 E4 3B A6 23 07 D8 16 81 D4 73 B1 AC E9 AE 55 08 D9 A0 32
    fingerprintb2=D1 E4 3B A6 23 07 D8 16 81 D4 73 B1 AC E9 AE 55 08 D9 A0 32

    After this, if you have setup your WiFi correctly and you still get a hang when pressing a button, you’ll need to get the fingerprint from the APEX service.

    – Open a web browser and go to https://apex.oracle.com/en/
    – View the security certificate (You’ll have to lookup how to do this for the browser you’re using)
    – Find the SHA-1 Fingerprint. Currently it looks like this: D1 E4 3B A6 23 07 D8 16 81 D4 73 B1 AC E9 AE 55 08 D9 A0 32
    However in another browser it may be colon deliminated: D1:E4:3B:A6:23:07:D8:16:81:D4:73:B1:AC:E9:AE:55:08:D9:A0:32
    If it is using colons, replace them with spaces.
    – Use this string for the 4 values in the settings at the top of this comment.

    If you decide to try calling your own REST services, you will need to do this with your REST service URI.

      1. still does not work.

        onnecting to ‘sgupta’ ……connected!
        IP address: 192.168.0.103
        MAC address: CC:50:E3:CC:C0:00
        >>>
        Request:
        host: apex.oracle.com
        port: 443
        url: https://apex.oracle.com/pls/apex/appslab/functions/master
        fingerprint: D1 E4 3B A6 23 07 D8 16 81 D4 73 B1 AC E9 AE 55 08 D9 A0 32
        method: GET
        Unexpected response: HTTP/1.0 200 OK
        Shuting down…

        I have changed fingerprint and again ran ccSerial.py but same issue. I checked certificate ssh-a1 and value is correct. This issue started happening only 3 or 4 days ago since it was working after I came back from Oracle Open World. There was some changes on Oracle Apex site and I think it broke afterwards , even oracle apex site was down 3 or 4 days ago.

    1. Arduino: 1.8.10 (Mac OS X), Board: “Generic ESP8266 Module, 80 MHz, Flash, nodemcu, 26 MHz, 40MHz, DIO, 512K (no SPIFFS), 2, v2

      I am getting following when trying to upload
      Lower Memory, Disabled, None, Only Sketch, 115200”

      Sketch uses 444156 bytes (88%) of program storage space. Maximum is 499696 bytes.
      Global variables use 41700 bytes (50%) of dynamic memory, leaving 40220 bytes for local variables. Maximum is 81920 bytes.
      warning: espcomm_sync failed
      error: espcomm_open failed
      error: espcomm_upload_mem failed
      error: espcomm_upload_mem failed

      This report would have more information with
      “Show verbose output during compilation”
      option enabled in File -> Preferences.

      1. Verbose output
        Sketch uses 444156 bytes (88%) of program storage space. Maximum is 499696 bytes.
        Global variables use 41700 bytes (50%) of dynamic memory, leaving 40220 bytes for local variables. Maximum is 81920 bytes.
        /Users/sagupta/Library/Arduino15/packages/esp8266/tools/esptool/0.4.13/esptool -vv -cd nodemcu -cb 115200 -cp /dev/cu.SLAB_USBtoUART -ca 0x00000 -cf /var/folders/nc/x54dnbnx5yggv3mzhsgd0gf4nlmmjp/T/arduino_build_175768/codecard.ino.bin
        esptool v0.4.13 – (c) 2014 Ch. Klippel
        setting board to nodemcu
        setting baudrate from 115200 to 115200
        setting port from /dev/tty.usbserial to /dev/cu.SLAB_USBtoUART
        setting address from 0x00000000 to 0x00000000
        espcomm_upload_file
        espcomm_upload_mem
        opening port /dev/cu.SLAB_USBtoUART at 115200
        tcgetattr
        tcsetattr
        serial open
        opening bootloader
        resetting board
        trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        resetting board
        trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        resetting board
        trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        trying to connect
        espcomm_send_command: sending command header
        espcomm_send_command: sending command payload
        warning: espcomm_sync failed
        error: espcomm_open failed
        error: espcomm_upload_mem failed
        error: espcomm_upload_mem failed

  3. Here is the issue when uploading firmware image. It gets compiled fine but in the end it fails to upload

    sing library SPI at version 1.0 in folder: /Users/sagupta/Library/Arduino15/packages/esp8266/hardware/esp8266/2.4.2/libraries/SPI
    /Users/sagupta/Library/Arduino15/packages/esp8266/tools/xtensa-lx106-elf-gcc/1.20.0-26-gb404fb9-2/bin/xtensa-lx106-elf-size -A /var/folders/nc/x54dnbnx5yggv3mzhsgd0gf4nlmmjp/T/arduino_build_990181/codecard.ino.elf
    Sketch uses 444148 bytes (42%) of program storage space. Maximum is 1044464 bytes.
    Global variables use 41700 bytes (50%) of dynamic memory, leaving 40220 bytes for local variables. Maximum is 81920 bytes.
    /Users/sagupta/Library/Arduino15/packages/esp8266/tools/esptool/0.4.13/esptool -vv -cd nodemcu -cb 115200 -cp /dev/cu.SLAB_USBtoUART -ca 0x00000 -cf /var/folders/nc/x54dnbnx5yggv3mzhsgd0gf4nlmmjp/T/arduino_build_990181/codecard.ino.bin
    esptool v0.4.13 – (c) 2014 Ch. Klippel
    setting board to nodemcu
    setting baudrate from 115200 to 115200
    setting port from /dev/tty.usbserial to /dev/cu.SLAB_USBtoUART
    setting address from 0x00000000 to 0x00000000
    espcomm_upload_file
    espcomm_upload_mem
    opening port /dev/cu.SLAB_USBtoUART at 115200
    tcgetattr
    tcsetattr
    serial open
    opening bootloader
    resetting board
    trying to connect
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload

    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    trying to connect
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload
    resetting board
    trying to connect
    espcomm_send_command: sending command header
    espcomm_send_command: sending command payload

    warning: espcomm_sync failed
    error: espcomm_open failed
    error: espcomm_upload_mem failed
    error: espcomm_upload_mem failed

  4. error: espcomm_upload_mem was resolved using, need to press button A on Oracle code card for few seconds when code is done compiling and ready to upload.

Leave a Reply