Hi, see [1]. If you want get fix it yourself, you can extend `_get` as such, that it returns the length in byte of `cc110x->radio_address` (which would be 1 in the cc110x case) as a uint16_t [2] on that opt value and provide a PR for it [3]. I think in the end that would be the faster alternative.
In general, I don't know if anyone ever tested NDN over cc110x (we usually use IEEE 802.15.4 devices), so expect more errors the way done ;-). But I think it's good that somebody finally does that work. Cheers, Martine [1] https://github.com/RIOT-OS/RIOT/issues/8105 [2] http://doc.riot-os.org/group__net__netopt.html# gga19e30424c1ab107c9c84dc0cb29d9906a4213c9495ff4bed3e0d076e348d86c24 [3] https://github.com/RIOT-OS/RIOT/blob/master/CONTRIBUTING.md 2017-11-22 11:16 GMT+01:00 Martine Lenders <[email protected]>: > Hi, > > see [1]. If you want get fix it yourself, you can extend `_get` as such, > that it returns the length in byte of `cc110x->radio_address` (which would > be 1 in the cc110x case) as a uint16_t [2] on that opt value and provide a > PR for it [3]. I think in the end that would be the faster alternative. > > In general, I don't know if anyone ever tested NDN over cc110x (we usually > use IEEE 802.15.4 devices), so expect more errors the way done ;-). But I > think it's good that somebody finally does that work. > > Cheers, > Martine > > > [1] https://github.com/RIOT-OS/RIOT/issues/8105 > [2] http://doc.riot-os.org/group__net__netopt.html#gga19e304 > 24c1ab107c9c84dc0cb29d9906a4213c9495ff4bed3e0d076e348d86c24 > [3] https://github.com/RIOT-OS/RIOT/blob/master/CONTRIBUTING.md > > 2017-11-22 4:46 GMT+01:00 Sichen Zhao <[email protected]>: > >> Hi, >> >> i use a cc1101 module to connect with nucleo-144 f429, when i test the >> example of ccn-lite-relay, it came out an error: >> >> error: unable to determine address length for if=<3> >> Error registering at network interface! >> >> The error cames from: ccn-lite-riot.c >> >> res = gnrc_netapi_get(if_pid, NETOPT_ADDR_LEN, 0, &(i->addr_len), >> sizeof(i->addr_len)); >> if (res < 0) { >> DEBUGMSG(ERROR, "error: unable to determine address length for >> if=<%u>\n", (unsigned) if_pid); >> return -ECANCELED; >> } >> >> In the file of cc110x-netdev.c, the _get function doesn't have the case >> for NETOPT_ADDR_LEN: >> >> static int _get(netdev_t *dev, netopt_t opt, void *value, size_t >> value_len) >> {printf("_get\n"); >> cc110x_t *cc110x = &((netdev_cc110x_t*) dev)->cc110x; >> >> switch (opt) { >> case NETOPT_DEVICE_TYPE: >> assert(value_len == 2); >> *((uint16_t *) value) = NETDEV_TYPE_CC110X; >> return 2; >> #ifdef MODULE_GNRC_NETIF >> case NETOPT_PROTO: >> assert(value_len == sizeof(gnrc_nettype_t)); >> *((gnrc_nettype_t *)value) = cc110x->proto; >> return sizeof(gnrc_nettype_t); >> #endif >> case NETOPT_CHANNEL: >> assert(value_len > 1); >> *((uint16_t *)value) = (uint16_t)cc110x->radio_channel; >> return 2; >> case NETOPT_ADDRESS: >> assert(value_len > 0); >> *((uint8_t *)value) = cc110x->radio_address; >> return 1; >> case NETOPT_MAX_PACKET_SIZE: >> printf("NETOPT_MAX_PACKET_SIZE\n"); >> assert(value_len > 0); >> *((uint8_t *)value) = CC110X_PACKET_LENGTH; >> return 1; >> case NETOPT_IPV6_IID: >> return _get_iid(dev, value, value_len); >> default: >> break; >> } >> >> return -ENOTSUP; >> } >> >> So how to fix it? >> >> Best Regards >> Sichen Zhao >> _______________________________________________ >> users mailing list >> [email protected] >> https://lists.riot-os.org/mailman/listinfo/users >> > >
_______________________________________________ users mailing list [email protected] https://lists.riot-os.org/mailman/listinfo/users
