Random Name Picker App Mac

Got an idea for another Random Name Picker? Or Number Generator? Let us know!:-). Stay On Top App - Download a Stopwatch and Countdown timer that stays on top of all open windows. Download - Download the Online Stopwatch Application for your PC or MAC. Timer - Set a Timer from 1 second to over a year! Big screen countdown; Join NOW! How to pick a random name or winner from a list of names? In this video you will learn how to use our random name picker app. You can use our winner picker t.

Software reset¶

Mac

To perform software reset of the chip, esp_restart() function is provided. When the function is called, execution of the program will stop, both CPUs will be reset, application will be loaded by the bootloader and started again.

Additionally, esp_register_shutdown_handler() function is provided to register a routine which needs to be called prior to restart (when done by esp_restart()). This is similar to the functionality of atexit POSIX function.

Reset reason¶

ESP-IDF application can be started or restarted due to a variety of reasons. To get the last reset reason, call esp_reset_reason() function. See description of esp_reset_reason_t for the list of possible reset reasons.

Heap memory¶

Two heap memory related functions are provided:

  • esp_get_free_heap_size() returns the current size of free heap memory

  • esp_get_minimum_free_heap_size() returns the minimum size of free heap memory that was available during program execution.

Note that ESP-IDF supports multiple heaps with different capabilities. Functions mentioned in this section return the size of heap memory which can be allocated using malloc family of functions. For further information about heap memory see Heap Memory Allocation.

Random number generation¶

ESP32 contains a hardware random number generator, values from it can be obtained using esp_random().

When Wi-Fi or Bluetooth are enabled, numbers returned by hardware random number generator (RNG) can be considered true random numbers. Without Wi-Fi or Bluetooth enabled, hardware RNG is a pseudo-random number generator. At startup, ESP-IDF bootloader seeds the hardware RNG with entropy, but care must be taken when reading random values between the start of app_main and initialization of Wi-Fi or Bluetooth drivers.

MAC Address¶

These APIs allow querying and customizing MAC addresses for different network interfaces that supported (e.g. Wi-Fi, Bluetooth, Ethernet).

To fetch MAC address for a specific interface (e.g. Wi-Fi, Bluetooth, Ethernet), call the function esp_read_mac() function.

In ESP-IDF these addresses are calculated from a single Base MAC address. By default, the Espressif base MAC address is used. This MAC is pre-programmed into ESP32 eFuse from the factory.

Interface

MAC address(4 universally administered, default)

MAC address(2 universally administered)

Wi-Fi Station

base_mac

base_mac

Wi-Fi SoftAP

base_mac, +1 to the last octet

Local MACderived from Wi-Fi Station MAC)

Bluetooth

base_mac, +2 to the last octet

base_mac, +1 to the last octet

Ethernet

base_mac, +3 to the last octet

Local MAC(derived from Bluetooth MAC)

Note

The default configurationis 4 universally administered MAC addresses, and this is recommended when usingEspressif-provided MAC addresses.

Custom Base MAC¶

The default Base MAC is pre-programmed by Espressif in eFuse BLK0. To set a custom Base MAC instead, call the function esp_base_mac_addr_set() before initializing any network interfaces or calling the esp_read_mac() function. The customized MAC address can be stored in any supported storage device (e.g. Flash, NVS, etc).

The custom base MAC addresses should be allocated such that derived MAC addresses will not overlap. Configure the option CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES to set the number of valid universal MAC addresses that can be derived from the custom base MAC, according to the table above.

Note

It is also possible to call the function esp_netif_set_mac() to set the specific MAC used by a network interface, after network initialization. It’s recommended to use the Base MAC approach documented here instead, to avoid the possibility of the original MAC address briefly appearing on the network before it is changed.

Custom MAC address in eFuse¶

When reading custom MAC addresses from eFuse, ESP-IDF provides a helper function esp_efuse_mac_get_custom(). This loads the MAC address from eFuse BLK3. This function assumes that the custom base MAC address is stored in the following format:

Field

# of bits

Range of bits

Notes

Version

8

191:184

0: invalid, others — valid

Reserved

128

183:56

MAC address

48

55:8

MAC address CRC

8

7:0

CRC-8-CCITT, polynomial 0x07

Once MAC address has been obtained using esp_efuse_mac_get_custom(), call esp_base_mac_addr_set() to set this MAC address as base MAC address.

Local vs Universal MAC addresses¶

ESP32 comes pre-programmed with enough valid Espressif universally administered MAC addresses for all internal interfaces. The specific calculations to derive an interface’s MAC address from the base MAC address is shown in the table above..

When using a custom MAC address scheme, it’s possible that not all interfaces can be assigned a universally administered MAC address. In these cases, a locally administered MAC address is assigned. Note that these addresses are intended for use on a single local network, only.

See this article for the definition of local and universally administered MAC addresses.

