This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

S110 serialization based on Linux

Please,

We want to develop our BLE related application on PC and we find that "GAP/GATT driver for windows" is a good way to achieve that. While our system is based on Linux (Ubuntu 12.04) and currently the "GAP/GATT driver for Linux" is unavailable. So we want to develop the driver part by ourselves.

From SDK documents, we have known the "S110-RPC" and we have found that when we send packages as the encoding/decoding procedure, EK would response as what we want. For example, when we send "0x04 0x00 0x00 0x60 0x01 0x00" (BLE stack init cmd), EK would response "0x06 0x00 0x01 0x60 0x00 0x00 0x00 0x00" (it means NRF_SUCCESS). So we can control EK through these encoding/decoding packages.

We test this method on window through serial debugging tools and it works well. And then we test it on Linux through serial port (/dev/ttyACM0) but it does not work well. We send "0x04 0x00 0x00 0x60 0x01 0x00" but receive no serial data. How can we control EK through serial encoding/decoding packages on Linux?

Thank you very much!

  • I would say that that happens because you are dealing with ttyACMx instead of a ttyUSBx port. ttyACMx is a modem for Linux so it is probably adding some AT commands which are confusing the dongle. If you type lsmod you will read something like cdc, right? Ideally, you should force the right driver to be used instead (usbserial, I think to remember) but not sure how this can be achieved if the dongle is introducing itself as a CDC device. Maybe using udev rules?

    Regards

  • Thanks jezule,

    Just now we try "uart_example" project (only uart communication related) with EK board. It works well on Linux. And then according to your advice, we use EK's uart port directly, which changes to ttyUSB0 port. But there are no data replying. And also we find that no waveform on TX pin when EK sends "0x04 0x00 0x00 0x60 0x01 0x00" through oscilloscope.

  • Problem has solved!

    In fact, we found that it it because serial port can't accept the full serial data for Linux. Now we can control EK based on serial packages.

Related