Errors in serial protocol documentation

Discussion in 'General' started by Øyvind Nydal Dahl, Aug 7, 2016.

  1. Øyvind Nydal Dahl

    Øyvind Nydal Dahl New Member

    I'm working with the baseband data of the X2M200 module and I've found some errors in the documentation.

    1. Enable baseband amplitude data:

    According to the Serial Protocol documentation the message format to turn on baseband data is:
    <Start> + <XTS_SPC_DIR_COMMAND> + <XTS_SDC_APP_SETINT> + [XTS_SACR_OUTPUTBASEBAND(i)] + <EnableFormat> + <CRC> + <End>

    But that does not work. And that's not what the example code does.

    According to my findings (And as James Citta has also pointed out), the following format works:
    <Start> + <XTS_SPC_DIR_COMMAND> + <XTS_SDC_APP_SETINT> + [XTS_SACR_OUTPUTBASEBAND(i)] + [LENGTH(i)] + [EnableFormat(i)] + <CRC> + <End>

    2. Receiving baseband amplitude data:

    The format of the receiving packages of baseband data is according to the documentation:
    <Start> + <XTS_SPR_APPDATA> + [XTS_ID_BASEBAND_AP(i)] + [Counter(i)] .......

    What I am getting is:
    <Start> + 0xA0 + 0x14 + [XTS_ID_BASEBAND_AP(i)] + [Counter(i)] .......

    3. Missing info on changing baud rate

    I'm receiving a lot of CRC errors (about 70% of all packages have CRC error). I wanted to try changing the baudrate of the module to see if that could help. But this is not documented. I figured it out through the example code, but it would be great to see if there are some baud rates that are recommended (according to the on-board clock frequency).
  2. Ole-Johan

    Ole-Johan New Member

    1: You are correct, there is a mismatch between the implementation and the documentation. We are reviewing both, and will come back with an update.

    2: That looks strange, I have not seen the same. The baseband example project has this implemented, and it reads successfully as described in the documentation. Could it relate to baudrate issues, ref 3?

    3: You are correct, this is a hidden feature that we wanted to keep internal as long as it was not needed for normal use. However, baseband output seems to require the increased baudrate so we used it in the example without updating the doc. We will add it shortly.
    We have only used two settings here, the default 115kbps and what is max for the module, 921600. Theoretically you should be able to use all standard values in between, but we have not verified which rate you need to guarantee successful baseband data output. If possible, I would recommend using 900kbps.

    Thanks for the input, you can expect an updated doc and possibly firmware soon.
    Øyvind Nydal Dahl likes this.
  3. Øyvind Nydal Dahl

    Øyvind Nydal Dahl New Member


    So you are saying that baseband data won't work with 115kbps? And that's why I might be getting 0xA0 + 0x14?

    Because all the non-baseband data packages look fine. I get the correct response as mentioned in the datasheet.

    I'm having troubles getting the 921600 working, but I'll try some more.
  4. Ole-Johan

    Ole-Johan New Member

    It could be that there are some unknown effects of sending the data at a higher rate than the system can process, such as with baseband data at 115kbps, but it sounds strange, as the CRC check should discard that message.
    However, we have found that 115kbps is not sufficient for baseband output, so yes, you need a higher rate.
  5. Øyvind Nydal Dahl

    Øyvind Nydal Dahl New Member

    Do you know the minimum rate for baseband output?
    I am using an Arduino, and while the hardware itself is able to handle the 900k rate, it seems that the standard Serial library for Arduino will only work for rates up to 500kbps.
  6. Øyvind Nydal Dahl

    Øyvind Nydal Dahl New Member

    Ok, seems to be my level converter (5V <-> 3.3V) that is not fast enough for higher baud rates. Do you have any info on baud rate? Does it need to be 921600?
  7. Øyvind Nydal Dahl

    Øyvind Nydal Dahl New Member

    It turns out I had an old firmware version in my module (1.0.22-Alpha).

    I upgraded to 1.1.0-Beta and now I am no longer receiving the 0xA0 0x14 packages for baseband packages, but rather the 0x50 that I am supposed to get. This is still on baud rate 115200.
  8. Ole-Johan

    Ole-Johan New Member

    OK, sorry about that. The feature is new, and is as you have experienced "bleeding edge". :) I am looking into baudrate, we have only used 900kbps so I need to actually test different rates to verify the lowest. Will get back to you on that.