Hello,
How can i get the mac address from my cc3100?
Thank you.
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hello,
How can i get the mac address from my cc3100?
Thank you.
Hi Miguel,
We provided API documentation and example applications in the SDK for your reference. Please take a look at these.
To get the MAC address, please check this documentation here.
easier with this code
#include <SPI.h> #include <WiFi.h> char ssid[] = "yourNetwork"; // the name of your network int status = WL_IDLE_STATUS; // the Wifi radio's status byte mac[6]; // the MAC address of your Wifi shield void setup() { Serial.begin(9600); status = WiFi.begin(ssid); if ( status != WL_CONNECTED) { Serial.println("Couldn't get a wifi connection"); while(true); } // if you are connected, print your MAC address: else { WiFi.macAddress(mac); Serial.print("MAC: "); Serial.print(mac[5],HEX); Serial.print(":"); Serial.print(mac[4],HEX); Serial.print(":"); Serial.print(mac[3],HEX); Serial.print(":"); Serial.print(mac[2],HEX); Serial.print(":"); Serial.print(mac[1],HEX); Serial.print(":"); Serial.println(mac[0],HEX); } } void loop () {}
Hi Miguel,
You are expected to have a certain level of programming skill if developing with TI's product.
In the printing you have above, it's omitting the "0" in front of the "4" because of the way how trimming works when printing a string. This is a very fundamental string representation mechanism in almost all programming languages.