Questions regarding a MDF-Scenario
Questions regarding a MDF-Scenario
Hello community,
firstly I want to thank the developers for this library. I have a few questions regarding a possible use case of ours in which we would like to use the ESP32 with the MDF-Framework.
We have a couple of BLE-Sensors spread out in an area. We want to create a mesh-network, such that all leaf and parent nodes collect data from these sensors and communicate them to the master node. The master not must be fixed and communicate all these values via WiFi to a server in an external network in its range. The server is a simple Node.js express server with a static ip listening on a port.
Is this scenario possible? We tried to implement this example:
https://github.com/espressif/esp-mdf/bl ... _example.c
but there were a few issues:
1) We never received any data on the server. The node was successfully connected to the wifi, and we see a difference in log output when stopping the server or running it, but we did not got any request data
2) We do not know how to set a fixed root node. Can somebody please point out how to use two separate code bases: One for fixed root nodes and one for parent/leaf nodes.
Thank you very much for your kind help! Best regards
firstly I want to thank the developers for this library. I have a few questions regarding a possible use case of ours in which we would like to use the ESP32 with the MDF-Framework.
We have a couple of BLE-Sensors spread out in an area. We want to create a mesh-network, such that all leaf and parent nodes collect data from these sensors and communicate them to the master node. The master not must be fixed and communicate all these values via WiFi to a server in an external network in its range. The server is a simple Node.js express server with a static ip listening on a port.
Is this scenario possible? We tried to implement this example:
https://github.com/espressif/esp-mdf/bl ... _example.c
but there were a few issues:
1) We never received any data on the server. The node was successfully connected to the wifi, and we see a difference in log output when stopping the server or running it, but we did not got any request data
2) We do not know how to set a fixed root node. Can somebody please point out how to use two separate code bases: One for fixed root nodes and one for parent/leaf nodes.
Thank you very much for your kind help! Best regards
-
- Posts: 132
- Joined: Thu Nov 15, 2018 2:06 am
Re: Questions regarding a MDF-Scenario
1. FIrstly, please use tcp/udp debug tool to connect your tcp server. If this ok, then use ESP32 to connect your tcp server under correct configuration.
2. You can refer to no_router example under mdf example directory. According to README.md(The document isn't perfect) to configure device type.
2. You can refer to no_router example under mdf example directory. According to README.md(The document isn't perfect) to configure device type.
Re: Questions regarding a MDF-Scenario
Thank you for your response!
1) Which debug tool do you recommend to use? We do not have an Android device here. Please suggest one with English language features.
2) Thank you for pointing that out. Is it only possible to set the root node via in every project or can we also specify that in the source code? We prefer a solution in the source.
Kind regards
1) Which debug tool do you recommend to use? We do not have an Android device here. Please suggest one with English language features.
2) Thank you for pointing that out. Is it only possible to set the root node via
Code: Select all
make menuconfig
Kind regards
Re: Questions regarding a MDF-Scenario
Thank you I found the part in source code where the device type is setup as root node, so the only question remaining is 1). We need the tcp communication over the WiFi network for the root node to work.
Kind regards
Kind regards
-
- Posts: 132
- Joined: Thu Nov 15, 2018 2:06 am
Re: Questions regarding a MDF-Scenario
Oh, There are many debug tool. For example: packetsender
Re: Questions regarding a MDF-Scenario
Thank you for recommending this tool, we could resolve all our issues!
Another thing I would like to know is if you can connect to a server by using a hostname rather than an IP? Maybe the ESP-IDF provides functionality to resolve such hostname? Thank you
Another thing I would like to know is if you can connect to a server by using a hostname rather than an IP? Maybe the ESP-IDF provides functionality to resolve such hostname? Thank you
-
- Posts: 132
- Joined: Thu Nov 15, 2018 2:06 am
Re: Questions regarding a MDF-Scenario
Yeah, ESP-IDF currently implements TCP/IP Adapter for the lwIP TCP/IP stack. Please choose functions to resolve hostname to get ip address. Example: gethostbyname、getaddrinfo.
Please search function name on GooGle for details.
Please search function name on GooGle for details.
Re: Questions regarding a MDF-Scenario
Thank you for follwing up on this issue. We were able to get the mesh working as we wanted to, we can also successfully resolve hostnames.
Another problem we encountered was that we cannot get any BLE code to compile with the MDF. We copied the simple gatt_client example into the main folder and enabled bluetooth in make menuconfig, but we get a lot of compiler warnings about not having a member named and a lot of missing events. It can find all the right headers but we can not get this simple example to compile. The example compiles fine when using the IDF tho.
Thanks for your help
Another problem we encountered was that we cannot get any BLE code to compile with the MDF. We copied the simple gatt_client example into the main folder and enabled bluetooth in make menuconfig, but we get a lot of compiler warnings about
Code: Select all
esp_ble_gattc_cb_param_t
Code: Select all
dis_srvc_cmpl
Thanks for your help
-
- Posts: 132
- Joined: Thu Nov 15, 2018 2:06 am
Re: Questions regarding a MDF-Scenario
Please check that the IDF version of the BLE example is the same as the IDF version of the MDF firstly.
Use `git log` command under IDF directory to get version(commit id)。
Use `git log` command under IDF directory to get version(commit id)。
Re: Questions regarding a MDF-Scenario
Thank you for the response. I hope we can resolve the issue. It works if I comment out the part for the ESP_GATTC_DIS_SRVC_CMPL_EVT, but then it will not search for any services.. This is not good.
Here are my log outputs:
ESP IDF
ESP MDF
Here are my log outputs:
ESP IDF
Code: Select all
commit 58df1d93bc17c74499d58e05390af9c309192a5c (HEAD -> master, origin/master, origin/HEAD)
Merge: 08557be5d a98141cc0
Author: Ivan Grokhotkov <ivan@espressif.com>
Date: Thu Jun 13 21:39:06 2019 +0800
Merge branch 'bugfix/ci_sort_executable_list' into 'master'
ci: keep executables list sorted to pass tests
See merge request idf/esp-idf!5231
commit 08557be5df422819c4e9a88b03905902ccf337f9
Merge: 787198337 c8d967417
Author: Ivan Grokhotkov <ivan@espressif.com>
Date: Thu Jun 13 16:07:05 2019 +0800
Merge branch 'fix/bootloader_region_overlap_update' into 'master'
bootloader: remove duplicate region overlap logic
See merge request idf/esp-idf!5128
commit 7871983370e4b104af60ced99e1d75acfc2de70c
Merge: 4e09eaf8e ae675973b
Author: Jiang Jiang Jian <jack@espressif.com>
Date: Thu Jun 13 15:31:26 2019 +0800
Merge branch 'optimize/igmp_mld6_timer' into 'master'
optimize: IGMP and MLD6 timer optimization config added
See merge request idf/esp-idf!4776
Code: Select all
commit 56ce357ebc3c8901f1686bf10464f11b045c7de6 (HEAD -> master)
Merge: dc2c69b b2225f9
Author: Zhan Zhao Chen <zhanzhaochen@espressif.com>
Date: Tue Jun 4 17:49:32 2019 +0800
Merge branch 'feat/router' into 'master'
feat(router): Add router example
See merge request application/esp-mdf!266
commit b2225f916ff75b94a2c7c22adeb173134ba33aea
Author: Yuan Ming Fu <yuanmingfu@espressif.com>
Date: Tue Jun 4 17:49:32 2019 +0800
feat(router): Add router example
commit dc2c69b017dd9315a50beabc76a2c297be554881
Merge: a90b2fe 1ecbca6
Author: Zhan Zhao Chen <zhanzhaochen@espressif.com>
Date: Tue Jun 4 16:04:53 2019 +0800
Merge branch 'feature/no-router' into 'master'
feature(no-router): Add no-router example
See merge request application/esp-mdf!253
commit 1ecbca6f8b795d683a5d47d2c08516f2a5b14916
Author: Yuan Ming Fu <yuanmingfu@espressif.com>
Date: Tue Jun 4 16:04:53 2019 +0800
Add no-router example
Who is online
Users browsing this forum: No registered users and 6 guests