Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3667828
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T02:02:57+00:00 2026-05-19T02:02:57+00:00

I’ve been using WifiInfo.getMacAddress string as seen on my nexus one or any other

  • 0

I’ve been using WifiInfo.getMacAddress string as seen on my nexus one or any other mobile device I’ve been able to use, i.e. in the format of 01:02:03:04:05:06

But one of the users of my app just reported a crash on a Toshiba Folio100, my MAC address parsing failed. Since I’ve not any log files and the report is anonymous, I cannot contact that man, so I ask here if you know how it’s encoded in such kind of device.

I suppose it could be like 010203040506 but I’m not so confident.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T02:02:58+00:00Added an answer on May 19, 2026 at 2:02 am

    Although I can’t comment on The Toshiba Folio specifically, I would urge you to reconsider how you parse the MAC address string.

    I wrote code many years ago to get the MAC addresses from NICs in PCs – as it used the cards’ PC drivers, the format could vary depending on manufacturer. The docs for WifiInfo.getMACAddress() don’t actually give a guarantee of how this string is returned so consider preparing for all eventualities.

    I saw the following formats…

    01:02:03:04:05:06 // Delimited with ':' and padded to 2 chars
    1:2:3:4:5:6 // Delimited but if < 16, there was no leading '0'
    010203040506 // No delimiters but octets ALWAYS pre-padded with '0' when < 16
    

    NOTE: Also the alphabetic characters may have been upper or lower case (although consistent in each case, i.e., all upper or all lower case). Example…

    0A0B0C0D0E0F
    0a0b0c0d0e0f
    A:B:C:D:E:F
    a:b:c:d:e:f
    

    To cope with the above, I first forced the string toLower().

    I then checked for presence of ‘:’. If it existed I’d split the string into an array and I’d then check the length of each ‘octet string’ in the array and if length = 1 then padding wasn’t used so I’d prefix ‘0’. Finally I’d reassemble the string by concatenating each of the array elements using ‘:’ as a delimiter.

    If the string didn’t contain ‘:’ then I’d confirm that its length = 12, at this point I’d rebuild the string using each pair of characters and delimit with ‘:’.

    If the string wasn’t delimited and its length wan’t 12 then it would be impossible to parse correctly and I had to assume that requesting the MAC address string had failed and I reported a bad MAC address.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
I'm making a simple page using Google Maps API 3. My first. One marker
I have a jquery bug and I've been looking for hours now, I can't
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.