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

Receive Bluetooth then Transmit Zigbee to the cloud via a coordinator

I currently have some Thingy:91 that I need to test in an area that has not got LTE-M, and my testing case until taking them to an area that has LTE-M, is to flash them so that each of them in the grid will send information that they have individually gathered using bluetooth, via zigbee, to a dedicated coordinator that is attached to an internet connected computer, which will then send all of the individual messges as received from each Thingy:91, to an event hub in the cloud.

Having, in each Thingy:91, created messages that are under 255 bytes long, how do I send these messages via Zigbee back to a common coordinator (which itself is a Thingy:91, but in this case, is connected to a computer via USB, which has internet access), so that in that coordinator, I can pass the messages as they come in from any of the zigbee devices, to a serial connection to the computer, so that they will be passed to a cloud-based event hub endpoint?

I am particularly interested in:

  1. The following, using the Zephyr RTOS to flash both the coordinator, and the end devices
  2. How each of the end devices register with the coordinator, doing so in such a fashion that other devices that are not mine, cannot join the zigbee mesh;
  3. How each of the end devices send their own messages to the coordinator;
  4. How the coordinator receives the messages from each of the end devices;
  5. How the coordinator would best send the messages to an event hub in the cloud (just a REST POST), via the coordinator's usb connection to a commputer that is connected to the internet.
  6. From within the coordinator, can the internet be url addressable, or does the coordinator have to send serial messages to the computer via uart, and a process in the computer then relay the information it receives, to the event hub at the cloud based event hub's url endpoint

Looking forwards to any tips!

  • Hi

    This DevZone ticket seems to be somewhat all over the place, as Bluetooth LE, Zigbee and LTE-M are three very different protocols, an I'm not an expert in all of them, but I think it would be best to start with one subject, and then move on to the next subject.

    I guess your first question is how to make Thingy:91 devices communicate using Bluetooth LE or Zigbee, correct? The nRF9160 on the Thingy:91 does not have BLE capabilites so you'll need to flash the nRF52840 on the Thingy:91 with Zigbee firmware. How to update the nRF52840 application on a Thingy:91 is described in the user guide here, and Zigbee applications for the nRFConnect SDK can be found here.

    Best regards,

    Simon

  • Simon, thanks.

    1. Disregard the bluetooth, it is just the source of the message content. Part of the backstory.
    2. I didn't mention the nRF9160 in the text, just the Thingy:91 - of which you are right, the subcomponent that does the Zigbee is the nRF52840. But I know that. I bought the devices.
    3. I did not say that  it was using the LTE-M, indeed, I implied the opposite, I said I was wanting to use the Zigbee in the circumstance that LTE-M was not available. So disregard the LTE-M capability as well, I do not ask a question about the LTE-M, it's just part of the backstory.
    4. I know how to flash the device, thanks for the link, the question is not how to flash, but what to write for the end device, and the coordinator, so that it can be built and flashed. Line 1 says "the following", with respect to flashing, so what to flash is ALL about questions 2 - 6. The code. Your link did not point to anything that ansers 2 to 6.
    5. Thanks for the link to the Zigbee samples, however as I am adept with the Zephyr RTOS, I have seen those already, however none of them caters for my use case. If you stand back from the backstory and look at just questions 1 - 6, they are all to the point, and quite basic, and above all, not confused.

    With all of this in mind, my questions 2 - 6 are quite clear, I think, that's what I need help with. 

    As for my ticket being all over the place, I'm a bluetooth Tech Lead, I've been writing telecoms since 1998, it's actually very well laid out with both backstory and questions, if you exclude all the assumptions you made, no disrespect, but it seems that the problem is with you reading the ticket. You said " I'm not an expert in all of them" - well it's not for you to answer tjhem.

    This is what I want (notice that there are no references to the issues you raised):

    1. The following, using the Zephyr RTOS to flash both the coordinator, and the end devices
    2. How each of the end devices register with the coordinator, doing so in such a fashion that other devices that are not mine, cannot join the zigbee mesh;
    3. How each of the end devices send their own messages to the coordinator;
    4. How the coordinator receives the messages from each of the end devices;
    5. How the coordinator would best send the messages to an event hub in the cloud (just a REST POST), via the coordinator's usb connection to a commputer that is connected to the internet.
    6. From within the coordinator, can the internet be url addressable, or does the coordinator have to send serial messages to the computer via uart, and a process in the computer then relay the information it receives, to the event hub at the cloud based event hub's url endpoint

    THAT is a Zigbee only shopping list of questions!

    My suggestion is that when someone asks something from an expert, if your response is "I'm not an expert", then as much as I thank you for your enthusiasm, maybe there's nothing for you to say.

    I've already spent £10k on the patent application, I know the bluetooth, if you look at the map of the UK about current LTE-M coverage, you will see that the east is covered, not the west, this Zigbee question is just about getting the same info to the cloud by alternate means, to save me driving 3 hours each day for LTE-M coverage during testing.

    I'm none the wiser, but thanks.

  • Thank you for clarifying, and I'm sorry about the misunderstandings. It does indeed seem I made some assumptions, my apologies.

    The nRFConnect SDK (NCS) use the Zigbee shell library which that is described how to use here. I'm not sure how in-detail you want to get, but specifically how the security is done and how messages are parsed are stated in detail in the Zigbee specification.

    2. There's a selection of security measures in the ZBOSS stack, but the most common security in Zigbee application is to predefine a network key that will be specific to devices in that network. More details can be found in our ZBOSS development guide, and the Zigbee specification.

    3. End devices can send both general command frames and cluster-specific commands with the functions in the "Sending ZCL commands" section of our development guide.

    4. Zigbee events appear asynchronously and the stack informs the application with application signals. The commisi application can handle or ignore these signals. Application signals are processed in the application with the callback function zboss_signal_handler(). In NCS, the zboss_signal_handler() function can be passed to the Zigbee default signal handler library, which is recommended for Zigbee applications in NCS.

    5. I think the best way to transmit data from the coordinator to the computer would be to send it over the USB peripheral, perhaps like how ZBOSS traces are configured in the nRF Connect SDK (with whatever data you are to transmit instead of the trace logs).

    6. I'm not sure I understand (parts of) this question to be honest. What do you mean by "can the internet be URL addressable"? You don't have to send data via UART specifically, as the nRF52840on the Thingy:91 has a USB interface. But you will indeed have to send the data from the coordinator via the computer too the event hub.

    Best regards,

    Simon

  • Oh, I can mark that as the answer, thanks so much, Simon. It also occurred to me at 3 in the morning sometime, that I could have asked an easier question "How to send serial messages to a coordinator in a Zigbee mesh?". I suppose this is why we invented retrospectives Smiley Have a great week, and thanks, that shone a torch down the path ahead, I think I can make it with those tips!

    Regards,

    Anthony

Related