Connect a scanner
How to bring a hiku barcode scanner back to life and connect it to Hiku Scanner. It takes about 20 minutes, most of it waiting for the scanner to download its code.
What you need
- A hiku scanner: the hiku004 (an Electric Imp imp003 inside) or the older model (an imp002 inside), with its USB cable. impCentral shows which one you have, in step 4.
- An unlocked scanner. Every hiku left the factory tied to hiku’s own Electric Imp account, and the company no longer exists, so a scanner only works if it was unlocked before. In impCentral (step 4) an unlocked scanner shows up as a development device. One that says production device is still locked and cannot take your code.
- A free Electric Imp account (impcentral.electricimp.com) and the Electric Imp app on your phone, for iOS or Android.
- A Hiku Scanner account, so the scanner has somewhere to send its scans. You log in with your J-Tools account.
1. Add the scanner here
In Settings, under Scanners, choose “Add a scanner” and give it a name. The app shows you its token once. Paste the token in the box in step 7 and the code you copy there is ready to use. The token stays in your browser.
Log in first to add a scanner.
2. Log in to impCentral
- Open impCentral with the button below and log in. It opens in a new tab, so keep this page open next to it.
- No account yet? Use the sign-up link on the login page to create a free one. A free account is enough: it includes the Development Zone, which is all you need.
- Optional: install the Electric Imp app on your phone and log in there too. You only need it for step 3 if the scanner is out of reach of your computer screen.
3. Put the scanner on your Wi-Fi (BlinkUp)
BlinkUp sends your Wi-Fi name and password to the scanner as flashes of light. You can run it from impCentral on your computer screen, or from the Electric Imp phone app.
- Plug the scanner into power with its USB cable and press its button to wake it.
- In impCentral, open the devices menu in the bar at the very top of the page and choose “BlinkUp New Device”.
- Type your Wi-Fi name (SSID) and password. The scanner only works on a 2.4 GHz network, not on 5 GHz.
- Turn the screen brightness up to maximum, then click “Start BlinkUp”. A five-second countdown starts.
- Hold the scanner against the screen and keep it steady until the flashing stops. Turn the screen away from your own eyes while it flashes, especially if flashing light bothers you.
- If nothing seems to happen, try again with the scanner in a slightly different spot on the screen and the room a little darker. The phone app does the same with your phone’s screen.
4. Check that the scanner is yours
- Open the devices menu in the top bar again and choose “My Development Devices”.
- Within a minute or so your scanner appears in the list. The DEVICE ID/NAME column shows its device ID: write it down. Click the ID to see the device’s details, including its imp type (imp003 or imp002).
- If the scanner is called a production device, or never shows up, it is still locked to hiku and you cannot go on. See “What you need” at the top.
5. Create a Product and a Development Device Group
A Product is a folder, and a Development Device Group is where a scanner and its code live. Every scanner gets its own group.
- In the breadcrumb bar under the top bar, click your account name (the first entry). Your list of Products opens.
- Click “Create New…” above the list, give the Product a name such as hiku, and save it.
- impCentral invites you to create a Development Device Group in the same go. Name it after the scanner, for example hiku-kitchen, and save it. Not asked? Point at your Product in the list, click “Development Zone” in the MANAGE column, click “Create New…” above the list of Device Groups and do it there.
- The group’s name now appears in the breadcrumb bar. For a second scanner later, create another group in the same Product.
6. Put the scanner in the group
- Open the devices menu in the top bar and choose “My Development Devices”.
- Tick the checkbox in front of your scanner and click the “Assign” button above the list. You can also click “Assign” under MANAGE on the scanner’s row.
- In the Assign Devices panel choose your account, the Product and the Device Group you just made, and confirm.
- Check it worked: open the group and click the fourth icon in the side panel, the list of devices. The scanner must be there. A scanner in the wrong group runs hiku’s old factory code and logs errors such as “i2c89”.
7. Paste the code
- Open your group: click its name in the list of Device Groups, then click the second icon in the side panel, the code editor.
- You see two code panes side by side, Device and Agent, with a log pane below them. Click in the Device pane, select everything with Ctrl+A and paste the device code. Do the same in the Agent pane with the agent code. Both panes must be completely replaced.
The imp type is in the device’s details in impCentral (step 4). The code you copy depends on it.
Optional. It is filled into the agent code when you copy it, and goes nowhere else.
Agent code
Show the code
Device code
Show the code
The code comes from the open-source hiku-device repository, where you can also read how it works. hiku-device on GitHub
8. Build and run
- Click “Build and Force Restart” at the top of the code editor. impCentral shows a SHA code once the code is deployed.
- Look at the log pane for red error lines. Warnings such as “imp.getbssid() is deprecated” are harmless.
- In the device list at the bottom left of the log pane, select your scanner, so that its log shows.
- Press the scanner’s button to wake it. The first wake takes longer while the scanner downloads the code.
- Scan any barcode. The scanner plays a sound, the log shows the scan and the app’s answer, and the scan appears on the home page of Hiku Scanner.
9. Choose what scanning does
Open the scanner in Settings to choose its default mode and location. Print the code sheet and scan a mode code to switch modes.
Another scanner? Repeat from step 1: its own name, its own token and its own Device Group.
When something does not work
- The log keeps restarting with “the index i2c89 does not exist”: the scanner is in a different Device Group than the one you pasted into. Assign it to the right group and build again.
- Warnings such as “imp.getbssid() is deprecated” are harmless.
- The button does nothing: there is no code on the scanner yet, or it crashed at start. Look at the log right after Build and Force Restart.
- It falls asleep after about 30 seconds and the button wakes it. Hold the button to wake it and scan in one go.
- Every scan gives the same low beep: the app cannot be reached or does not accept the token. Check the APP_URL and DEVICE_TOKEN lines at the top of the agent code.
- Nothing shows in the log at all: the scanner is asleep, is not in the group, or is not online. Press its button, check the group’s list of devices and look at the log again.
- The log restarts every few seconds with “the index pinQ does not exist”: you pasted the hiku004 code (imp003) onto an older scanner (imp002). Choose imp002 in step 7 and paste both panes again. With “the index i2c89 does not exist” it is the other way around, or the scanner is in the wrong group.