Here are some notes from experiments with dwc2 otg enabled on a Raspberry Pi Zero.
Raspberry Pi dwc2 Gadget Notes
read more → Message Queue Link Dump
read more →We use Redis fairly heavily for Adafruit IO, and I started wondering if there might be some better/faster options for our MQTT Redis message queue. It looks like there are many options that are much faster than Redis.
Redis Killed by OS?
read more →Redis Server has been killed a few times this week by the OOM. More info in this post on stackoverflow.
After setting the
maxmemory
limit to 3GB, andmaxmemory-policy
toallkeys-lru
, things should have gotten better. For some reason node.js workers would die as soon as they were restarted, reporting that they couldn’t connect to Redis.Starting the process manually would connect successfully, so the problem seemed to be with pm2, which manages the node cluster.
Fix
I tried killing
pm2
by running the following command.$ pm2 kill
Then, I restarted the node cluster, and everything was back to normal.
$ sudo service io-server-cluster restart
Copy Raspbian Image to SD Card with Progress Bar on OS X
read more →Find the SD card using
diskutil list
:todd:~ todd$ diskutil list /dev/disk0 #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *251.0 GB disk0 1: EFI EFI 209.7 MB disk0s1 2: Apple_CoreStorage 250.1 GB disk0s2 3: Apple_Boot Recovery HD 650.1 MB disk0s3 /dev/disk1 #: TYPE NAME SIZE IDENTIFIER 0: Apple_HFS Macintosh HD *249.8 GB disk1 Logical Volume on disk0s2 5931BF6D-C779-4723-94C6-5831AF22BC00 Unlocked Encrypted /dev/disk2 #: TYPE NAME SIZE IDENTIFIER 0: Apple_partition_scheme *17.5 MB disk2 1: Apple_partition_map 32.3 KB disk2s1 2: Apple_HFS Flash Player 17.4 MB disk2s2 /dev/disk3 #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *15.9 GB disk3 1: Windows_FAT_32 boot 62.9 MB disk3s1 2: Linux 15.9 GB disk3s2
Unmount the SD card:
todd:~ todd$ diskutil unmountDisk /dev/disk3 Unmount of all volumes on disk3 was successful
Copy the image to the SD card using
dd
and usepv
to display progress:todd:~ todd$ pv ~/Downloads/2015-11-21-raspbian-jessie.img | sudo dd bs=16m of=/dev/disk3 837MiB 0:05:19 [3.21MiB/s] [=======> ] 22% ETA 0:18:29
Notes on Raspberry Pi USB Gadget Mode
read more →Use the upstream dwc2 driver in gadget mode - this in theory “should work” but hasn’t really been tested in device mode. The hardware is similar to the type underneath the s3c_hsotg driver in upstream and there is an ongoing effort to consolidate both codebases. This would be the ideal solution if you just require device mode.
Other useful threads:
- dwc_otg can’t coexist with other USB drivers raspberrypi/linux#881
- RPi zero Support for USB Gadget Mode (pi shows up as keyboard, disk, net, camera etc) raspberrypi/linux#1212