Browser settings

USB Library ›› Device ›› Settings reference ››
… visits
Parent Previous Next

Use the browser guide for a working setup. The limits below help you check whether the chosen PIC and configuration can run it.

Check these requirements first

Browser mode requires an eligible target and sufficient RAM: at least a 4096-byte shared unpaged budget on supported PIC24/dsPIC, or the eligible PIC18 J53/J94 arrangement with a 3328-byte ordinary-variable budget. It requires polling, ping-pong off, remote wake off, EP0 16, and TX/RX 64/64. More values and inputs consume additional RAM.

Setting values

Setting

Meaning and generic default

USB_NET_SUBNET

N in device 192.168.N.1 and PC 192.168.N.2; 1–254, default 7. Choose a subnet unused by other connections.

USB_NET_MAC_ID

Unique nonzero number, 1–4294967295; default 1. Generates locally administered network addresses. Also assign a unique USB serial.

USB_NET_TITLE

Built-in page title, 1–48 printable ASCII characters without <, > or &; default PIC USB Browser. Imported HTML controls its own title.

USB_NET_MAX_VALUES

Output capacity: 0 uses the single USB_NetValue; 1–16 enables that many named output slots. Default 0.

USB_NET_INITIAL_COUNT

Initial number of leading named outputs included in /status, 0 through capacity; default 0. Change at runtime using USB_NetSetCount().

USB_NET_NAME_1 … USB_NET_NAME_16

JSON output names, default value1 through value16. Each uses 1–16 ASCII letters/digits/underscores, beginning with a letter or underscore; active names must be unique, case-sensitive.

USB_NET_RX_VALUES

Browser input slots: 0 disables writes, otherwise every count 1–16. Default 0. Slots hold signed inputs until the application consumes them.

USB_NET_PAGE_MODE

0 built-in page; 1 custom pages with page 1 also at /; 2 built-in / plus named pages; 3 external HTML, data only. Default 0.

USB_NET_PAGE_COUNT

Active firmware pages, every count 1–8; default 1. Reducing it retains inactive pages in the project. Applies to modes 1 and 2.

USB_NET_CORS_ORIGIN

External-page origin; default literal null for a local HTML file. Otherwise an exact http:// or https:// origin without path/query/login/fragment, at most 96 ASCII characters.

USB_NET_CUSTOM_BYTES

Calculated total of active custom HTTP response bytes. Each response, including headers, is limited to 16384 bytes; eight can total at most 131072. Firmware and pages must still fit PIC flash. Zero in external-page mode.

Output suffix _1 maps to API index 0, and _16 to index 15. Browser input indices are separately 0 through input-count minus one; output names do not assign meaning to input slots. Your application decides what each incoming index means.

See also

Created with the Personal Edition of HelpNDoc: Bring your WinHelp HLP help files into the present with HelpNDoc's easy CHM conversion