Fixing the Siemens SINUMERIK 828D when USB drives won’t mount

I came across an interesting problem the other day. All of a sudden, after saving a particular file to USB on the SINUMERIK 828D (a popular CNC machine controller) all USB drives stopped showing up on the HMI.

After looking through the file browser, you could see that /user/sinumerik/mnt/USB had the file in it – even when a USB was not plugged in. This is a common problem in the linux world. What probably happened is that for some reason, the HMI, saved the file to /user/sinumerik/mnt/USB, and then when plugging in the USB drive it would not mount as the directory already existed with files in it.

The next problem was – how do we fix it. We couldn’t delete the folder via the HMI, because there was inadequate permissions (even as the manufacturer user) so the end solution was to remove the system CF card from the unit, mount it on a linux computer (as it’s formatted ex4) with a USB CF card reader and then remove the file. Obviously this is risky, and you should always backup before attempting this. Another solution would be to SSH into the machine as root, but this requires it to be networked, and also the ability to get root access which I couldn’t figure out.

After mounting on a separate computer, we could see that the USB folder existed and had different permissions to the other drive mounts. After deleting the file and putting the CF card back in the 828D, USB drives were able to be mounted again.

Screenshot of 828D filesystem
You can see that the USB folder, unlike the other mounts, is not a link and does not allow non-root user’s write access

Adding a throttle to the Entity ECU-100 controller on the ALDI Cell Electric bicycle

Back in 2019 I bought an ALDI “special buy” e-bike for $999 – the Cell Ultimo Urban E-bike. It is an OK bike, but due to the way the pedal assist works it can be a bit annoying trying to take off on a high gear (as you need to begin to pedal before it works) or go up a hill on a high gear.

I wanted to fix this by adding a throttle. In some states this may be an illegal modification and will definitely void your warranty so please do your own research.

The Cell bikes use the Entity ECU-100 as it’s controller. There’s no datasheet or diagram of the available pins for this controller but researching generic e-bike controller boards (the kind you see on aliexpress/ebay) I found that you wire up a throttle to the “SP” pin.

Remove the two screws on the back of the battery housing where the controller is, then proceeded to label each of the wires while detaching them (this is important, there are many different connections and you don’t want to wire up the wrong thing when reconnecting them).

Remove the three screws on the side of the controller housing and then the four screws on front and back. You can now see the SP pin.

Three wires soldered to the SP, 5v and GND pins. You should use proper colours for the wire unlike me (Red for 5v, Black for GND, White/coloured for SP)

Solder three wires to the controller board. I drilled an extra hold in the plate the writes come out of, fed them through and crimped them to some bullet (socket) connectors.

I purchased a random thumb throttle from ebay for about $20, snipped the end off and crimped on some bullet plug connectors, ran the wires through the bike tube (you want to find something long and slightly bendy to feed it through).

Now everything is hooked up, you can put it all back together and enjoy your new speedy bike.

How to host Jackbox over Zoom on Mac OSX – with sound!

The Jackbox Party Packs by Jackbox Games have been a lifesaver in the COVID-19 pandemic given it has been very hard to see people in person. Most of the games work great over Zoom, but unfortunately getting the perfect Jackbox setup it isn’t the most straightforward task. I have experimented with various setups and I believe I have found the perfect method to a seamless Jackbox experience.

Set Jackbox to windowed mode

Before you begin your game, open up Jackbox and set it to windowed mode. This will allow you to see your friends, control zoom and play at the same time with a single screen. It’s slightly different for each pack, but most of them have a settings option in the main menu where you can choose the volume and full-screen/windowed. After you have done this, exit Jackbox.

Start your zoom call

Start your Zoom call, no need to invite anyone yet.

Before you open Jackbox, share your screen with computer sound

It’s very important to do this before you start the Jackbox pack you will be playing. When you share your screen with the Share Computer Sound, it creates the “ZoomAudioDevice” which aggregates your microphone and computer audio into a single device for Zoom to use. It is important to do this before Jackbox starts because Jackbox picks the audio output on startup and keeps it for the entire session, if the ZoomAudioDevice isn’t there then no matter how many times you try sharing your screen the sound won’t come through.

Start Jackbox

Start up your desired Jackbox Party Pack (make sure you’ve set it to windowed mode).

Stop sharing your screen then share the Jackbox window

