Hey everyone, I plan on doing some reviews of various gadgets that I get from a “what is this and should I get it” type of stance.

As a tease, I have a knock-off GoPro that I’ll do first; however, I plan for most of the reviews to be for music.

Posted on by ceneblock | Leave a comment

XBox 360 Chatpad Hacking

So I was watching an old episode of The Ben Heck Show on creating a pocket BASIC computer and in it, he mentioned using an XBox 360 Chatpad as the keyboard and reprogramming it as a serial keyboard instead.

Interested, I decided to order one and instead of the expected PIC16, I was greeted by a Microsoft X814364-001 and looking online, it seems that I’m not the only one with this problem; however, I did map out the pins and for the ICSP and they match up to the as expected to the Microsoft chip. My suspicion is that Microsoft had Microchip just mask the PIC and that they are the same device.

That said, another person tried to flash it over and seem to have failed noting that:


I can’t detect the pic and if i force it to flash the stuff (just select Pic16f883) it flashes but when it wants to verify there’s everything wrong and the pad works on the xbox like before so I guess it didn’t work

In that case, the user seems to have purchased a replacement PIC16, but I want to give it a try as well. My PicKit3 is sitting at the school, so I don’t have access to it to actually flash it right now; however, if it does work, then expect an update.

I’ve left some helpful links down below for those who want to modify their chatpads as well.

Links:
Ben Heck’s Original Post
PIC16F883 Sheet
Chatpad Pinout (really useful)

Posted in Engineering | Tagged , , , | Leave a comment

Writing an IRC bot

Some students wanted me to get involved with GHOULL again, and I agreed to. However, these guys will be in charge and I’ll just be lecturing..

