Category Archives: Work

Installing Debian on a Sheevaplug into Flash

Ok, so you are looking for a comprehensive guide on how to install a modern Debian system into the Flash memory of your Sheeva Plug? Your googling has paid of – look no further!

What we will do in this guide:

  • Update the bootloader to a recent version which supports direct booting from ubifs partions. So you can just use the stock Debian kernel without any hassle or SD card.
  • Install Debian to a ubifs filesystem on the Sheevaplug flash.

Continue reading Installing Debian on a Sheevaplug into Flash

ChibiOS based STM32 bootloader example

Hi there,

since I’ve finally but my last oral exam for this semester behind me there is more time for me to hack on various stuff again.

Some of you might now that I’m a big fan of of the ChibiOS paired with the awesome STMicrolectronics STM32F series of Cortex-M3 microprocessors. These days I’m more and more into developing products which will run and work i.e. in Belgium. So there is no easy way to just pop by and deliver a firmware update over JTAG or there must be at least one remote controllable computer with a JTAG probe – not an elegant solution.

But there is hope, the STM32 chips do include the possibility to update the Flash ROM from inside a boot loader. Now, there are examples for boot loaders but I found most of them to be too “hackish”. So I set out to write my own boot loader based on ChibiOS. The example is targeting the Olimex STM32P107 development board but should be easy to adapt to other boards. You can find the final result on my github page:

https://github.com/mabl/ARMCM3-STM32F107-BOOTLOADER

The example includes helper function abstracting the flashing process. The example implementation demos reading the firmware in Intel Hex format from a SD card.

 

 

Investigating the Basler BIP2-1600c (updated)

Marketing verbiage

I have long been looking for the optimal IP camera, not only from picture quality but also from an engineering point of view. BOSCH IP camera such as the NBN-921 have great dynamics but suffer under a lot of Software problem, such as garbled H.263 encoding under high bitrates as well as hardware problems with high heat dissipation. Where as most AXIS camera have adequate firmwares, but abysmal sensor performance.

But fear not for there is a new player on the IP camera market: Basler. Basler is already a big player on the ComputerVision market and extended its product range for security applications.

Now I have made quite extensive research in my demo BIP2-1600c which is branded by Geutebrück as TopBC-1188.

My requirements

Most IP cameras are intended to be used for surveillance of public places with mostly static images and no real-time dependence. But of cause there are countless other applications where good IP cameras are needed — in my case it is outdoor optical character recognition on fast moving objects. Now this requires several unique features:

  • Absolute time synchronization in the millisecond regime for each frame
  • Good dynamic and fast adaptation to lighting conditions
  • Low noise sensor
  • External trigger for picture synchronization
  • High resolution
  • MJPEG stream with at least 10 fps for high-quality (>90) JPEGs

Most of these features cannot be found on typical IP cameras, so I was rather curious who Basler IP cameras handle these demands.

Investigation

Web interface

Basler Webinterface
Basler Webinterface – Stream configuration

The web interface is clean and structured and allows to configure all settings one is used to. Noteworthy exceptions:

  • There is no support for IPv6! Shame on you Basler.
  • Set Area of Interest (AOI) which allows for partial reading of the sensor
  • It is possible to change all settings via a simple HTTP-POST RPC interface – there is no XML-RPC
  • Can sustain one 12.5FPS high-quality JPEG stream at 19Mb/s
  • Each JPEG frame includes EXIF data holding
    •  I/O state infos
    • UNIX timestamp in microseconds!
    • Frame id

Hardware

The BIP2-1600c is a very small and light camera in a nice aluminium casing. Even under load, the camera only warms up slightly. The PCB design is beautiful, featuring a DaVinci DM368 (ARMv5TEJ) from Texas Instruments. The Sensor is interfaces to an Altera  Cyclone FPGA.

Trigger input

The hardware features a trigger input which allows to precisely time each frame which is guaranteed to be taken after up to 7 ms delay.

Real time trigger input and time synchronization

I thoroughly inspected the real time trigger input and time synchronization features of the BIP2-1600c camera. To test the trigger time delay, I used my Olimex STM32P107 which was generating an NTP synchronized second pulse. The pulse was connected to the trigger input of the camera which was itself also NTP synchronized to my host computer which displayed timestamp information on its display.

Using the above setup, the camera was always synchronized to within 8ms but showing a constant 90 ms offset in the JPEG timestamp which still exceeds my greatest expectations.

<update> I inquired about this problem with Basler Tech Support. They basically told me that the timestamp value also includes the exposure time and the sensor reading duration plus some jitter.

Now, instead of correcting for this time duration afterwards wouldn’t it be wiser to subtract the time difference inside the camera? Especially given that different models have different sensors.</update>

Licences

There is one small thing constantly bugging me with the camera though – licences. This camera uses Linux and a great deal of other GPL licensed software. Under the GPL you are required to supply the source code of the software on user demand as well as to notify the user about the GPL software.

Unfortunately, there is no source code downloadable from neither Basler nor Geutebrück. The only information regarding this issue is a small link to the license texts (but not code) on the web interface of the camera, but not in the user manual.

I have requested Basler to provide me with parts of the source code — especially the Linux and u-boot source code. Let’s see how they will respond.

Conclusion

The Basler BIP2-1600c is a great camera with potent hard- and software which has even more potential once the software matures further. I highly recommend looking at this camera.

Outlook

In the next post I will look into hacking this camera and gain root access, so stay tuned.