© 2017 Nicholas Garner, N3WG, Pignology, LLC
Table of Contents
This document serves to guide Piglet (v3r2) users through the use of the device. The perspective of this guide is from the point of view of a user who has just unpackaged their Piglet.
Piglet, Copyright © 2017 by Pignology, LLC.. All rights reserved.
This product is offered to you conditioned upon your acceptance without modification of the terms, conditions, and notices contained.
You may not modify, copy, distribute, reproduce, publish, license, create derivative works from, or sell, any information, software, products or services obtained, from the Pignology, LLC website or its products.
Limitation of Liability
In no event shall Pignology, LLC be liable for any direct, indirect, punitive, incidental, special consequential damages whatsoever arising out of or connected with the use or misuse of it’s products.
This disclaimer statement is governed by the laws of the State of California, USA. You hereby consent to the exclusive jurisdiction and venue of the Courts of competent jurisdiction, USA, in all disputes arising out of or relating to the use of this product. Use of this product is unauthorized in any jurisdiction that does not give effect to all provisions of these terms and conditions, including without limitation this paragraph.
Modification of Terms and Conditions
Pignology, LLC reserves the right to change the terms, conditions, and notices under which their products are offered.
Community support for Pignology products is now provided through a groups.io mailing list. If you know the answer to a question posed by another user, please feel free to help out.
Previously, a Yahoo Group was used specifically for Piglet support. Please consider reviewing the archives of the group.
Please post new topics to the groups.io group.
External Supply Voltage
Min: 7 V
Max: 15 V
3.7 V LiPo Only
Idle: 50 mA
WiFi TX: ~80 mA
Wi-Fi Radio Characteristics
The following characteristics are from the wi-fi module datasheet.
2402 ~ 2480MHz
802.11b compatibility : DSSS(CCK-11, CCK-5.5, DQPSK-2, DBPSK- 1) 802.11g : OFDM (default)
Transmission rate (over the air)
1 – 11Mbps for 802.11b / 6 – 54Mbps for 802.11g
Output level (Class1)
-2dBm to +12dBm (configurable via software)
The Piglet uses a Silicon Labs Wi-Fi module, part number AMW037.
The product page for the AMW037 is here:
The Piglet V3R2 provides two paths to power the device, external and internal. There is a switch accessible from the outside that switches between external and internal power.
When the switch is near the terminal block (green block) the power path is connected to the external source. When the switch is away from the terminal block, the internal power path is connected. This results in providing the effect of an on/off switch when only one power source is applied.
In the event both power sources are connected, the switch will switch between the two. Regardless of switch position and power applied, if the LEDs on the inside are blinking, the device is turned on.
The Piglet v3r2 uses a screw-down terminal block for external power. There is a reverse voltage protection diode in the device however, always observe proper polarity while attaching the device to power.
The terminal block has the positive terminal marked with red.
The voltage input range is 5-15 V.
This connector is manufactured by On Shore Technology, part number OSTTJ0231530.
The v3r2 Piglet includes a JST connector for an internal LiPo battery.
A LiPo battery is not provided. As well, there is no charging circuitry on-board. These were omitted for liability reasons.
The battery must be affixed to the top half of the enclosure to ensure it does not contact the circuit board. A small piece of adhesive hook & loop works well.
Standard LiPo batteries for hobby purposes work well.
Observe precautions for charging rates when using the USB connected chargers with small LiPo batteries.
Piglets are shipped configured as a soft WiFi Access Point. The Piglet is also configured to act as a DHCP server. Your mobile device running HamLog will join the WiFi network created by the Piglet.
Open the Settings Application on your device and go to Wi-Fi. Select "Piglet" as the wireless network you wish to join. The password for the WiFi network is “password”. Your device will automatically be assigned an IP address from the 10.1.1.0/24 subnet. The pre-configured IP address of the Pigtail is 10.1.1.1.
When you navigate to the Pigtail tool within HamLog, it will still auto-discover the Piglet and show the address 10.1.1.1.
The Piglet contains a 3 position DIP switch.
On the PCB, around the base of the DIP switch, in white letters, are indications of what each switch does. The three switches are for Pin 4 Power, CTS/RTS Loop, and Config.
When the #1 switch is closed and power it turned on to the device, it will put the WiFi module into setup mode.
Switch #2 loops the CTS and RTS pins on the RS-232 connection. This jumper was added because Kenwood radios require RTS pin to be high before it will respond to commands. By looping CTS back to RTS we can fool the radio into thinking it's getting the signal from the Pigtail.
Switch #3 provides the Pin 4 Power to provide 3.3V to Pin 4 of the DE9 connector.
DO NOT RECONFIGURE YOUR PIGLET FROM THE WIFI SIDE OF THE DEVICE, ONLY DO IT FROM THE SERIAL SIDE WITH A NULL MODEM ADAPTER AS DESCRIBED BELOW.
There are two bus modes in the AMW037 module, command mode and stream mode. In stream mode, the module is ready to either accept incoming connections or initiate outgoing connections. To configure the parameters and/or to view the current configuration, the module must be put into command mode. At any given time, the module will either be in command mode or in stream mode.
Upon power up, the device will be in stream mode. To enter command mode, enter the escape sequence (set to three characters, $$$ by default) must be sent.
NOTE: There is no carriage return (<cr>) after the $$$ to enter command mode.
For example: To enter command mode from data mode, you need to send:
$$$ - The module will respond with CMD indicating it is in command mode.
$$$<cr> - The module may not enter command mode.
If manipulating the wifi settings, it's recommended to only do change the settings from the serial side of the device with a USB serial adapter and a null modem cable/adapter. If any mistakes are made in the wifi config, you'll be locked out of the device until you connect to the serial side.
Connect to the Piglet with a standard RS-232 USB serial adapter and a null modem connector. The default baud rate is 38400 (8-N-1).
This is the default configuration on all Piglet V3R2s.
set softap.auto_start 1
set softap.channel 3
set softap.dhcp_server.enabled 1
set softap.idle_timeout 60
set softap.ssid Piglet
set softap.static.ip 10.1.1.1
set softap.static.netmask 255.255.255.0
set remote_terminal.enabled 1
set remote_terminal.port 2000
set tcp.server.auto_start 1
set tcp.server.data_gpio 1
set tcp.server.idle_timeout 60
set tcp.server.port 7373
set bus.mode stream
set tcp.server.connected_gpio 1
set broadcast.udp.port 7373
set broadcast.interval 5
set broadcast.interface softap
set bus.stream.flush_time_reset 1
set bus.stream.flush_time 200
set bus.stream.flush_count 512
set tcp.server.connected_gpio 1
set system.indicator.gpio softap 3
set system.indicator.gpio network 2
set uart.baud 0 38400
Infrastructure mode is used when you have an existing wireless network that you would like to connect to, for example your home network.
Enter command mode on the Pigtail by pressing $ (shift-4) three times, as in $$$. Then apply the following commands. If any mistakes are made or
the Pigtail cannot join the network you specify for whatever reason, you'll need a computer with a serial port, a serial cable and a null modem adapter
to troubleshoot it.
This configuration examples will join the home WPA network named "MyHomeNet" and turn on DHCP (client) to automatically acquire an IP address.
set wlan.ssid watchnu3
set wlan.pass thisisasecretkey
set wlan.auto_join.enabled 1
To update the firmware, the Piglet must be connected to a wi-fi access point with access to the Internet. See Infrastructure Mode section for a configuration example of joining your home wi-fi network.
Once you're on the wi-fi network with internet access, get connected to the Piglet either through the serial port or by telnetting into the device on port 7373 if you know its IP address.
The command to update the firmware is ota.
Connecting to network
Obtaining IPv4 address via DHCP
Request POST /ota
Connecting (https): ota.zentri.com:443
IPv4 address: 10.1.1.163
Bundle size: 491250
Bundle version: PIGN73-PL32-184.108.40.206, 2017-10-13T20:52:55Z, ZentriOS-WL-220.127.116.11
Bundle ID: 376a29d4-a2f5-45b7-a84f-f2f53195e834
Downloading new firmware...
Downloading: ZentriOS-WL (OK)
Setting boot image
Booting to new image
[Associating to watchnu3]
Obtaining IPv4 address via DHCP
Posting OTA result to DMS
Request POST /ota/result
Connecting (https): ota.zentri.com:443
IPv4 address: 10.1.1.163
OTA completed successfully
The WiFi module can be reset to factory defaults.
NOTE: This reset removes all Piglet specific configuration.
You must determine the MAC address of the module and use that as input to the factory reset command.
> get wlan mac
> factory_reset 4C:55:CC:14:F5:88
PIGN73-PL32-18.104.22.168, 2017-10-13T20:52:55Z, ZentriOS-WL-22.214.171.124, Board:N/A
This will reset the baud rate to 115200. Modify your terminal program to set the baud rate of your serial port to 115200 then re-enter CMD mode and apply the default Piglet config.
Apply the default configuration:
The Piglet ships with the baud rate set to 38400. You can modify this. You'll need to enter config mode of the Wi-Fi module to make the change. This can be done within HamLog using the Terminal button from Tools->Pigtail. Once you're connected to the Pigtail/Piglet via the Terminal enter these commands and hit send on each one.
CMD> set uart.baud 0 4800
After hitting send on "set uart..." you should get back a response of "OK". You'll lose connectivity to the Piglet when you reboot. You'll need to modify your radio's baud rate so they can talk. NOTE: This will not speed up HamLog getting the freq/mode/options. That happens via a Timer that sends to TCP to get to the Wi-Fi module. Once it's in the Wi-Fi module, then the baud rate comes into play.
The Pigtail has been tested with the following radios. Note that the Piglet ships with a default baud rate on the UART of 38400.
The KIO2 module has a fixed baud rate of 4800. A straight through serial cable is needed for the connection. The KIO2 manual mentions that a special cable is needed because the KIO2 doesn't have standard RS-232 signals on all pins. For example, Pin 4 on the KIO2 is described as "Automatic Level Control from an external amp to the SSB adapter."
THE PIN 4 POWER and RTS/CTS LOOP JUMPERS MUST NOT BE SHORTED IN THE PIGTAIL!!!
Outside of pins 2, 3, 4 and 5 the Pigtail leaves the other pins unconnected so a standard serial cable, not necessarily the one put together when building the KIO2, should work provided the Pin 4 Power jumper is left off. Seriously, don't have that switch closed and connect this to the K2, mine smoked and yours will too.
The KIO3 module in the K3 has a user selectable baud rate. The default baud rate is 38400 as is the Piglet. A straight through serial cable can be used to connect to the K3. You do not need the Pin4 Power jumper to be in place.
The connection made from the KX3 to the Pigtail will be via the KXSER cable supplied by Elecraft. The KXUSB cable will not work. You may need to change the baud rate of the KX3 serial port to 38400. This can be done in MENU:RS232.
If you have a KXPA100, when this is enabled on the KX3 the RS232 menu item has no effect and the baud rate is hard set to 38400.
The default baud rate on the CAT interface of the Yaesu FT-817 is 4800. You’ll need to modify this baud rate or the baud rate on the Piglet. The Yaesu branded CT-62 cable can be used to connect to the radio. You do not need the Pin4 Power jumper to be in place.
These radios use the new Yaesu CAT command set. The Piglet’s default baud rate is 38400. You'll need to set the CATRATE menu item to 38400(or modify the Pigletl). The menu item CAT RTS may need to be disabled or, as another option, you can set the CTS/RTS jumper inside the Pigtail.
You do not need the Pin 4 power jumper in place for Kenwood radios. You do need the CTS/RTS Loop jumper in place. See the DIP Switch section in this manual to determine which switch needs to be closed . Ensure the baud rate on your Kenwood radio is set to 38400.
If you will be using the CW Sending feature in HamLog you will need to enable VOX on the radio.
Support for Icom radios is only via either the Icom branded CT-17 box or the Piglet CT-17 adapter board (available at http://shop.pignology.net). The Pin 4 Power jumper needs to be in place to provide power to the CT-17 adapter.
The original version of HamLog that supported Icom Ci-V had a fixed address of 58H that had to be configured on the radio. The latest version of HamLog allows you to specify the Ci-V address to use. It still defaults to 58H.
The following needs to occur for Icom connectivity using the Pignology CT-17 adapter to HamLog:
After connecting to the same Wi-Fi network as the Piglet (or if you're going remote) open HamLog.
1. Click Tools and then select the Pigtail tool.
2. Wait a few seconds for the Piglet to be discovered.
3. Select the radio type and sub-type and then click the row in the table that corresponds to the Piglet you want to connect to.
4. Head back to the main contacts list screen and click + to add a contact.
5. You should see the PTA icon show up. If HamLog successfully connects to the Pigtail the icon will be green.
6. If your radio is on and connected, HamLog should start asking the radio for its current frequency, mode and options (pre, agc, att, etc.).
7. Press the Pigtail button in the Toolbar to display the controller screen.
These screens are different for the different radio types. It's based on the capabilities offered by the radio manufacturers.
1. Open the Settings on your device and go to Wi-Fi settings. After a second you should see the network "Piglet". Select that (Password: password). After a few seconds you should be assigned an IP address. It will most likely be 10.1.1.2.
2. Open HamLog and go to the Tools menu.
3. Scroll down and select Pigtail.
4. Out of the box the Pigtail's IP address is 10.1.1.1. I'm unable to do the same auto-discovery in Android so you'll have to manually enter the address. Then select your radio manufacturer and model. Then hit save. Unlike iOS, the Pigtail settings are saved and reused. If you are ever logging and need to disable the Pigtail, just click Disable here. If you have the Pigtail configured and the device can't connect it will disable it for this contact.
5. Head back to the main contact list and add a contact.
6. HamLog will attempt to connect to the Pigtail based on the IP address you entered. Note the baud rate information listed above. The Pigtail defaults to 4800 baud. You might need to adjust your radio to match this rate, or change the Pigtail's baud rate. The freq and mode should populate after about 1 second. Up top there is a button labeled "PT". Click this will take you to the control screen.
7. This is the FT-817 control screen. You can change band/mode using the drop down buttons.
8. The Elecraft radios have a CW/Data Terminal button at the bottom.
9. This is the CW/Data Terminal. HamLog will query the radio for decoded CW or Data and it will show in the in the Received Text field. You can type in the Send field and hit send to have the radio transmit what you've typed.
Using USB Serial Adapters with HamLog on Android is currently in beta. The functionality in there is the same as when using the Pigtail hardware device described above.
To use this you need some adapters. You'll need a Micro USB Host Adapter and a USB Serial Adapter. I have the Micro USB Host adapter available in my store here: http://shop.pignology.net. I'm grateful for the support if purchased here however if you prefer to purchase from another online retailer, they can be found easily on Amazon.
When everything is connected up, it looks like this:
The USB Serial adapter can be either FTDI or Prolific however I have not tested with Prolific.
The following screenshots are from HamLog running on a Samsung Galaxy S III.
Ensure you have the latest version of HamLog installed by checking for an update in the Android Play Store.
Plug in your USB to serial adapter using the Micro USB OTG Host Cable. You will see the following question pop up. HamLog is configured to advertise it's ability to use USB Serial Adapters. If you wish to always open HamLog when connecting this adapter, click the "Use by default..." check box and click okay.
HamLog will be opened when you press okay. If you checked the box to use by default, HamLog will be opened whenever you connect the USB Serial adapter.
Click on the Tools tab and select the Pigtail item.
In the Pigtail settings select your radio manufacturer and model, click the Use Serial check box and select the baud rate you want to use. The baud should match the baud rate setting of the radio. Hit save.
You will be presented with a one time information screen. Click okay.
Head back to the main screen and add a contact. HamLog will open the serial port when you add a contact and start querying your radio through the USB serial port.
If you want to verify it's working, if you have another USB serial adapter for your computer and a null modem adapter, you can connect your Android device to your computer and monitor the communication. Ensure you have the same baud rate on both sides. The following screenshot shows the commands being sent for an Elecraft KX3.
Please follow these steps to troubleshoot your Piglet connection.
1. When you turn the Piglet on (default, as shipped state), it blinks red and green when no client is associated with the soft Access Point created by the Pigtail. The IP address of the Pigtail is 10.1.1.1/24. NO
2. Opening the settings app on the iPad, do you see the Piglet WiFi network listed on the wifi selection screen?
If not, there may be a configuration issue on the Pigtail. Take a look at the As-shipped Configuration section.
3. If you click on that "Piglet", a check mark should show up next to it after a few seconds. This indicates a successful connection to the Piglet WiFi network.
4. In the same screen, if you click the little ">" symbol on the right, while connected to the Pigtail it should dig down into the network settings for the wireless network.
5. Is there an address in there? It will probably be 10.1.1.2. If not, press the back button and wait about 10 seconds. Re-check for an address. It should assign itself one after a few seconds.
6. What is it and what is the subnet mask?
The address of the iPad should be 10.1.1.2 and the subnet mask should be 255.255.255.0.
7. Open HamLog. Click Tools->Pigtail. After about 10 seconds you should see an entry in the Pigtail list, most likely it will be 10.1.1.1. If the Piglet never shows up, something's wrong. I, N3WG, have never seen this happen so we should chat. Get in touch via email@example.com.
8. Click your radio manufacturer, click your radio, click on the discovered Piglet.
The text at the top of the screen should change to: Selected: 10.1.1.1 (Manufacturer)
9. Click the back button a couple times to get back to the main log screen. Click + to add a contact.
10. The Piglet should connect and a green checkmark should appear. If it fails to connect there will be an informative message that pops up that says why.
13. If the freq and mode fields are not auto-populated, check the baud rate settings on your radio. It should be 38400.
14. If the freq and mode fields are not auto-populated, reboot your radio. This issue has been observed on certain Elecraft radios that need to be turned on after the Piglet is connected.
15. If the freq and mode fields are not auto-populated and you're connecting to an Icom radio, is the radio set to Ci-V address 58H? Alternatively, did you modify HamLog to change the Ci-V address?
16. If the freq and mode fields are not auto-populated and it's an Icom radio and you're using the CT-17 adapter from Pignology, is the Pin 4 Power jumper installed?
17. If you get an error message about an issue with QRZ, this is because the device cannot talk to the Internet while connected to the Pigtail.
This would only happen if you have a device that does not have a backup 3G/4G connection. You can stop these errors two ways:
Reason for Change