I got a few things from Monoprice and I thought I’d share some important facts about them.
I have many things connected to my single computer monitor via HDMI. I use a HDMI switch so I don’t have to unplug and replug cables all the time. But my cheap $6 HDMI switch is an unpowered passive switch, so it has problems working when the video source does not provide enough power to the switch.
For example, when my Mac Mini is plugged in, the 5V pin only supplies about 3 volts. Inside of the switch is a set of diodes and a AMS1117 voltage regulator that is supposed to output 3.3V using 5V, but instead it is only outputting about 2V. This made the LEDs in the switch flicker and blink (which seemed like a symptom of a bad power supply) and switch refused to function (no video output). My solution was to add a USB micro connector so I can add an external 5V power supply.
After adding the power supply, the switch is able to function properly with a steady supply of power.
The Playstation 4 is great, I got mine from Amazon 2 weeks ago, no problems. USBXLATER is on hold. After weeks of investigation and experimentation and collaborating with other people, it seems that the PS4 only accepts the data from DualShock 4′s Bluetooth interface, and not the USB interface, even if HID reports are sent through USB. This makes emulation via USB impossible. The next possible methods are to emulate the Bluetooth connection instead, or to install an internal modification to the DualShock 4′s hardware.
My Bluetooth module currently does not have some features that allow me to use it for spoofing so I’ll have to get a new one before even attempting it. I have started on the design for this internal modification already.
I attempted to use the Ubertooth One to do Bluetooth sniffing, but it is extremely hard to use and doesn’t seem to work right. I can obtain the LAP and UAP of my Playstation using it, with this information, the Ubertooth is supposed to be able to perform the necessary calculations required to follow the same frequency hopping pattern that the Playstation and DualShock uses. But the Ubertooth cannot successfully do this, and when it does seem to obtain the pattern, it fails to decode every single packet, leading me to think that it miscalculated the hopping pattern.
iOS’s BLE events seems to be polled at a really slow rate. I had to fix a problem which involved using the time when the event handler was fired. The timestamp was not accurate at all and appears to happen at 1 second interval bursts. This problem was fixed by using another method of obtaining the actual time when the notification was sent from the BLE device, I packed a sample interval into the packet I sent.
I don’t really like my “third-hand” tool so I decided to build a better one using flexible ball-jointed coolant spraying pipe hoses. It’s not a totally new idea, SparkFun even sells some of these parts as a kit. But my way is slightly better, and I got the hoses from eBay (look for “Flexible Water Oil Coolant Pipe Hose for Lathe CNC”) instead because SparkFun’s prices were excessively expensive.
I am a mainly Windows 7 user who needs to use Linux only sometimes, so I need a dual boot system. I also want to encrypt my entire hard drive for privacy. I used to have TrueCrypt encrypting my entire hard drive, but TrueCrypt does not really support dual boot systems with GRUB, because TrueCrypt must reside on the Master Boot Record (MBR).
There are several guides on the Internet about how to create a dual boot system with TrueCrypt but all of them involve placing the TrueCrypt rescue disk image into a separate partition. This is an ugly solution as a mainly Windows user because it involves a few extra keystrokes to activate the rescue partition, and the rescue partition is not hidden. I came up with an alternative solution for people who wants to boot directly into Windows with a silent TrueCrypt login most of the time, but needs a few extra keystrokes to get into Linux.
I got a Samsung Galaxy Note 3 as soon as it was released. I wanted a S-View flip cover for it. S-View basically means the screen will automatically turn on and off when you open and close the cover. It is also able to reformat the display to show important notifications through the square viewing window of the cover, etc. The phone knows if the flip cover is opened or closed because there’s a tiny magnet inside the cover.
But all of the official S-View flip covers available are very expensive at about $60 each. The cheap covers might look like S-View covers, but they do not support the actual S-View functionality. But the cheap covers are about $5. I wanted to hack a $5 to give it S-View functionality. Continue reading
While doing stuff regarding sniffing and spoofing a DualShock 4 controller for the Playstation 4, it might be useful to permanently unpair a DualShock 4 from the Playstation 4. This tool does that by setting a new Bluetooth MAC address (BDADDR) into a DualShock 4 using a computer.
USBXLATER is going strong. Constantly improving and new features. During the testing, I picked up another generic USB hub to test…
Like the picture said, they do not work, I have other generic hubs that do work. These ones seems to exhibit a signalling issue. The strangest thing is that they’ll work if I plug them into my USB traffic analyzer, which means I can’t even debug the signals…
USBXLATER is going great! I’m using it to play through BF4′s single player, to work out bugs. I implemented anti-acceleration for the mouse, plus some filtering, and it feels amazingly like a PC game. I also gave a USBXLATER to Matlo from GIMX because he’s so helpful.
iOS and nRF51 are talking beautifully now. I feel like I can do whatever I want with BLE technology now.
I got a writable NFC tag keychain, I can use a phone app on my Galaxy Note 3 to write my contact info into the tag, and when you scan it, it asks you to import my contact information. Now I keep it with all my keys.
I went to a Freescale seminar. In summary (from the 3 sessions out of many I went to):
- Kinetis chips do not have any bootloader today, but starting winter of 2013, they will start to add factory stock bootloaders.
- They are making new ARM Cortex chips with built-in radio transceivers will be released this winter
- They are going after the Qi wireless charging market, with some NFC involvement too.
- I learned more about making PCBs that won’t fail due to bad EM characteristics.
- I think Freescale is slightly behind on the market, I know NXP and ST both already have factory stock bootloaders. ST has their STM32W family already, and I’m already using nRF51 from Nordic.
Had to fight off a wave of spam to my website, because I forgot to turn on account confirmation on my wiki, oops.
I’ve been working with the VS1000D chip, made by VLSI, who has very cool engineers.
Getting closer to the next generation console launch dates. My USB keyboard+mouse-to-console adapter is going great, adding in configurable data translation and such. Still waiting on new PCBs.
I went to the hacklab.to hackerspace in downtown Toronto. I met some great people there. The space is a bit small but they plan on moving to a bigger space soon. I gave away a few spare blank PCBs while I was there.
I played “Journey”. It is one of the must-play titles of the PS3. I suggest you play it in one sitting, with nobody around physically to bother you, and signed into PSN. This is the only way and best way to enjoy this unique game.
This circuit is a STM32F2 chip with a USB host interface and USB device interface. The original goal of this project is to allow me to play Playstation 4 games using a keyboard and mouse (as opposed to using a gamepad, because the PS3/PS4/Xbox360/XboxOne do not support keyboard and mouse directly in games).
This device has many possible uses…
I inquired a company (not CSR, but their product uses chips from CSR) about some WiFi Direct modules, this was their reply:
Please note that we just stop any new WiFi CSR solution. Based on previous experience with CSR, we could not get driver source code from CSR and CSR couldn’t support themselves. So we give up CSR WiFi
If you didn’t know, CSR makes a lot of Bluetooth and WiFi chips, but they absolutely do not ever EVER give you access to any documentation or any software. Usually to get access, you have to pay them big $$$. In this case, even if you pay them, apparently “CSR couldn’t support themselves”, how embarrassing. This was from a friend who have used CSR before:
It took 3 months to get access to the BC4 firmware and that has been deprecated for years.
CSR is on my list of companies to avoid.
This is a product by Bitbanger Labs, who consulted with me regarding this project.
Still using a Mac Mini for iOS stuff, and still hating it. I don’t like their troubleshooting ideology. I tried to add Synergy to pre-login startup tasks but I got an error upon logging in saying that the task can’t start because of a security concern. When I tried to find a solution to this error, I was told to simply delete it, not helpful at all.
Synergy is pretty awesome, except for a few bugs.
Learning Objective C syntax from a C/C++/C#/Java background is NOT easy… I’ve done Windows Phone (I won a Xbox 360 in a MS sponsored hackathon, it was my first and only WP7 app) and Android development before, but iOS is still taking time to get used to.
Got my hands on a DualShock 4 controller early, I tore it down and I’m keeping notes on it.
The USB mouse/keyboard-to-PS4 adapter project is going great. I added so many features to the USB stack code, including dynamic host-channel allocation, so more devices can be supported. I got the emulated DualShock 3 enumerated perfectly thanks to Matlo from gimx.fr. I also sent out a revision of the PCB to be made, this revision has no built-in hub, which means it’s cheaper and more flexible, just a bit less convenient.
I finished “Beyond: Two Souls” in three sittings, it’s that good. It’s really hard to say if it is better or worse than Heavy Rain. I’ll be waiting for the DLCs for it. Quantic Dream has made it onto my “buy at release” and “never resell” game companies list.
I moved a few more pages from my old website to this new website. WordPress updated and I had to fix a few things.
Please watch the full video (8 minutes), which explains the project in full.
I designed, built, and programmed almost every bit and piece of this project. I did not design light tube and lens assembly. This project involved a broad range of my skills: electronics, wireless communication, mechanical 3D CAD, thermal design, design for manufacturing, etc. I did this project while still studying in university.
Dentists often use head-mounted lamps, but to operate these lamps, they need to remove their gloves first because their gloves is usually covered with saliva and blood. iDOC360 hired me to make a system that is controlled using hand gestures, so the dentists do not need to remove their gloves to operate it.
New smartphone, I gave it a short review in this blog, also an even shorter review for the old phone. I spent a lot of time doing carrier unlocking, rooting, installing CWM recovery, and personalizing it.
I got a BLE custom service to be recognized on my PC, iPad Mini, and new Android 4.3 phone. A good milestone to reach. I had a bad experience with Apple along the way…
I got my USB host code to successfully enumerate a device that is behind a hub. This is another good milestone to reach. Now I can work on the USB slave code for a bit.
I managed to patch avrdude to fix some problems that Trinket was having in the field. Slowing things down helps a lot.
I finished playing Red Dead Redemption. A very good game, but it can be a time sink depending on your play style. The Undead Nightmare DLC for it turns up the comedy to 11, highly recommended!
I also finished playing Brothers: A Tale of Two Sons. It only took two nights of playing. It is kind short in the sense that the first Portal game was too short. It’s a decent game if you like the style, but it’s not without flaws. It sort of highlights the flaws of the Dualshock 3 controller as well, there is heavy usage of the R2 and L2 triggers and your finger tends to slip off. The Dualshock 4′s design seems to have taken these flaws into account.
Next up is probably Beyond: Two Souls. GTA V is on my radar but at a lower priority.
Warning, anti Apple rant
I just retired my old phone, the Samsung Galaxy Infuse 4G I997. It has been a great companion for 2 years. I have a few words I’d like to remember it by.
I got a new smartphone, a Samsung Galaxy Note III, 32 GB with LTE version, model N900W8, from WIND Mobile.
I will not discuss any benchmarks or performance measurements, please check other websites for stuff like speed tests and battery life.
A simple adjustable constant current dummy load, with digital readout and USB data logging.
Inspired by the dummy load made by Dave from the EEVBlog. I decided I wanted one because I work with a lot of battery powered designs and it’d be nice to have a simple way of testing a battery or power supply in terms of capability, capacity, and heat. It features a 2 line voltage and current reading, a rotary encoder as the user input to adjust the current setting, and USB data logging (plus bootloading). There are more neat features, please watch the video.
Here are some pretty pictures: (Imgur Album)
C Library to Make DIY Wiimote Extensions with AVR Microcontrollers
This is a library that gives an AVR microcontroller the ability to act as a Wiimote extension controller (Nunchuk, Classic Controller, Guitar Hero 3 controller, Guitar Hero World Tour guitar controller, Guitar Hero World Tour drum controller, etc). The library has two parts: the I2C slave device and Wiimote protocol handling. It can be used with AVR-GCC, and it is possible to adapt it to work with Arduino if you know how to include the files into your sketch properly.
I have many projects, but some of them are just short code libraries and snippets that I don’t want to allocate an entire blog post for. For more information on each, visit the link and read the “readme” provided.
LufaUsbAspLoader, a USB bootloader that combines LUFA and USBaspLoader, so it can be used in low-speed USB devices
Arduino-UsiSerial-Library, written mostly for Trinket, works for all ATtiny microcontrollers with a USI
Adafruit-Trinket-USB, a small collection of libraries that enable USB capabilities for Trinket, and other ATtiny V-USB projects
Last week was the Toronto Maker Faire. The entire faire can be divided into 4 major categories: 3D Printers, RGB LED strips, Arduino, and Raspberry Pi. Don’t take that generalization negatively, the entire faire was great. Most of the projects would beat our university symposium projects.
Seeing all the 3D printers in action and seeing their capabilities first hand really makes me want to get one. I’m just waiting a bit for the next generation of technology to become available (key patents will expire, enabling better printers).
I’m coding some FFT stuff. The nRF chip I’m using is an ARM Cortex M0, but running at 16 MHz, so I had to use some code that’s designed for a 16 bit MCU instead of something more powerful. It works like a charm though.
Gotta work on a few more examples for Trinket, making it do USB stuff like mouse and keyboard. A lot of exciting stuff for Adafruit coming.
I got to use my Hantek DDS-3X25, it is certainly useful at a reasonable price. I haven’t ran into the known sync issue yet so I haven’t used the firmware hack/fix for it yet.
Did some work regarding my clone of the Xim, the USB host library for STM32 is built in a really weird state machine, so I spent a few hours writing blocking variations of non-blocking functions. I got my TUSB hub chip enumerated. Good progress. Still a month away from PS4 launch, no rush.
Some old clients are catching up to me and I’m going to be very busy.
Red Dead Redemption is a very long game. Maybe I’m doing too many of the randomly generated “event missions”, and I don’t use fast travel because I want to do those events.
No post for last week because I didn’t have anything interesting to say.
Hacked my Rigol DS1052E to the 100 MHz firmware. Just had to place a file onto a USB drive, stick it in, hit one button. I had the newer firmware already which made it easy, older firmware has a more complicated upgrade procedure. I followed http://www.eevblog.com/forum/blog/changing-the-rigol-ds1052e-to-ds1102e-using-usb-the-dummy-guide/msg275388/#msg275388
I assembled another nRF51 board. More work to be done. Interesting design this chip has, but it runs at a slow 16 MHz. This is great for battery life but it’s going to cause problems for timing NeoPixel signals.
Something funny about working with Bluetooth Low Energy stuff: Most vendors only provide Windows based tools for programming BLE firmware, while so far only iOS devices support BLE, and you need a Mac to write apps for iOS. (yes, I know Android 4.3 is coming but that is very rare right now, I’m still waiting for the Note 3)
Got a AVR XMEGA prototype up and mostly working.
NeoPixels working on Netduino, tutorial is up on Adafruit: http://learn.adafruit.com/using-neopixels-with-netduino.
Web server on Netduino is very easy. I found http://forums.netduino.com/index.php?/topic/575-updated-web-server/ which is my starting point. Good thing I am already proficient with HTTP and ASP.NET and stuff.
Trinket and Gemma are for sale on Adafruit now. There are very rare reports of people who cannot get them working on one computer, then it works on another computer, and then it starts working on the first computer. I narrowed it down to one extra RJMP instruction that the bootloader has to execute when it is fresh (it will RJMP to another RJMP instruction), and once you’ve used the bootloader once, the RJMP is changed to jump directly to where the second RJMP will jump, hence become a little faster, and the issue (USB signal timing issue) disappears and everything is happy. This means prior to being sole, the ATtiny should be loaded with an image of the bootloader combined with a user application, instead of just the bootloader itself.
I finished Saints Row 4, while fun, I don’t think it’s nearly as funny as Saints Row 3. Red Dead Redemption is pretty good so far.
Stupid Rigol o’scope has the USB port upside down… It also doesn’t support my 16 GB thumbdrive which is another disappointment. I wish it had Eye-Fi like my camera.
I got native code baked into Netduino Plus 2′s firmware, so now I can run real time tasks without any interruptions or preemptions. The first goal is to get NeoPixels working on the Netduino platform. There will be a long tutorial after it’s all done.
Since a lot of the Netduino-NeoPixel stuff involves timing measurements, I realized that the interpreter on the Netduino is pretty slow compared to native code.
I’ve gotten a completely custom PCB for the nRF51 working. I ran into some trouble, it appeared as if my code froze (it wouldn’t respond to button presses, and later I discovered that it wouldn’t go past a certain function using a J-Link debugger), luckily I noticed a forum discussion about a similar problem, and it turns out that I had to change one crystal related setting during BLE stack initialization. See https://devzone.nordicsemi.com/index.php/custom-pcb-how-to-quick-check-if-ble-is-working-nrf51822ab and https://devzone.nordicsemi.com/index.php/what-could-make-ble-sample-applications-not-work,-but-radio-works-ok and https://devzone.nordicsemi.com/index.php/what-low-frequency-clock-sources-can-i-use
From what I’ve learned so far, BLE one key difference from Bluetooth Classic is that “services” are application layer, so you can make custom services. This is different from Bluetooth Classic’s preset “profiles”. Read https://devzone.nordicsemi.com/index.php/is-there-a-serial-port-profile-for-ble and https://devzone.nordicsemi.com/index.php/nrf-uart-app
It should be very simple to adapt the code to any microcontroller. Continue reading
this is a very long and detailed tutorial that I did a long time ago, check it out!