adafruit / adafruit/Adafruit_IO_Arduino
mac address in AdafruitIO_ethernet.h appears to be hardcoded
- Dominant language
- C++
- Stars
- 222
- Forks
- 109
- PR merge metrics
- No merged PRs in 30d
Description
I am using the Adafruit IO Arduino API example code, and trying to set the mac for my ethernet featherwing. It seems to be hardcoded in AdafruitIO_Ethernet.h to use the deadbeeffeed mac address. If I edit the hard coded one with mine, it works. (see below). The AdafruitIO_Ethernet.h file replaces the standard Ethernet.h to give the AdafruitIO support required. I can change the mac address using the standard Ethernet.h, but then I can't use the AdafruitIO credentials. There must be a better way to allow changing the mac address.
//Needed to edit this section of AdafruitIO_Ethernet.h to hard code my mac address
/**************************************************************************/
const char *connectionType() { return "ethernet_wing"; }
protected:
byte _mac[6] = {0x04, 0x91, 0x62, 0xC7, 0xF1, 0xA7};
//byte _mac[6] ={0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED}; /*!< Ethernet FeatherWing MAC Address */
EthernetClient *_client; /*!< Reference to EthernetClient, _client */
/**************************************************************************/
laurie_nz
Posts: 1
Joined: Thu Mar 11, 2021 11:36 pm
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reading AdafruitIO_Ethernet.h and the Adafruit IO Arduino Ethernet example to understand how the Ethernet client and MAC address are initialized. Done means an application can provide its own MAC address without editing the library's source while retaining Adafruit IO credentials support.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot, networking
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100