Function esp_derive_local_mac() is called internally to derive a local MAC address from a universal MAC address. The process is as follows:

  1. The U/L bit (bit value 0x2) is set in the first octet of the universal MAC address, creating a local MAC address.

  2. If this bit is already set in the supplied universal MAC address (meaning: the supplied “universal” MAC address was in fact already a local MAC address), then the first octet of the local MAC address is XORed with 0x4.

Random name picker app download

Chip version¶

esp_chip_info() function fills esp_chip_info_t structure with information about the chip. This includes the chip revision, number of CPU cores, and a bit mask of features enabled in the chip.

SDK version¶

esp_get_idf_version() returns a string describing the IDF version which was used to compile the application. This is the same value as the one available through IDF_VER variable of the build system. The version string generally has the format of gitdescribe output.

To get the version at build time, additional version macros are provided. They can be used to enable or disable parts of the program depending on IDF version.

  • ESP_IDF_VERSION_MAJOR, ESP_IDF_VERSION_MINOR, ESP_IDF_VERSION_PATCH are defined to integers representing major, minor, and patch version.

  • ESP_IDF_VERSION_VAL and ESP_IDF_VERSION can be used when implementing version checks:

App version¶

Application version is stored in esp_app_desc_t structure. It is located in DROM sector and has a fixed offset from the beginning of the binary file.The structure is located after esp_image_header_t and esp_image_segment_header_t structures. The field version has string type and max length 32 chars.

To set version in your project manually you need to set PROJECT_VER variable in your project CMakeLists.txt/Makefile:

  • In application CMakeLists.txt put set(PROJECT_VER'0.1.0.1') before including project.cmake.

(For legacy GNU Make build system: in application Makefile put PROJECT_VER='0.1.0.1' before including project.mk.)

If CONFIG_APP_PROJECT_VER_FROM_CONFIG option is set, the value of CONFIG_APP_PROJECT_VER will be used. Otherwise if PROJECT_VER variable is not set in the project then it will be retrieved from either $(PROJECT_PATH)/version.txt file (if present) else using git command gitdescribe. If neither is available then PROJECT_VER will be set to “1”. Application can make use of this by calling esp_ota_get_app_description() or esp_ota_get_partition_description() functions.

API Reference¶

Functions¶

esp_err_tesp_register_shutdown_handler(shutdown_handler_thandle)

Register shutdown handler.

This function allows you to register a handler that gets invoked before the application is restarted using esp_restart function.

Return
  • ESP_OK on success

  • ESP_ERR_INVALID_STATE if the handler has already been registered

  • ESP_ERR_NO_MEM if no more shutdown handler slots are available

Parameters
  • handle: function to execute on restart

esp_err_tesp_unregister_shutdown_handler(shutdown_handler_thandle)

Unregister shutdown handler.

This function allows you to unregister a handler which was previously registered using esp_register_shutdown_handler function.

Random Name Picker App Mac
  • ESP_OK on success

  • ESP_ERR_INVALID_STATE if the given handler hasn’t been registered before

void esp_restart(void)

Restart PRO and APP CPUs.

This function can be called both from PRO and APP CPUs. After successful restart, CPU reset reason will be SW_CPU_RESET. Peripherals (except for WiFi, BT, UART0, SPI1, and legacy timers) are not reset. This function does not return.

esp_reset_reason_tesp_reset_reason(void)

Get reason of last reset.

Return

See description of esp_reset_reason_t for explanation of each value.

uint32_t esp_get_free_heap_size(void)

Get the size of available heap.

Note that the returned value may be larger than the maximum contiguous block which can be allocated.

Return

Available heap size, in bytes.

uint32_t esp_get_free_internal_heap_size(void)

Get the size of available internal heap.

Note that the returned value may be larger than the maximum contiguous block which can be allocated.

Return

Available internal heap size, in bytes.

uint32_t esp_get_minimum_free_heap_size(void)

Get the minimum heap that has ever been available.

Return

Minimum free heap ever available

void esp_system_abort(const char *details)

Trigger a software abort.

Parameters

Random Name Picker App For Pc

  • details: Details that will be displayed during panic handling.

Type Definitions¶

typedef void (*shutdown_handler_t)(void)

Shutdown handler type

Enumerations¶

enum esp_reset_reason_t

Reset reasons.

Values:

ESP_RST_UNKNOWN

Reset reason can not be determined.

ESP_RST_POWERON

Reset due to power-on event.

ESP_RST_EXT

Reset by external pin (not applicable for ESP32)

ESP_RST_SW

Software reset via esp_restart.

ESP_RST_PANIC

Software reset due to exception/panic.

ESP_RST_INT_WDT

Random Name Picker Wheel

Reset (software or hardware) due to interrupt watchdog.

ESP_RST_TASK_WDT

Reset due to task watchdog.

ESP_RST_WDT

Reset due to other watchdogs.

ESP_RST_DEEPSLEEP

Reset after exiting deep sleep mode.

ESP_RST_BROWNOUT

Brownout reset (software or hardware)

ESP_RST_SDIO

Reset over SDIO.

Functions¶

const char *esp_get_idf_version(void)

Return full IDF version string, same as ‘git describe’ output.

Note

