This post is just an update to the last one.
Last time I was only able to successfully send SLIP frames over the serial link, but today, after nearly giving up because of slattach and modem flow control, the two machines could ping themselves.
The test was done using an Ubuntu 14.04 virtual machine with the same usbserial dongle. The culprit was the “-L” slattach argument, which disables modem-like flow control (i.e. no RTS/CTS/DTR/… needed) and that’s what I need.
Now I just need to set up iptables to forward packets from BBB’s eth0 to sl0.
In this second part, I’m going to resume what I’ve done since the last post.
For the linux box and usbserial adapter I settled on my BeagleBone Black, which already sports many, I really mean many, UARTs. The procedure to enable the UART on the BBB and setup the SLIP interface is below; my BBB is running Debian 7.5.0 with kernel 3.8.13-bone60 (installed on the eMMC) as the debian (unprivileged) user.
- Power up the BBB and log in via ssh.
- Enable UART1 (pins UART1_TXD:P9_24 and UART1_RXD:P9_26) with this command:
$ sudo sh -c "echo BB-UART1 >> /sys/devices/bone_capemgr.9/slots"
This loads the UART1 Device Tree Overlay via the ‘Bone capemanager.
- Setup the SLIP interface with these commands:
$ sudo slattach -p slip -s 115200 /dev/ttyO1 & $ sudo ifconfig sl0 188.8.131.52 pointopoint 184.108.40.206 up
The former command sets UART1 (which has been loaded as /dev/ttyO1) in SLIP mode at 115200 baud and keeps running in background, presenting us a new network interface called sl0 that the latter command sets up with local IP 220.127.116.11 and remote IP 18.104.22.168. THESE COMMANDS DON’T WORK, READ THIS UPDATE.
This procedure still doesn’t allow the SLIP interface to access Internet, as this is something I have yet to wrap my head around. By the way, I’m actually at a good point in this project, but after realizing that to load Hackaday’s retro/full site I’d have to write at least a TCP and HTTP stack (no, I don’t like uIP for the TCP part), I think I’ll first write a small working UDP/ICMP stack and then I’ll move on to TCP, putting that goal a bit further that I thought.
I did also test the serial line using an usbserial adapter on my main PC connected to UART1, pinging 22.214.171.124 from the BBB (which is the IP i gave to the other end of the SLIP “cable”) and watching on RealTerm for any hex value showing. I even wrote a small C app that loads the hex captured from RealTerm and saved with HxD, and shows (only) the IP header information. You will find everything in a github repo, sooner or later.
For today, this is it; I am going to start writing something for my Launchpad right now, and will tell you everything when it’s time.
This project for the Tiva C Launchpad has been floating in my mind in the last days, and here I am resuming my thoughts before starting.
Everything started from this Hackaday post, when I read about internet over serial and slow modems, reviving in me the charm of such vintage communication modes. I first thought of trying to load the retro Hackaday page on the below setup, though then i realized I could even load the full site, yet needing to write an HTML parser…
What I need is:
- Tiva C Launchpad
- Linux box + usbserial
- TFT LCD
What I’m gonna do is:
- First of all, I need to setup the Linux box to share my internet connection from eth0 to a SLIP interface created with slattach (I may use an interface bridge)
- Then I need to implement the simple SLIP protocol (RFC1055) and test the connection
- After that is done, being able to draw on the LCD screen is the first big thing
- Eventually, writing a (simple) TCP/IP stack and the HTML parser will be the hardest parts
Problems I may encounter:
- The only issue I think I may run into is running out of RAM when loading the full site with images and everything (I’ll probably optimize loading of scripts and CSS by simply ignoring them, but that would defeat the purpose of loading the “full” site)
That’s it for now, when I progress I’ll tell ya everything.
Well, yes. Tomorrow school reboots. It’s time for a bootstrap! (got it? :D)
And I have some news for you readers.
- First thing first, I am not worried of starting school, since tomorrow I will be attending the 4th year of an IT High School and I will learn new many interesting things (i. e. Java) that I was too lazy to learn by myself.
- I recently bought for 20€ a 50W mini soldering station with a simple power dial, which is a clone of the Velleman VTSS5. But hey! I upgraded from a 5€ – questionable 30W – shitty one! I’m sooo excited! It is pretty solid, at first it seemed it wasn’t heating up properly, but it’s just how the station works. AND IT HAS CHANGEABLE BITS! lol
- Lately I have been tinkering with an ATmega328P trying to figure out how to calibrate the internal RC oscillator to no avail. Maybe I’ll just leave it blinking an LED…
- Did you know that Parallel ports are FUCKING AWESOME?!?!
- What about Cereal ports? (pun intended) lol
I started this blog with the intention to write something useful to others… Well if you haven’t seen any useful post (I didn’t too) please wait, they are coming.
$ sudo shutdown -h now "Bye Bye" [sudo] password for laxis96: The system is going down for halt NOW! Bye Bye
Today it’s been a bad day, not because it’s rainy, but because a laptop battery died on me.
For “died on me” I mean “I killed it”. It all started few hours ago, when I put up my laptop to substitute the dead Dell…
Knowing my Fujitsu laptop’s battery was so old that it couldn’t hold more than 5 minutes of usable juice I pried its enclosure and revealed the 18650 cells and charging circuitry. As far as I knew the Li-Ion cells were healthy (they were in the good voltage range, not sure about capacity), so the problem was in the evil charge controller. Reading on the Net you can see that the smart chip in batteries remembers the age of the battery and throttles charging based on that age. I think this was my case.
Now the funny part: even if I knew that the smart chip’s memory depended on the connected cells, I disconnected one third of the 3S2P battery and reconnected it. No more responses from the battery. No more voltages on the pins. The laptop was going nuts trying to charge the battery. Now, THIS IS A DEAD BATTERY!
I do not regret what I did, it has been fun zapping the battery with a paperclip while trying to read voltages with the multimeter.
Yesterday I went home from my holiday 900kms away and I discovered a not so good thing…
My 7-year-old main PC was dead!
It would not turn on at the press of its round and beautiful Dell-made power button, it just stayed there while I stared at it waiting for a reply. It’s bad news for me because since I had two drives in RAID0, I can’t recover my data (thankfully I also have a standalone drive which holds most of my data), but still it’s good news because now I can finally build the new computer I have been dreaming of in the last two years.
My main PC was a Dell Precision Workstation 370, mounting a 3.2GHz Pentium4 540 with HT and Quadro GPUs – three of them: FX3700, FX3400 and FX570, because of overheating the former two failed (but then I cooked ’em and they worked both, another story). It has served me for 7 years without ever leaving me.
At the moment I’m on my Linux laptop (BTW at least 5 years old) and I’ll post news if I get to buy the new PC I planned, if my parents allow me.
BB (Bye Bye or BeagleBone)
Lately my older brother has been having problems with his Asus laptop which made him go mad about the Hard Disk. It’s the second time this laptop has had issues with the HDD: last time we had to get a new disk because the one which left us had too many bad sectors. Awww, bad sectors!
As far as UltimateBootCD tests can tell it’s – again – all about bad sectors: this time even Linux could not help us because the NTFS got inconsistent! It’s not usual having to swap disks every 2 years or so because they all get too bad, so it’s either a not-so-well-engineered-computer or just user fault. Hopefully that Asus laptop is about to get thrown in the garbage as a new one replaces it – so it will not harm any other HDD.
Just for the sake of fun today I took out from dust the old failed drive and hooked it up to my old Fujitsu Lifebook which surprisingly already sports a SATA port. It’s 320GB of pure Seagate bytes! When I booted the laptop, it started Windows7 and eventually it BSODed all the way. Then I booted the GParted Live CD and despite discovering that half of the HDD was unpartitioned space, I purged the partition table and went over to install Linux Mint 13 (I like the Pangolin). As I’ve just finished the installation, I can’t tell if it will work and for how long.
Well, now hope is my best friend D:
Today I’m here to introduce you to my little loved BeagleBone Black, the 45$ ARM PC which carries a whopping 1GHz ARM Cortex-A8, 512MB of DDR3L RAM and 2GB of eMMC (onboard flash storage) and features 65 GPIOs, many SPI, I2C, UART lanes, an Ethernet PHY, μHDMI output and *just* one USB host port.
As you can guess, it’s a very powerful Altoids-can-sized (or credit-card-sized if you prefer) board which can boot a custom Linux 3.8 kernel; that means you can run Ubuntu, Android, Arch or any Linux distro you may prefer.
The BeagleBoard.org developers decided to ship this little guy loaded with Linux Angstrom, a distro tailored to embedded computing. Oooh… Angstrom! The first thing I did after failing to get something working on this distro, was flashing Ubuntu to the eMMC. And I do not regret. Ubuntu just runs much better and is much more lightweight, so much that it just needs 50MB of RAM to run the basic services.
So, this is the first of the many incoming articles about my BeagleBone Black (one of which is already in the works), which I hope will help someone in need of an enlightenment.
Bye bye! 😀
Well, here I am.
I have been making sites over sites for the last few years (it’s worth noting that none of them has ever had success), and now I think it’s time to turn page and write up some well-organized things.
I decided to finally put up a blog and write about my tech life simply because I’m all about computers and electronics. I could tell many facts about me, but it’s not worth it at the moment; you’ll learn about me by reading my posts.
Welcome and have a good read!