Anyway, I decided we should have an IRC channel (freenode #GHOULL) and if we’re going to do that, then we should have a bot!

I found this guide for basic bot writing and wrote my own which can be found here.

It’s a very basic an primitive bot and needs a lot of improvements; however, I did want to mention some notes:

  1. As mentioned in the README, you’ll php5-sockets (or whatever version of php you’re using)
  2. Don’t try to send a lot of data, you’ll get throttled and then messages will be lost. You can get around this by giving your bot a voice with the following command:

    /msg ChanServ #GHOULL add GHOULL_bot +V
  3. All commands end with a `:` so

    write_socket($socket, "PRIVMSG #GHOULL: my text");

    This is important otherwise things will get messed up.
  4. sqlite and sqlie3 are not the same thing and the APIs are not compatible.

Those are the three big challenges that I’ve faced so far; however, I’m sure there will be more and I’ll try to remember to put them in the README.

The code is a little messy and uncommented; however, I tried to make everything as basic as I could. The hard stuff is in scripts/*.php as that deals with interacting with sqlite.

Posted in Computer Science | Tagged , , | Leave a comment

Getting Started with the BeagleBone PocketBeagle

Arrow current has a sale where when you spend over $20, you get upgraded to overnight shipping for free!

I saw this through an e-mail through them and I had just heard about the Pocket Beagle so I decided I’d order it.

I got that and some other goodies that I may write about later; however, there is not good documentation on how to get the device set up.

Having a BeagleBone Black, I figured it’d be plug-and-play; however, I was way wrong.


My first instinct was to just plug it in and I did and nothing happened. I’ve had problems with Ethernet over USB before, but I was expecting that since I was using Network Manager that everything would be somewhat “automagic”; however, nothing happened at all….well, that’s a lie. The device got really hot after being plugged in. I started to get worried that I had cooked the device by accident.

Confused and frustrated, I tried searching and there short reviews of the device, but nothing that really stood out. The getting started guide shows it working out of the box (but that guide pictures a Black..) so I was really thinking that I had a defective board.

There was a very short quickstart guide written on the cardboard backing of the package. So if you threw that away and this was your first device, then you’d be totally screwed as there isn’t anything yet. I may or may not have been that guy. 🙂

So enough ranting!


To get everything started, let’s get a list of what we’ll need:

  1. A minimum of 4GB MicroSD card
  2. A MicroUSB Cable
  3. A way to write data to the MicroSD card (This can be a USB adapter or a MicroUSB to SD for your computer or you might even have a microSD card on your laptop)

Now, these instructions are for Linux, but in all honesty they’re applicable to other OS as well.

Downloading an Image

First thing that we’ll do is get the latest image from beaglebone. Look for one that supports our device (in this case PocketBeagle). I have a copy that is recent as of the time or writing available for download; however, it is big and will take some time to download.

Once this is done, we’ll need to extract it. On Linux, I’ll be using unxz; however, I think xz files can be extracted on Windows and Mac using 7zip.


unxz ./bone-debian-9.1-iot-armhf-2017-09-21-4gb.img.xz

Burning our Image

With our image extracted, we’ll need to burn it to a microSD card. For Linux, I use dd. To use this, first we’ll need to know what drive the micro SD card is:


sudo fdisk -l

Disk /dev/sda: 298.1 GiB, 320072933376 bytes, 625142448 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0002b49f

Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 576909311 576907264 275.1G 83 Linux
/dev/sda2 576909312 625141759 48232448 23G 82 Linux swap / Solaris

Disk /dev/sdb: 16 GiB, 17179869184 bytes, 33554432 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 8192 bytes
I/O size (minimum/optimal): 8192 bytes / 131072 bytes

You’ll then see something like /dev/sdX or /dev/mmcX (where X is a number or letter) and it’s size. If you see /dev/sdX then you’ll want to use /dev/sdX and not /dev/sdX1 or something, likewise, if you see /dev/mmcX then you’ll want to use /dev/mmcX and not /dev/mmcXp1.

This should be obvious, because if you look at /dev/sda in the example above, you’ll see that /dev/sda1 is underneath /dev/sda. Hopefully that isn’t too confusing..

Now to actually burn it:


sudo dd if=bone-debian-9.1-iot-armhf-2017-09-21-4gb.img of=/dev/sdX status=progress

This will take a while, but now that DD will show you progress so you don’t know if something has randomly died and you don’t know (and it beats sending USR1 to the process).

Note bene:

Luckily, if you’re using Windows, then there is Rufus and a helpful guide for Windows for burning Ubuntu to a USB disk. The only thing you’ll need to do differently is select the beaglebone .img instead of the Ubuntu one.

There are other guides for burning the image on Ubuntu and Mac if you found that all confusing.

Booting the device

With the image burned, you’ll now take the microSD card and insert it into a unplugged PocketBeagle.

With it inserted, you can now plug in your MicroUSB cable to the board and into your computer.

It’ll eventually boot and everything is finished once you can see a new drive and can follow the getting started guide

Miscellaneous

If you have issues with networking over USB, then try the following on Linux:

sudo ifup usb0 192.168.7.1
#Additional configuration may be needed, check your distro's documentation for further information.

For SSH:

User: debian
Pass: temppwd

Posted in Computer Science, Engineering | Tagged , , | Leave a comment

Thoughts on #LasVegasShooting

On Sunday night, October 1st, 2017, during an outdoor concert several shots were fired from a hotel room in Mandalay Bay Resort and Casino.

So far, over 60 deaths and more than 500 injuries are reported.

This act of bitter hatred and terror has now surpassed the Pulse Nightclub as the most deadly mass shooting in US History. The Pulse took place on June 12, 2016 — not even two years ago.

At this point in time, motives are not known; however, what is known is the following:

  1. Over 23 weapons were found[1][2]
  2. The weapons were modified with a “bump stock” to have them behave like an automatic[3]
  3. The weapons are believed to have been purchased legally[4][5]
  4. He is believed to have acted alone[6]

Now, people are divided on weather or not the shooter is a terrorist. I’m on the belief that he is.

This isn’t your “run of the mill” shoot up a liquor store for $200. This is cold, calculated, and methodical.

Suppose that the shooter just “snapped” and decided to go on a killing spree. This still wouldn’t make sense. If his goal was to kill people, then there are far better ways to do that (i.e. IED, plowing a truck, and so on).

There is also some speculation that this is due to his gambling. News organizations have found larges bets totaling over $20,000 prior to the event; however, the man was rich and reported to be a millionaire[6]. So while losing that much money would have not been fun (regardless of how much you have), it doesn’t add up that the money would have been a motivating factor.

Suppose that this was his first time gambling and he decided to bet $10,000. People won’t do that unless they are already in a desperate place, which could give motivation for killing (the idea that there is nothing left to live for); however, he is known to have gambled (especially video poker) prior to the incident[6]. So I’m skeptical that this is the cause.

The shooter is known to have some sort of involvement with a woman; however, I’ve read conflicting reports that the woman is a girlfriend, friend, or roommate. At this time, she is not believed to have known about the shooting; however, police are interested in her. She is currently outside of the country[7]. I believe that she has clues about the incident — not to implicate her in the event; however, I think that she may have noticed things and didn’t pass them off, because they never “clicked” as being important. I want to be careful in my characterization of her, because I believe that she is innocent and is probably distraught by what happened, but I think that she has some sort of information that may be useful to police.

The shooter is not known to be of any particular religious or political ties. This leads many people to want to discount that as a motive; however, he could be private about them. Take me for example, I don’t wear my political beliefs on my shirt; however, if you read my tweets and this blog than you should know them and you should see my passion behind them. After 2006, I learned that is is better to act as if the person I’m talking to has the opposite political beliefs as me. This idea has allowed me to get through life and be able to properly communicate with people on both sides of the aisle.


Now, some people have expressed joy over the shooting because it was at a Country music event and would have been full of “Trump supporters”. I find this idea absolutely repulsive and the views of these people do not represent the Democrat party or even most people on who do not like the President.

These people need to be publicly shamed and called out for their disturbing and malicious thoughts. I did manage to capture a screen shot of someone wishing these things; however, I think that it is best to hold off on publishing it for now. The tweet has since been deleted (after reporting it) and it has gained infamy. Contrary to what the user believes, I think she is just being stupid and was seeking attention.

Sources

[1]When bullets rained down on Las Vegas

[2]23 firearms found in Mandalay Bay hotel room occupied by Las Vegas gunman

[3] Vegas gunman had device that lets guns fire like automatic

[4]Las Vegas Shooter Bought Weapons at a Combination Guns and Music Store

[5]What guns were used in the Las Vegas shooting?

[6]Nothing stood out about Stephen Paddock before Las Vegas shooting, people who knew him say

[7]Las Vegas shooting: Police search for gunman’s motive

Posted in Politics | Tagged , , | Leave a comment

@KassyDillon’s talk @WestminsterMO

“I heard there might be protests, if there are, then turn to them and start filming.”

“Ok”, I said as I went to my camera bag and grabbed my 40mm, while thinking to myself “I’m not a videographer, but by all means if something comes up, then I’ll do my best to get it.”

This was part of my introduction to Ms. Kassy Dillon. A girl that I’d been following on Twitter for nearly a year now and came across her after what became known as “Trigglypuff” and Milo Yiannopoulos.

She was in Westminster giving a speech on Campus Conservatism and she spoke to a pretty full house (much to our surprise).

As for the speech itself, it was enjoyable; however, I was left with one question at the end of the day: “Who was the target?”

What I mean is, during the speech, it seemed that Ms. Dillon flipped back and forth between targeting a general audience and potential on campus conservatives. It was by no means incoherent, but my advice would be to pick a topic an audience and stay with them.

For example:

Kellogg Community College having Shelby Gregoire arrested for distributing the Constitution on campus. This is an issue that should appall all members of the public (left and right) and it shows how such a “conservative” act is being repressed on campus.

Then later on, she advertises for her website and encourages students to be active politically while in college.

In that example, it is really minor; however, while in attendance it felt like there were two distinct audiences being talked to.

The speech was prepared and that is my biggest complaint on it. If you want, you may watch or read the speech at the bottom.


Where things really got good and where I want to focus on was during the Q&A, as this shows me what a speaker truly believes and how they can act on the fly.

A question that reached out to me was by a Palestinian student who expressed her concern about reaching out to the other side when President Trump is trying to implement a travel ban.

Kassy’s response was to insert a human element into the conversation. She said that if the ban were permanent that she’d be opposed to it. Saying, in quote, “But some people aren’t looking at how it actually affects people.” and that “Even the right is not united on it”.

This is something that I happen to agree with. I’m very fortunate that I go to school where I do. There are a lot of Middle Eastern students my graduate program and I’ve gotten to know them personally. I can say that these people are the smart men and women we need working to make the country the best it can be. And yes, I’ve met many an Iranian student and they are some of the hardest and smartest people you’ll ever meet.

My take away from working with the Iranians is that they know what is going on in their country and they want to leave. Iran has a huge brain drain.

Another question (to which Kassy was well prepared for) dealt with the Alt-Right:
“You said that conservatism was being co-opted by certain movements, but what do you recommend conservatives do to deal with that?”

To which Ms. Dillon breaks the Alt-Right into three distinct subcatagories:

  1. Alt-Right: The neo-Nazis, white nationalists, the people that openly say, “I support a white ethno-state.”
  2. Alt-Lite: People who preach “Westernism“, but you’ll also hear a lot of anti-Islam in it. They don’t explicitly say they’re white nationalists, but sometimes they may have other terms for it. Examples include Milo Yiannopoulos, Mike Cernovich, Paul Joseph Watson, and occasionally Alex Jones.
  3. New Right: These people are what were formally called “Reagan Democrats”. The blue-collar men and women who have typically vote Democrat (or are apolitical), but instead are “Republican only for Trump” (in this case).

When talking to her after the speech, she seemed excited to be able to distance herself from the alt-right. I think that the reason why, is that she believes the media has properly co-oped all of conservatism with the alt-right. Make no doubt that there are several pundits who have, but even Hillary Clinton has noted that the alt-right is a corruption of conservatism:

This is not conservatism as we have known it. This is not Republicanism as we have know it. These are race-baiting ideas, anti-Muslim and anti-immigrant ideas, anti-woman –– all key tenets making up an emerging racist ideology known as the ‘Alt-Right.’

It is important to note that she was separating conservatism from alt-right while still attacking Donald Trump.

This is of course interesting, considering how she is the victim of a “Vast Right-Wing Conspiracy”, to turn around and see her offer a little defense to her political opponents, but it does show how even she thinks that there is a difference between the two.

What was very strange was a question in regards to biological differences between races. This came from a Nepalese student who I think might have been trying to tick her; however, his question about what can effectively be described as “pro-eugenics” stuck me with great concern. The full exchange is:

Student: Like you said, I was actually very disappointed with what happened at Middlebury College in regards to you know like, beating up the professor and Charles Murray. What’s your opinion on the works on Charles Murray?

Kassy: Yeah, so I haven’t read The Bell Curve. It’s called The Bell Curve if you guys are ever interested in reading his ideas. I don’t agree with it necessarily, I think that nature vs. nurture argument; you can’t prove either. I think it’s just a wide thesis that he had out there. So I don’t necessarily agree with him but I haven’t read the entire book so I probably should do that. But, if you really disagree with him, go challenge him. Like for instance, Linda Sarsour is coming to my college this year. I am not a fan of Linda Sarsour, at all. Anyone familiar with Linda Sarsour? Organizer of the Women’s March? She’s Palestinian, and she told another Muslim woman who had FGM, told her that she didn’t deserve a vagina. She’s coming to my school, and I’m not going to protest it. I’m not going to organize against it. I am going to go there and ask her a question. I am going to challenge her. I want her to answer something that I’m asking her. Usually she speaks to crowds that are liberal, people ask her questions that are easy. I want to ask her a hard question. So I think if someone went to a Charles Murray speech, and asked him a hard question, that would be more productive than shutting him down because if you shut him down, you’re giving him so much of a platform.

Same student follow up: So let’s say what if there is a biological difference in our intelligence, I think we have to take a moral stance because let’s say, whatever the case, like in a good society people shouldn’t have to get shot by the police just because of their skin color or because someone makes an assumption off them based on where they live. So I think at some point, we have to make a moral judgement [sic] about what we do. So what moral judgement [sic] would you make? Like if there’s research, let’s say, that people from Nepal have a really low IQ, so does that mean we can’t exist together in society?

Kassy: I would take a moral stance by trying to critique his research, because he did research this he didn’t pull it out of nowhere. I’d critique his research and tell him I don’t agree with it. I think that’s what you should do. There are actually so many books that are refuting what he said, and I think that’s actually important to read.

My advise and response to the student would have been that you determine your own worth, not your genetics. There are very smart people of all races, nationalities, and creeds — just like there are dumb people under the same categories. However, that discussion could very easily take a religious turn..


That said, I think Kassy is in a very good place right now. I think that if she can fix that minor issue, then I think she’ll have a long speaking career ahead of her. I think that she handled herself very professionally and I look forward to watching her continue to develop as a speaker.

Entire speech:

Speech Transcript

Posted in Politics | Tagged , , , | Leave a comment

MSGEQ7 pain fun!

Taken from sparkfun.com Distributted by CC BY 2.0

Several years ago I had ordered five MSGEQ7 to eventually build a graphic equalizer. During my first attempts at it, I didn’t use any capacitors and couldn’t get it to work, so I gave up.

Fast forward to earlier this year when I decide I’m going to do something with these chips (project to be shown later) and tonight I finally break them out and give it a go.

The datasheet provides a working example of how to properly use the chip and I built up that example circuit; however, that didn’t work.

Next, I new Sparkfun had an Arduino Shield for the chip and they give both code examples and their schematics. So, I built that up, modified their code and….nothing. Garbage output.

I look for a third source and find this blog post. So I build it up and still garbage output.

At this point, I’m loosing my patience. Now I have cheap Chinese breadboads and sometimes they aren’t the best and since the circuit was so simple, I just pulled out a sheet of perfboard and made it. Still, nothing on the output.

Really upset now, I go to my drawer where I have extras and I pull them out and start popping them into the circuit and observing the output. The second one gives different garbage output, same with the third and fourth.

Finally, on my last one, I get some useful output. It isn’t perfect and one of the channels is garbage, but it is something.

So, with a somewhat working chip, I start to resort the defective chips to make sure I gave them a fair shake. As I put them back in and looked at the serial monitor, I still got garbage back. 🙁

I’m none too happy at the moment with this chip. I think I’d recommend people to get premade breakout boards. Yeah, they cost over $10, but it’s easier and faster to check for defects.

In the meantime, I have my own breakout board so if I ever feel like ordering more, then I’ve got something to test them with.

Posted in Engineering | Tagged , , , | Leave a comment

Eclipse Collage


Today was the big day! There was a total solar eclipse across the entire US!

Unfortunately, where I was at did not to a full 100%; however, I thought I’d show you part of what I did manage to get.

Posted in Photography | Tagged , , | Leave a comment

Pantum P2500 on Linux

I’ve had a Pantum P2500W laser printer for a while and it’s a cheap B&W printer. I use it for printing journal articles and for making PCBs.

It does its job quite well and I’d even recommend it.

What’s good about this printer is that it supports Linux! (yay!) However, if you’re on a rpm based distro, then you’re kinda out of luck.

You can get the official driver here for Ubuntu or Debian.

Normally I wouldn’t write something, because you can just use Alien to convert it. Nothing big…

However, let’s look at this:


./alien.pl --to-rpm ./Pantum-P2500-Series-2.6.x86_64.deb
Warning: alien is not running as root!
Warning: Ownerships of files in the generated packages will probably be wrong.
Use of uninitialized value $field in string eq at Alien/Package/Deb.pm line 262.
Use of uninitialized value in lc at Alien/Package/Deb.pm line 630.
Use of uninitialized value in lc at Alien/Package/Deb.pm line 630.
Warning: Skipping conversion of scripts in package : postinst postrm
Warning: Use the --scripts parameter to include the scripts.
Use of uninitialized value in lc at Alien/Package/Deb.pm line 630.
Use of uninitialized value $_ in pattern match (m//) at Alien/Package/Deb.pm line 673.
Use of uninitialized value $_ in concatenation (.) or string at Alien/Package/Deb.pm line 674.
mkdir: invalid option -- '0'
Try 'mkdir --help' for more information.
unable to mkdir -0: at Alien/Package.pm line 257.

And you get nothing…so how do we fix this?

Well, we need to extract the data from the deb. We can do this with ar.[1]


mkdir ./Pantum-P2500-Series-2.6.x86_64
ar -x ../Pantum-P2500-Series-2.6.x86_64.deb

You’ll see that I did this in a new directory. In this case, you get “tar bomb’d”; however, I imagine that is the case for other debs as well.

Anyway, with that you’ll see that you have two tar archives. Extracting them, you’ll get a layout like:


.
├── control
├── control.tar.gz
├── data.tar.gz
├── debian-binary
├── postinst
├── postrm
└── usr
├── lib
│   └── cups
│   └── filter
│   └── pt2500Filter
└── share
├── cups
│   └── model
│   └── Pantum
│   ├── Pantum P2200 Series.ppd
│   ├── Pantum P2200W Series.ppd
│   ├── Pantum P2500N Series.ppd
│   ├── Pantum P2500NW Series.ppd
│   ├── Pantum P2500 Series.ppd
│   ├── Pantum P2500W Series.ppd
│   ├── Pantum P2550N Series.ppd
│   ├── Pantum P2550 Series.ppd
│   ├── Pantum P2600N Series.ppd
│   ├── Pantum P2600NW Series.ppd
│   ├── Pantum P2600 Series.ppd
│   └── Pantum S2000 Series.ppd
└── doc
└── pantum-p2500-series
├── changelog.gz
└── copyright

At this point, we have everything we need to get our printer up and working. As root, do the following:


cp -rv ./usr/share/cups/model/Pantum /usr/share/cups/model
cp -rv ./usr/lib/cups/filter/pt2500Filter /usr/lib/cups/filter
systemctl restart cups

From here on out, you can add the printer the normal way that you would want to.

For those of you who don’t want to go through the hassle of extracting the deb and all of that, I’ve put the x86_64 and i386 tarballs on the site for you to get.

You’ll still need to do the copy portion, but that’s really all there is to it to get this printer up and going.

Posted in Computer Science | Tagged , , , , | Leave a comment

Remote Install of OpenSuSE

It’s time to update the network!

Most of the services I host have been running off of my main desktop which isn’t very safe, so I have this plan drawn out on my white board and I’m finally starting to implement it.

I’ll be using Tumbleweed from hereon out for my servers and I’ll stick with Leap for the desktop (because Nvidia…).

That said, I thought I’d try doing a remote install.

I plugged in a USB drive with the ISO “burned” on it and followed the standard procedure for remote install. A quick guide can be found here, but I’ll go over things just for fun.

At the boot screen, add the following boot options:


UseSSH=1 SSHPassword=unencrypted_password

I thought at that point, everything would be cool and I could just SSH into the box; however, it needs more user input than that.

You’ll first be required to say what language you want to use on your machine and then it’ll load Linux. After that, then it’ll prompt you for which network card to send a DHCP broadcast out to. This about five minuets, which is annoying to say the least.

I consider these prompts and the time it takes to be a problem. Suppose I wanted to just go into a datacenter, pop an install medium in, and put in those quick little boot parameters, then I’d be hosed as I couldn’t access my system remotely!

I know I’m nitpicking and that I should just do my installs with AutoYaST and the questions do actually make sense; however, it just isn’t what I expected.

Posted in Computer Science | Tagged , , , | Leave a comment