If you are printing the ESP-IDF version in a log file or other information, this function provides more information than using the numerical version macros. For example, numerical version macros don’t differentiate between development, pre-release and release versions, but the output of this function does.

Return

constant string from IDF_VER

Macros¶

ESP_IDF_VERSION_MAJOR

Major version number (X.x.x)

ESP_IDF_VERSION_MINOR

Minor version number (x.X.x)

ESP_IDF_VERSION_PATCH

Patch version number (x.x.X)

ESP_IDF_VERSION_VAL(major, minor, patch)

Macro to convert IDF version number into an integer

Free Random Name Picker App

To be used in comparisons, such as ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)

ESP_IDF_VERSION

Current IDF version, as an integer

Names

To be used in comparisons, such as ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, 0, 0)

About Random Name Picker

This tool allows you to quickly pick a random name (winner) from a list of names.

How to use Random Name Picker Video

FAQ

Our team ever tested 200k names, which cost the server 10-15 seconds to generate the winner. 100k names will cost 5 seconds. If your list is less than 50k names, it should get the winner instantly.

Yes, it is quite random. It is because we use server-side, not Javascript from users' local computers, to generate the random winner. And with our innovative 3-step Randomness Process Certification, it is almost impossible to change the winner by a person or malicious code.

When you click Pick a Random Name button, the tool will submit all names line by line to our server. Then our server will use Python random module to generate one pseudo-random number between 1 to total names. Then it will choose the name with this random number as a winner.

Both are the same from the technical part - the random function from Python and Javascript both generate pseudo-random numbers.

However, it is a different story on actual real-world operations:

If using random function from Javascript, as the full source codes are stored on users' local computers, it is impossible to prevent a malicious code or any person from doing something to bypass the random function and set a value to the 'winner' directly. It can happen in the background process, which other people can not see on the screen. It is something which the developers can not control.

Random Name Picker App Machine

We don't want that somebody use our tool to raffle off a prize, but bypass the random process, and record a video to say, 'Hey, we picked a random winner by a tool from miniwebtool.com.' So we choose a server-side solution.

By using server-side random function, the only thing that the malicious code or a person can change is the data source. For this situation, you can use our 3-step Randomness Process Certification to prove that the whole process is clean and 'random.'

If you use Random Name Picker for raffles, contests, drawings, giveaways, and promotions, etc., you are encouraged to enable 3-step Randomness Process Certification function to improve your credibility.

For example, you use the name picker to raffle off a prize to 99 people from John Doe No. 001 to 099:

The winner is John Doe No. 090, here is Demo of The Server-side Certification Link.

Our server will store a part of the information, including the winner's name (asterisked), total names, timestamp, and a SHA512 hash code.

This is step 1. When you give this link and the full winner name to your attendees, most people will trust that your raffle is random.

However, what if somebody doesn't like the winner, and want to check whether there are many duplicate John Doe No. 090 in your original name list?

In this case, you can go to step 2 to download your client-side certification file to prove that your data source has no error. Here is Demo of The Client-side Certification File link.

Finally, what if another John Doe doubt you have modified the file?

You can let him go to step 3, use our SHA512 Hash Generator to check the downloaded file. The SHA512 hash code should be the same if the file did not be changed.

A person can use a fake screenshot or video to change the winner name from local computers, but can not change the information stored on our server. With the firmly secure SHA512 Hash, It is almost inconceivable that any modified file can pass step 3 verification.

It is the reason that you can gain more credibility using our 3-step randomness process certification.

The 3-step Randomness Process Certification is totally FREE, like all our tools. We appreciate all the users who helped us to develop our tools all the time. If you think this tool is pretty good, please share this tool with your friends or add a link on your website.

Random Name Generator App

Yes, it is easier from technical part but we can not do it due to our privacy policy. We never store any data visitors submit, because the data may contain lots of personal information. We recognize that the privacy of everybody's personal information is essential.

Please uncheck 3-step Randomness Process certification when you submit the form. Then you will only see the winner name on the result. By default it is unchecked. And the web page will remember your last check with cookie technique.

Some users want to use the picker many times with the same name list; for example, teachers pick up a name from students. So we use the HTML5 Web Storage technique to make their life easier. With web storage, web applications can store data locally within the user's browser. If you use a public computer and do not want your names stored, you can use private or incognito window from your browser or submit another some Meaningless text. (We only use web storage to store the last submitted information.)

No, the tool only removes all empty lines. Some users want to use duplicate names to increase somebody's opportunity to win the random game. For example, a teacher may want to give an individual student more chance for an activity or assignment in school classes. We respect users' opinion, so never change the data sources before picking a random winner. If you want to remove duplicate names from your list, you can use our other powerful Remove Duplicate Lines tool.
This Random Name Picker is designed as a PWA (Progressive Web App). You can install it on your home screen if your device and browser support PWA.

Random Name Picker Fruit Machine

Yes. We made an offline version through PWA. Once you install it, you can still launch Random Name Picker from your devices when you are offline. Please note we don't provide certification for the offline version because it is using random function from Javascript, not server-side.