You could just play Jackbox sharing your screen as above, but it is a sub-par experience. Your friends will be able to see all your saucy notifications, all your chrome tabs open in the background etc. What you really want is to just share the Jackbox window. If you stop sharing and then press share screen again, you will now have the option to choose the Jackbox window. Pick it then press share. You could also choose to share a screen portion instead of the window, but this could result in things drawing over the window, although it will make it easier to switch party packs.

NOTE: You’ll see on my screenshots I have unticked Optimise Screen Share for Video Clip. This is because I have found that although this improves the quality of the stream, the trade-off is some extra latency at times which is much more annoying when playing games with countdown timers. You milage may vary.

Whenever you switch a party pack, repeat all the steps

It is important that whenever you start a party pack you do it with your screen sharing on and share computer sound ticked, otherwise your sound will not work. Exiting a party pack will stop the window screen sharing, so you will need to start at the first stop.

Other Methods

I only discovered this method recently, prior to this I was using a more convoluted setup that involved two laptops and a program called Soundflower, which I will go into more detail into another post however this method is much easier to set up.

I hope this helps, happy Jackboxing!

Moving from Aussie Broadband to Superloop

After a few years as a happy Aussie Broadband customer, I have decided to move to Superloop. This is a quick summary of my experience.

The Price
Aussie Broadband recently announced they are increasing the price of their 100mbps plans by $10 a month. This means that an unlimited 100/40 plan is $98 for Superloop vs $109 for Aussie. Couple it with a referral code/link and you can get it for $88 for 6 months (here is my referral link). Aussie broadband have never been the cheapest provider, but this new hike is uncompetitive.

Superloop
Superloop has copied the Aussie Broadband playbook as a premium NBN provider. They publish daily CVC graphs, which aren’t as detailed as Aussie Broadband’s but are good enough for you to identify if they are not provisioning enough CVC to your POI. Like Aussie Broadband there’s no lock in contracts and extra connection fees, which is a great way of knowing that if they do something like increase your plan costs or have a decline in service quality, you can easily move without penalty.

The Transfer
Churning was ridiculously quick. There was no need to cancel my connection with Aussie Broadband, I simply signed up on the Superloop website and within 5 minutes the connection had been swapped over with no noticeable connection interruption. No need to talk to anyone. One annoying thing is that the only payment methods they offer are Credit Card and BPay, so Credit Card is the only automatic way of paying – luckily though there is no surcharge for this.

No More CGNAT or Port Blocking
Something annoying about Aussie Broadband is that when you sign up or move house you need to wait until the connection is active, then contact their support to remove CGNAT (which messes with things like online games) and unblock incoming ports (important if, like me, you do some web development type stuff on your network). I was pleasantly surprised that Superloop hand out Dynamic IPv4 addresses by default and doesn’t engage in port blocking.

Similarly to my Aussie Broadband CVC Archive, I have started archiving Superloop’s CVC graphs too.

Name list generator

