Simple iPaq Familiar file transfers
As a developer, you sometimes get slapped with a solution to a nagging problem, only to be left wondering how you ever could have missed such an obvious clue. I had an epiphany like that recently while I was using my pda.
In my spare time, I enjoy tinkering with the Familiar Linux distribution on my Ipaq H5450. I have plans for the device ranging from a small HUD for my instant messenger client to an universal remote, only to grow tired of trying to tackle the same obstacle: connectivity. My Ipaq only has a working serial connection - for some reason the usb-connector of my cradle ceased to function - so my interaction with the device was limited to using Minicom. Setting up a PPP tunnel over the serial port for ssh access was too much of a bother and I liked the simple way of controlling the Ipaq via a simple serial connection. To my knowledge the only way to transfer files to my Ipaq was using a SD card the device came shipped with. As you can imagine this was hardly a satisfying solution.
It started to dawn on me when I, in one of my more desperate moments, tried to cat a file to /dev/ttyS0, while running Vi on the Ipaq. Of course, this failed miserably, not only because two processes were trying to access the serial port device (Minicom and cat), but also because of the slew of perceived control codes Vi thought I was typing in. I was trying to figure out a way to tell the Ipaq to receive the data I was 'typing' as a raw stream. Perhaps even Minicom should be able to send files that way...
Then the pieces started to fall into place. I actually was sending files that way every time I flashed my Ipaq with a new Linux distribution. The bootloader of the pda would output some control characters while waiting for a Xmodem or Ymodem connection, and I would tell Minicom to transfer the disk image using that protocol. If a bootloader could do that, so could a Linux installation. A quick Google search revealed that the command for these modes were 'rx', 'ry' and 'rz'. As luck would have it, these commands were all available through the lrz binary on my Ipaq.
Now I only have to run 'rz' on the pda, and tell minicom to send the desired file using the Zmodem protocol in order to send a file. To receive a file from the Ipaq, the command 'sz' can be used. Now the path is clear for some embedded application development for my own use. Still, I cannot shake the faint feeling of annoyance I could not have figured this out sooner. I hope that this post will spare a fellow developer the same feeling
.
In my spare time, I enjoy tinkering with the Familiar Linux distribution on my Ipaq H5450. I have plans for the device ranging from a small HUD for my instant messenger client to an universal remote, only to grow tired of trying to tackle the same obstacle: connectivity. My Ipaq only has a working serial connection - for some reason the usb-connector of my cradle ceased to function - so my interaction with the device was limited to using Minicom. Setting up a PPP tunnel over the serial port for ssh access was too much of a bother and I liked the simple way of controlling the Ipaq via a simple serial connection. To my knowledge the only way to transfer files to my Ipaq was using a SD card the device came shipped with. As you can imagine this was hardly a satisfying solution.
It started to dawn on me when I, in one of my more desperate moments, tried to cat a file to /dev/ttyS0, while running Vi on the Ipaq. Of course, this failed miserably, not only because two processes were trying to access the serial port device (Minicom and cat), but also because of the slew of perceived control codes Vi thought I was typing in. I was trying to figure out a way to tell the Ipaq to receive the data I was 'typing' as a raw stream. Perhaps even Minicom should be able to send files that way...
Then the pieces started to fall into place. I actually was sending files that way every time I flashed my Ipaq with a new Linux distribution. The bootloader of the pda would output some control characters while waiting for a Xmodem or Ymodem connection, and I would tell Minicom to transfer the disk image using that protocol. If a bootloader could do that, so could a Linux installation. A quick Google search revealed that the command for these modes were 'rx', 'ry' and 'rz'. As luck would have it, these commands were all available through the lrz binary on my Ipaq.
Now I only have to run 'rz' on the pda, and tell minicom to send the desired file using the Zmodem protocol in order to send a file. To receive a file from the Ipaq, the command 'sz' can be used. Now the path is clear for some embedded application development for my own use. Still, I cannot shake the faint feeling of annoyance I could not have figured this out sooner. I hope that this post will spare a fellow developer the same feeling
|
|
Driven by unit testing |
|
|
Eetlijst.nl vanaf de cli |
Comments
Aaah dat klinkt mooi...Succes verder met bouwen!!
Welke aanpaste distro draai je op je PDA?
Of heb je hem zelf gecompliled?
Welke aanpaste distro draai je op je PDA?
Of heb je hem zelf gecompliled?
Ik heb Familiar 0.8.4 draaien, waarvan ik de bootstrap-versie heb gedownload. Ik had hiervoor gekozen omdat Angstrom, die de 2.6-kernel draait, nog niet alle hardware van mijn Ipaq ondersteunt.
Zelf compilen heb ik wel eens gedaan, maar vervolgens hing de kernel op de Ipaq. Dat probleem tackle ik wel als ik de distro en applicatie wat wil stroomlijnen
.
Zelf compilen heb ik wel eens gedaan, maar vervolgens hing de kernel op de Ipaq. Dat probleem tackle ik wel als ik de distro en applicatie wat wil stroomlijnen
Ipaq met bluetooth en wifi een optie 
Verder een erg innovatieve oplossing
Verder een erg innovatieve oplossing
Helaas ondersteunt mijn chip alleen maar WEP, en mijn Wifi thuis is een WPA-domein. Wat bluetooth betreft moet daar eerst weer aan gesleuteld worden (zowel op de Ipaq als op mijn pc), net zoals bij PPP over serieel
.
[Comment edited on Wednesday 28 January 2009 14:47]