Conversation
|
Just splitted the commit in several packages. |
|
why closed? |
|
@kYc0o Just by mistake :-( I just wanted to recommit the port to add some minor changes and the new periph_rtc module. So I resetted by branch to the master, added and committed all the files again. After forced push (at least I thought it was a push), the PR was closed and the branch is empty in origin. |
|
wow! Ok, I hope you can restablish everything. I'm willing to review and test. However I only have a sha2017 badge which embeds a ESP-WROOM32. I hope with few modifications I can make it work with this PR. |
|
@kYc0o I had a local version of the repository. So I could uploaded the complete commit. Regarding you board, I can take a look what it is. The port should work with all WROVER and WROOM boards with some modifications in board definition. |
|
@kYc0o SHA2017 Badge seems to use the touch sensors. Touch sensor inputs are not supported at the moment since RIOT has no low level interface for touch sensors. The according GPIOs can be used as ADC channels or digial I/O. |
|
Yes, no hurries about it, the most important thing is to have the basic stuff merged, the rest can be added in follow-up PRs. |
4cd71cf to
a74896f
Compare
Nein :( The workers need to be restarted. We will arrange that. |
|
@jia200x How long will this take. Even though I have compiled all the tests with all the boards and I do not expect any surprises, I'm a little curious if murdock gives the same results. |
|
I just updated all murdock workers, so it should in theory work now 🤞 |
|
@smlng compilations on haw-icc always fail with: |
|
@smlng @miri64 Hm, it seems that murdock failed due to compilation errors that are not related to this PR 😟 Who should take a look? |
I'm already taking care of this. The good news are: it seems there are no ESP32 issues 🎉 |
|
@gschorcht btw thank you so much for the efforts you put in documentation |
|
Murdock is green! |
jia200x
left a comment
There was a problem hiding this comment.
Ok, everything seems to be OK. Code looks good and the platform passed some extensive tests (thanks @MrKevinWeiss). Thanks for all the efforts to @gschorcht and all people involved.
Let's get this in the Release 2018.10. ACK
|
🎉 |
|
super cool! |
|
Thank you all for your support, especially @MrKevinWeiss for the intensive testing of the port. |
|
@gschorcht and everyone else involved: congrats! |
| #ifdef MODULE_GNRC_IPV6_NIB | ||
| /* for other addresses, try to find an entry in NIB cache */ | ||
| gnrc_ipv6_nib_nc_t nce; | ||
| int ret = gnrc_ipv6_nib_get_next_hop_l2addr (&ipv6_hdr->dst, dev->netif, |
There was a problem hiding this comment.
Good question, it is long time ago 😟
As I remember, the first packet snippet the netdev driver gets in the _send function is the IPv6 header. If the IPv6 destination address is not a link local address, the destination MAC address cannot be derived from the IPv6 destination address. Of course, I would have the same problem when privacy extensions are used. So I thought, that nib is the right way to get the mapping from an IPv6 destination address to the next hop MAC address. Maybe, I was wrong. In that case the question is how it should be.
From my understanding, IPv6 is responsible to find the next hop IPv6 address from the routing table and to use the neighbor discovery protocol to determine the next hop MAC address. This MAC address is then given as destination parameter of the MA_UNIDATA.request primitive to the L2 interface.
I couldn't figure out how this is exactly realized in GNRC.
There was a problem hiding this comment.
This is not supposed to go in the network device. GNRC's IPv6 module should take care of all of that. If the link-layer is not multicast/broadcast capable, special care needs to be taken anyway.
There was a problem hiding this comment.
This is what I feared. ESP-NOW is unfortunately a peer-to-peer network and not a meshed network 😟 That is, each message would have to be sent to each known peer as MAC unicast to simulate the broadcast. I thought I could do this hack with nib to save time by trying to figure out the peer based on IPv6 address and then only to send the message as a single unicast message. It doesn't matter if we have only 2 or 3 peers. But when the number of peers increases ...
There was a problem hiding this comment.
@miri64
You said that the whole file looks like a hack. That might be, but the ESP32 port was a big project in parallel to my regular business and I was happy to get it working with WiFi at all even if it is not yet perfect. Now, where I will have some time over the comming holiday season, I would like to improve or correct it.
Therefore, I would like to ask you to give me a short guide which modules have to be used and how to get a MAC header as the first packet snippet in the _send function of the netdev driver, especially if I have Ethernet addresses, but none MAC according to IEEE 805.14 or IEEE 802.3.
I tried again to figure out how GNRC IPv6 works with netdev_eth and enc28j60, but I'm still not sure. Do I understand it correctly that the _send function of enc28j60 receives a preformatted IEEE802.3 or Ethernet II MAC header as the first packet snippet in the parameter iolist? If so, would it be an appropriate way to change the esp_now netdev driver to be rather an adoption layer that emulates an Ethernet MAC layer over ESP-NOW and simply to use it like an netdev_eth device?
There was a problem hiding this comment.
You are right about that. The raw netif explicitly strips that header away right here: https://github.com/RIOT-OS/RIOT/blob/master/sys/net/gnrc/netif/gnrc_netif_raw.c#L97
There was a problem hiding this comment.
I got an initial (but yet fully untested beyond compiling it) version of the rework of this on https://github.com/TimoRoth/RIOT
There was a problem hiding this comment.
Am I right that the reason why ESP-NOW gets the IPv6 header as the first header instead of the netif header with the required L2 information because it creates a netif thread of type raw with function gnrc_netif_raw_create?
Yepp. (also as a side-note: the current gnrc_netif concept is a bit different and younger than the state of my master thesis)
There was a problem hiding this comment.
But to restate my comment from #10531 (comment):
The
gnrc_netif_rawimplementation was intended for link-layers without any addresses (e.g. SLIP) or were access to the link-layer address is not necessary.
There was a problem hiding this comment.
I got an initial (but yet fully untested beyond compiling it) version of the rework of this on https://github.com/TimoRoth/RIOT
Now provided as PR to discuss on #10581.
|
Just as a hint for future reference: the |
|
@miri64 Thanks 😄 |
Description
This is the first working version of the RIOT-OS port for ESP32. Even though it is the first commit, most of RIOT's features are implemented and working, see the current status below. All related tests I executed from directory tests passed. Networking is realized using either
Boards
The inital commit includes 5 board definitions:
Current status (2018-07-25)
threadinteface) is implemented and testedirqinterface) is implemented and testedperiph_gpiois implemented and testedperiph_hwrngimplemented and testedperiph_cpuidimplemented and testedperihph_timerimplemented and testedperiph_uartimplemented and testedperiph_spiimplemented and testedperiph_i2cimplemented and testedperiph_pwmimplemented and testedperiph_adcimplemented and testedperiph_dacimplemented and testedperiph_rtcimplemented and testedesp_nowesp_ethesp_canLimitations
Current work
Next steps
Issues / PRs
depends on #10145