Need a list of names generated? Just load up this page with names as a query param with your comma separated list of names and it shall generate a random list, e.g jasongi.com/2020/05/21/name-list-generator/?names=Jason,Fred,Jane! Perfect for Zoom stand-ups!

    100 Toasty Tofu(s) 2018 Edition

    It’s that time of the year again. Last year I made the foray into predicting Triple J’s Hottest 100 and it was fun so this year I’ve given it another go with some key differences. I completely rewrote the script that does the legwork, and decided to go one step further with doing some demographic weighting and analysis.

    The New Script

    Last year I was using Tesseract, one of the leading open source projects. This year I decided to test out some cloud based OCR to see if it was any better. I tried Amazon Recognition and Google Cloud Vision. After testing both it became clear that Google Cloud Vision is miles ahead of Recognition in both text detection and paragraph detection, so I went with that. I’ve also hooked up all the data to a metabase instance, which is great for easily displaying data.

    100 warm tunas is now scraping twitter and instagram. I considered whether my script should do the same but decided against it for a few reasons. Last year,  ZestfullyGreen did a twitter scraper but it failed to predict the #1 song. This lead me to believe that the sample of people on twitter are not representative of the Hottest 100 voting population and would not improve the prediction while instagram has a strong history is accurate predictions.

    The Results

    Without further ado, these are the raw counts.

    Interestingly it wasn’t always like this. If you look at the day by day counts, former bookie favourite This Is America won the first day and it took a few more days for Ocean Alley’s total to catch up. We could be in for a close Hottest 100.

    Looking a little deeper

    Every year, Triple J loves to wheel out the stats on the Hottest 100 while refusing to release counts. This makes seeing how far off previous predictions are difficult. I did some research and found several interesting articles.

    This year’s Hottest 100 has set a new voting record! Gave us a breakdown by state, gender and age bracket (kinda) of who voted.

    • More women than men voted this year, 51% female compared to 48% male (rounded out by 1% for ‘Other’ and ‘No answer’)
    • New South Wales took the lion’s share of votes (29%), followed by Victoria (23%), backed up by QLD (20%), and in order after that, WA (11%), SA (8%), ACT and TAS (3%), Overseas voters (2%), and NT (1%).
    • The most common age of voters was 21 years old. About half of voters were aged 18-24 and around 80% of voters were under 30.

    Did guys and gals vote differently in the Hottest 100? Let’s find out showed us the gender divide in music tastes. Hottest 100: What songs were most popular with each state and territory? did the same for states/territories.

    Instagram doesn’t list a location for people or their gender, but I figured gender could be approximated by running people’s names through gender_guesser, a library for python that uses a name dataset to guess gender. This decreases our sample size as not everyone has their name of instagram, but is an interesting experiment. Here you can see the differences in votes.

    The divide is clear. Everybody loves Ocean Alley and Gambino, but people with masculine names seem to have an aversion to Wafia and Amy Shark (Could this be why she has never gotten a #1?). Masculine names also enjoy Ruby Fields – Dinosaur more than people with feminine names.

    For location, I used a different approximation. Sometimes people tag their photos with a location, and it’s probable that that location is where they live. So the script tries to find the last tagged location and puts them into that state. It’s not perfect but provides some interesting results.

    When we put this altogether, we can produce weighted prediction of the Hottest 100 based on either gender, state or both.

    This doesn’t affect the top songs but you can see ones with a particular bias (e.g Mallrat, which is popular with feminine names) shoots up.

    This year’s Hottest 100 is set to be a close one. If you think you’re better at predicting these things, submit your prediction here and then watch it count down here.

    Aussie Broadband CVC Archive

    Aussie Broadband is a great NBN internet provider. They are the only one that posts daily CVC Utilization graphs which are the only real way you can see if you’re going to get peak time congestion. After suffering congestion under other ISPs I moved to Aussie and haven’t had any speed slowdown

    Unfortunately for whatever reason they don’t offer historic CVC data, they only display the previous day’s, I’ve kindly started backing it up so that Aussie users can see historic CVC data. All this data belongs to ABB and I take no responsibility for its accuracy. But seriously, they are great and you should switch to them if you can.

    See the archive here.

    Hottest 100 Predictions – A Comparison

    This Hottest 100 I made a program to scrape Instagram for hottest 100 votes. I then collated the predictions from other programs (100 Warm Tunas and ZestfullyGreen’s Twitter scraper) and scored them based on performance, you can see the results here (I also opened this up to manual entries, one which outscored all the predictors).

    I also decided to combine the results of the twitter scraper and my Instagram scraper, which turned out the be a better predictor than any of them. Next year I will have to incorporate a twitter scraper into my predictor.

    Below is a summary of some interesting stats about the three automated prediction methods, plus the combination of 100 Toasty Tofu(s) and ZestfullyGreen’s Twitter scraper. I decided to take the results from ZestfullyGreen’s twitter scrape and add them to my results to see if this would be any better. I had a look at my predictions that included duplicate votes, however these performed worse than everything except the twitter prediction, so I have excluded them. This means my hypothesis on excluding duplicate votes (that they make the prediction less accurate) seems confirmed.

    The final question that remains is, who truly is the internet’s most accurate Hottest 100 predictor? As you can see below, there isn’t really an answer for this. By my (somewhat arbitary) scoring system, 100 Warm Tunas and myself have a very similar accuracy. I think we will have to wait until next year to really test them.

    JG 100 Tunas ZG JG + ZG
    Points 7289/10000 7288/10000 5679/10000 7297/10000
    Number of Songs in Correct Position 7/100 4/100 1/100 3/100
    Number of Correct Songs in any Position 83/100 83/100 70/100 83/100
    Number of Correct Top 5 Songs in Correct Position 2/5 2/5 1/5 2/5
    Number of Correct Top 5 Songs in any Top 5 Position 4/5 4/5 4/5 4/5
    Number of Correct Top 10 Songs in Correct Position 2/10 2/10 1/10 2/10
    Number of Correct Top 10 Songs in any Top 10 Position 8/10 8/10 5/10 8/10
    Number of Correct Top 20 Songs in Correct Position 2/20 3/20 1/20 2/20
    Number of best predictions (see below) 45 50 34 45
    Number of worst predictions (see below) 16 20 65 15
    Number of Correct Top 20 Songs in any Top 20 Position 16/20 16/20 11/20 16/20
    Guessed #1? Yes Yes No Yes

    Song-by-song comparison of predictors

    # JG 100 Tunas ZG JG + ZG Title Artist
    1 1 1 2 1 HUMBLE. Kendrick Lamar
    2 2 3 4 2 Let Me Down Easy Gang Of Youths
    3 6 6 25 6 Chateau Angus & Julia Stone
    4 3 4 3 3 Ubu Methyl Ethel
    5 4 2 5 4 The Deepest Sighs, The Frankest Shadows Gang Of Youths
    6 10 8 1 10 Green Light Lorde
    7 5 5 13 5 Go Bang PNAU
    8 11 10 43 11 Sally {Ft. Mataya} Thundamentals
    9 16 15 33 16 Lay It On Me Vance Joy
    10 9 13 14 9 What Can I Do If The Fire Goes Out? Gang Of Youths
    11 7 7 29 7 SWEET BROCKHAMPTON
    12 15 16 39 15 Fake Magic Peking Duk & AlunaGeorge
    13 23 24 30 23 Young Dumb & Broke Khalid
    14 29 30 6 29 Homemade Dynamite Lorde
    15 12 11 24 12 Regular Touch Vera Blue
    16 30 32 36 30 Feel The Way I Do Jungle Giants, The
    17 13 12 20 13 Marryuna {Ft. Yirrmal} Baker Boy
    18 14 14 9 14 Exactly How You Are Ball Park Music
    19 17 19 15 17 The Man Killers, The
    20 35 38 59 35 Let You Down {Ft. Icona Pop} Peking Duk
    21 8 9 22 8 Birthdays Smith Street Band, The
    22 26 26 27 26 Lemon To A Knife Fight Wombats, The
    23 19 18 10 19 Not Worth Hiding Alex The Astronaut
    24 78 86 N/A 77 rockstar {Ft. 21 Savage} Post Malone
    25 34 31 18 33 Weekends Amy Shark
    26 39 39 23 39 Feel It Still Portugal. The Man
    27 43 41 N/A 43 Be About You Winston Surfshirt
    28 47 51 76 47 Mystik Tash Sultana
    29 28 27 37 28 Mended Vera Blue
    30 36 35 26 36 Low Blows Meg Mac
    31 25 25 48 25 Lay Down Touch Sensitive
    32 27 28 91 27 NUMB {Ft. GRAACE} Hayden James
    33 22 23 58 22 Slow Mover Angie McMahon
    34 37 37 19 37 DNA. Kendrick Lamar
    35 51 46 31 51 Passionfruit Drake
    36 18 17 12 18 I Haven’t Been Taking Care Of Myself Alex Lahey
    37 63 70 52 62 Slide {Ft. Frank Ocean/Migos} Calvin Harris
    38 46 48 34 46 Bellyache Billie Eilish
    39 53 49 N/A 52 Got On My Skateboard Skegss
    40 24 21 44 24 True Lovers Holy Holy
    41 41 40 35 41 Blood {triple j Like A Version 2017} Gang Of Youths
    42 59 56 N/A 59 Cola CamelPhat & Elderbrook
    43 91 74 74 91 Murder To The Mind Tash Sultana
    44 49 50 42 49 In Motion {Ft. Japanese Wallpaper} Allday
    45 21 20 7 21 Every Day’s The Weekend Alex Lahey
    46 57 54 17 57 Better Mallrat
    47 45 52 16 45 Want You Back HAIM
    48 54 47 N/A 53 The Comedown Ocean Alley
    49 33 34 82 34 Passiona Smith Street Band, The
    50 77 84 84 74 On Your Way Down Jungle Giants, The
    51 N/A N/A 56 N/A Man’s Not Hot Big Shaq
    52 N/A N/A N/A N/A Glorious {Ft. Skylar Grey} Macklemore
    53 62 68 87 63 Moments {Ft. Gavin James} Bliss N Eso
    54 50 57 N/A 50 Homely Feeling Hockey Dad
    55 42 44 N/A 42 6 Pack Dune Rats
    56 32 29 72 32 Watch Me Read You Odette
    57 67 67 N/A 67 Bad Dream Jungle Giants, The
    58 20 22 11 20 The Opener Camp Cope
    59 80 79 N/A 80 Used To Be In Love Jungle Giants, The
    60 69 66 8 69 Boys Charli XCX
    61 73 77 N/A 73 21 Grams {Ft. Hilltop Hoods} Thundamentals
    62 92 89 N/A 92 Saved Khalid
    63 40 43 28 40 Life Goes On E^ST
    64 60 58 45 60 Fool’s Gold Jack River
    65 65 62 38 64 Everything Now Arcade Fire
    66 66 65 93 65 Lemon N.E.R.D. & Rihanna
    67 38 36 N/A 38 Shred For Summer DZ Deathrays
    68 48 45 80 48 Golden Kingswood
    69 44 42 96 44 I Love You, Will You Marry Me Yungblud
    70 31 33 54 31 Amsterdam Nothing But Thieves
    71 N/A N/A 21 N/A Perfect Places Lorde
    72 88 85 71 88 In Cold Blood alt-J
    73 83 64 N/A 82 Nuclear Fusion King Gizzard & The Lizard Wizard
    74 N/A N/A 98 N/A XO TOUR Llif3 Lil Uzi Vert
    75 61 60 N/A 61 Braindead Dune Rats
    76 76 76 N/A 75 Cloud 9 {Ft. Kian} Baker Boy
    77 N/A 100 66 N/A Million Man Rubens, The
    78 N/A N/A N/A N/A Electric Feel {triple j Like A Version 2017} Tash Sultana
    79 N/A N/A 69 N/A Hey, Did I Do You Wrong? San Cisco
    80 90 90 61 90 Say Something Loving xx, The
    81 N/A N/A 32 N/A Liability Lorde
    82 N/A N/A 46 N/A 1-800-273-8255 {Ft. Alessia Cara/Khalid} Logic
    83 74 72 60 76 Blood Brothers Amy Shark
    84 84 73 N/A 85 Oceans Vallis Alps
    85 58 59 N/A 58 Does This Last Boo Seeka
    86 94 91 95 94 Maybe It’s My First Time Meg Mac
    87 72 63 78 71 The Way You Used To Do Queens Of The Stone Age
    88 56 61 N/A 56 Edge Of Town {triple j Like A Version 2017} Paul Dempsey
    89 N/A N/A N/A N/A Dawning DMA’s
    90 N/A N/A N/A N/A Hyperreal {Ft. Kučka} Flume
    91 N/A N/A N/A N/A Big For Your Boots Stormzy
    92 N/A N/A N/A N/A LOVE. {Ft. ZACARI} Kendrick Lamar
    93 95 95 85 96 Do What You Want Presets, The
    94 99 93 N/A 98 Second Hand Car Kim Churchill
    95 N/A N/A N/A N/A Mask Off Future
    96 100 97 55 100 Chasin’ Cub Sport
    97 N/A N/A N/A N/A LOYALTY. {Ft. RIHANNA} Kendrick Lamar
    98 N/A N/A N/A N/A Snow Angus & Julia Stone
    99 64 N/A N/A 66 Arty Boy {Ft. Emma Louise} Flight Facilities
    100 N/A N/A N/A N/A Don’t Leave Snakehips & MØ

    100 Toasty Tofu(s) – Submit your prediction

    Think you can predict the hottest 100 better than me? I have made a form for submitting your own predictions, and a leader-board will be shown song-by-song on Triple J day. Check it out: Triple J Hottest 100 Prediction tracker submission.

    The scoring will be as follows:

    • 100 points for each correct guess (song and place).
    • If you pick a song that gets in the top 100, but not the right place, you lose 1 point per place you were off. For example if you pick Never Gonna Give You up for number 90 but it gets 75, you get 85 points.
    • 0 points for a song that isn’t in the top 100 at all.
    • Therefore, a perfect score will be 10000 points.