Quantcast
Channel: Boundary Devices
Viewing all 391 articles
Browse latest View live

Trusty Ubuntu for i.MX6 boards

$
0
0
Since our Linaro Raring release in December of last year, we’ve been publicly quiet about updated images, but working hard in the background to make the next release(s) more full-featured and more maintainable. As the first public release of these efforts, we just uploaded an Ubuntu-based LXDE image for our BD-SL-i.MX6, Nitrogen6x, and for the first time, our new Nitrogen6 Max board.

For the impatient

This image contains Freescale-licensed content, so you will need to register on our web-site and log in before you can accept the license agreement and download the image from here:

2014-07-30: N.B.: We updated this image from the original 20140727 version.
See this comment below for details.

Programming the image

The image is a slightly-less-than-4GiB image file containing the partition table, so you can copy it to an SD card or SATA drive on /dev/sdc using zcat and dd like so:
~/Downloads$ sudo umount /dev/sdc*
~/Downloads$ zcat 20140729-nitrogen*.img.gz | sudo dd of=/dev/sdc bs=1M
~/Downloads$ sync
Or you can use Alex Page’s USB Image Tool under Windows. Refer to the section Programming the eMMC below for details about how to program the eMMC device on Nitrogen6 Max.

Source code access

The kernel image is based on the boundary-imx_3.10.17_1.0.0_ga branch of our Github kernel repository using nitrogen6x_defconfig. Sources for other components are available using apt-get-source on the running machine.

Highlights

  • Based on Ubuntu 14.04.1 (Trusty Tahr) release, which is a long-term-support version, so it will have a three year life span.
  • Based on LXDE – The “Lightweight X11 Desktop Environment” (as was the previous Raring image).
  • Has a fully GPU-accelerated X-Windows stack.
  • Includes accelerated gstreamer plugins for video encode and decode.
  • Includes support for simultaneous access to both our 5 mega-pixel OV5640 MIPI and OV5642 parallel (CSI) cameras in the same kernel image.
  • Includes a packaged kernel, so you can use apt-get to upgrade without worries about breaking things.
  • Boots to a RAM disk (/initrd.img) instead of directly to the rootfs.
  • Boots to a zImage in normal Ubuntu fashion.
  • Includes all components needed for Wi-Fi, Bluetooth, and CAN bus access (including can-utils).
  • Includes the Onboard on screen keyboard to allow use without a physical keyboard (i.e. with just a touch screen).
In short, this is simply a better version of Ubuntu for our boards than previous releases. Please try it out when you get a chance and provide some feedback. We will be following this release with additional images to include Wayland support, and support for the Unity Desktop (among other things).

Having the kernel and other components properly packaged will make it much easier for us to manage, and for you to work with this operating system.

The following sections will provide some details about the features of the image, and especially how they can be used to test the functionality of our boards.

Display setup

The boot script in this image is very close to the reference boot script in our U-Boot tree, except that it loads vmlinuz instead of uImage and also loads a RAM disk (/initrd.img) as the first-level root filesystem.

It supports automatic detection of all of our displays except the 1280×800 panels (discussed in this post).

The Nitrogen6 Max board has two LVDS channels, and the connector on the bottom of the board is the primary. Refer to this section of our post about Android Jellybean for details. In short, you will need a customized boot script in order to support multiple LVDS panels.

To support a dual-channel LVDS panel at 1080P (a high-resolution display), you can set the panel variable in U-Boot:
U-Boot > setenv panel 1080P
U-Boot > saveenv && reset

Usernames and passwords

Two users are defined for use on the system: ubuntu and root. The password for each is Boundary (with a Capital B).

An ssh server is configured on the system, though it does not allow password-based authentication for user root.

User ubuntu has sudo privileges, so you can place your ssh public key (normally $HOME/.ssh/id_rsa.pub) to the system like so:
ubuntu@nitrogen:~$ sudo mkdir /root/.ssh
[sudo] password for ubuntu: 
ubuntu@nitrogen:~$ sudo nano /root/.ssh/authorized_keys
... paste content of $HOME/.ssh/id_rsa.pub here
ubuntu@nitrogen:~$ sudo chmod 600 /root/.ssh/auth*
ubuntu@nitrogen:~$ sudo chmod 600 /root/.ssh/

Desktop shortcuts

Once you’ve connected your displays and boot the image, you’ll see four icons on the desktop:
  • A link to the Boundary Devices web-site,
  • The glmark2 OpenGL benchmark program,
  • One of the Vivante GPU demonstration programs, and
  • A video link that will play Tears of Steel at full 1080P resolution over the Internet
These are provided to make it easy for you (and us) to validate operation of the GPU and VPU components. The details of what they run can be found in /home/ubuntu/Desktop/*.desktop.

Programming the eMMC on Nitrogen6 Max

In an earlier post, we provided a customized kernel and RAM disk that turned our BD-SL-i.MX6 or Nitrogen6X boards into a very expensive SD card reader by using the g_mass_storage gadget.

This release extends that to support the Nitrogen6 Max board, and also updates the boot script to invoke this automatically if the Volume Down key on our Android button board is pressed during boot.

If you don’t have an Android button board, you can short pins 7 and 8 of J14 with a paper clip (these pins are Volume down and Ground respectively).

Note that this feature is not specific to eMMC or to the Nitrogen6 Max board. It is also very handy for loading SATA drives or even SD cards.

The /init script in the RAM disk walks through and exposes each block device found on the system, making it available over the USB OTG port.

The two files involved (uImage-recovery and uramdisk-recovery.img) can also be copied to a TFTP server and loaded by U-Boot using the usbrecover command as described in the release notes for U-Boot 2014.04.

If you’re just getting started, we placed an updated USB writer image with support for Nitrogen6 Max here: If you extract it to a single-partition SD card (FAT or ext2/3/4), you can quickly get access to the eMMC drive through the USB OTG port.

USB On-the-go (OTG) port

The kernel image in this release includes support for the g_ether device driver, and is configured with the mac and IP addresses described in the U-Boot usbrecover notes, so if you configure a PC with a static IP address of 10.0.0.1/255.255.255.0, you’ll have very simple access to the board without involving a router or DHCP server.

WiFi setup

The LXDE image contains support for WiFi, though it isn’t the most user-friendly interface.

In particular, you will need to add a WiFi connection using Preferences|Network Connections.



Bluetooth testing

Bluetooth support is also present in this image, but it is very rudimentary. We’ve only tested with command-line utilities as follows:
root@nitrogen:~# rfkill block bluetooth
root@nitrogen:~# rfkill unblock bluetooth
root@nitrogen:~# hciattach -t 30 /dev/ttymxc2 texas 115200 flow
root@nitrogen:~# hciconfig  hci0 up
root@nitrogen:~# hcitool scan
... nearby devices listed here

CAN bus testing

With the included can-utils programs, you can configure and test the CAN bus by looping back two of our devices and using cansend and candump like so:
root@nitrogen:~# ip link set can0 up type can bitrate 125000
root@nitrogen:~# candump can0 &
root@nitrogen:~# cansend can0 5A1#11.22.33.44.55.66.77.88
  can0  5A1   [8]  11 22 33 44 55 66 77 88

RS-232/RS-485

The Nitrogen6 Max board has a third serial port, which is software-selectable to support either RS-232 or RS-485 signalling. It is connected to UART5 on the processor, and exposed as /dev/ttymxc4 under Linux.

By default, the port is configured for RS-232. In order to configure it for RS-485, you can write to an entry in sysfs:
root@nitrogen:/ # echo 1 > /sys/devices/platform/imx-uart.4/rs485_en
If a board will be at the end of an RS-485 chain, you may also need to use SW5 to enable a termination resistor. There are silk screen labels showing the positions, and RS-485 means terminated as shown in the photo.

Note that this image does not include a terminal emulator, but since it’s Ubuntu, you’re only one command-line away:
root@nitrogen:~# apt-get install microcom
Reading package lists... Done
Building dependency tree        
Reading state information... Done
The following NEW packages will be installed:
  microcom
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 13.9 kB of archives.
After this operation, 64.5 kB of additional disk space will be used.
Get:1 http://ports.ubuntu.com/ubuntu-ports/ trusty/universe microcom armhf 2012.06.0-3ubuntu1 [13.9 kB]
Fetched 13.9 kB in 0s (28.7 kB/s)  
Selecting previously unselected package microcom.
(Reading database ... 104564 files and directories currently installed.)
Preparing to unpack .../microcom_2012.06.0-3ubuntu1_armhf.deb ...
Unpacking microcom (2012.06.0-3ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up microcom (2012.06.0-3ubuntu1) ...
root@nitrogen:~# microcom -s 115200 -p /dev/ttymxc4

Camera testing

Because this image contains support for multiple cameras you’ll need to pass the device=/dev/video# command-parameter to mfw_v4lsrc. Use /dev/video0 to refer to the OV5642 (parallel CSI) camera:
root@nitrogen: ~/$ gst-launch mfw_v4lsrc device=/dev/video0 \
                       ! mfw_v4lsink disp-width=640 disp-height=480
Use /dev/video2 to refer to the OV5640 (MIPI) camera:
root@nitrogen: ~/$ gst-launch mfw_v4lsrc device=/dev/video2 \
                       ! mfw_v4lsink disp-width=640 disp-height=480

Onboard on screen keyboard

An icon on the task-bar can be used to enable and configure the on screen keyboard.

Android KitKat pre-release for i.MX6

$
0
0
At long last, we’re happy to announce that we have a pre-release image of Android 4.4.2 (KitKat) available for download.



It’s a pre-release because there are a few things left to do, and quite a few things we haven’t yet tested, but it’s far enough along that we’re ready for some feedback from you.


For the impatient

You can download the image from here:

The image above contains support for both our Nitrogen6 Max and Nitrogen6x boards. Follow-up images will include support for Nitrogen6_Lite.

As usual, you’ll need to register on our site and agree to the EULA because it contains Freescale content. The image is a 4GB SD card image that can be restored using zcat and dd under Linux or Alex Page’s USB Image Tool under Windows.

Source code access

The sources for this release are in the boundary-kk4.4.2_1.0.0-ga branch of our Github repository (the main development branch), and the build steps are otherwise the same as in the second beta release.

What’s new

The details of the Freescale release are available in this post on the i.MX Community site. They include a detailed feature set and CTS test results.

The primary change is the switch to the Android Open Source Project’s 4.4.2 code base though, and the primary emphasis for that are performance and stability. The new release is designed to be more responsive and consume less memory. And last, but not least, includes an updated Chrome-based browser. It scores a respectable 428 out of 555 on the HTML5 Test benchmark. The primary omissions are WebRTC and Data Channel support.



Why a pre-release?

The primary reason that this is a pre-release is that there are a number of things we haven’t done yet. Among them are:

What’s included

We have included all of the features of our latest Jellybean release in this image, including the can-utils package.

We’ve also included the Superuser package by Koushik Dutta from the CyanogenMod package, so you can selectively allow root access to applications and scripts.

What we’ve tested

In short: almost everything. At least on Nitrogen6x and Nitrogen6_Max boards.

WiFi and Bluetooth are both functional.

Both MIPI and parallel cameras are functional.

Testing time has been short though, and we’re hoping that you’ll help us identify any holes that we don’t yet know about.

What’s the fate of JB?

The Jellybean kernel will be around for quite a while, since we’re supporting a number of customers on that platform.

That said, we’ll likely encourage new customers to look first at Kitkat, and we’ll begin using Kitkat as the basis for new development quite soon.

Please let us know when you have a chance to try this image out.

U-Boot 2014.04 update release

$
0
0
We just posted an update to our production U-Boot to include support for the Nitrogen6 Max board.

This release is still based on U-Boot 2014.04 from up-stream and consists mainly of additional (custom) boards, so there’s no reason to upgrade unless you need something specific.

We’re pushing this into our production branch to make way for updates to U-Boot 2014.07 and will push fairly quickly to U-Boot 2014.10 thereafter.

As always, we saved the previous production branch into production-before-20140912.

Download package

You can grab a package of binaries from the usual place:
If you extract the content to an SD card, you can upgrade on our standard 1GiB versions of Nitrogen6X or BD-SL-i.MX6 boards like so:
U-Boot > bootfile=u-boot.nitrogen6q ; run upgradeu
The file name for the Nitrogen6 Max board is u-boot.nitrogen6_max.

The full list of binary files for various boards and configurations is available here in our U-Boot on i.MX6 page.

U-Boot USB Mass Storage gadget

$
0
0
Thanks to the efforts of many in the U-Boot community, the upcoming v2014.07 release of U-Boot for our boards will include a new feature: the USB Mass Storage Gadget, or ums. Since this feature adds a major piece of functionality, we’ll describe its operation and our usage of it in this post.

To begin with, the purpose of this feature is to expose the storage of a block device on a board over USB gadget. In other words, this feature allows you to turn a board into a virtual USB stick in a very similar manner to what we described in a previous post.

The earlier post involved a lot more software though. In order to use it, you were required to have a specially-compiled kernel and RAM disk, and a mechanism for loading and launching said kernel over the network or some form of storage.

That’s a lot of stuff, and requires quite a bit of effort both to configure and to use. In previous U-Boot releases, we’ve included some tools such as the usbrecover command to make it easier, but integrating this into U-Boot makes things even easier.

Usage

Usage is straightforward:
U-Boot > ums 0 mmc 0
The ums command invokes the USB Mass Storage function. The second parameter specifies the USB controller, and the remaining arguments choose the block device.

After ums is invoked, you should see a new drive appear if you’re connected to the USB OTG port on one of our boards. You can use this to download and burn a new image, or if the drive has previously been formatted, you can copy files back and forth.

Since this feature is immediately available, we have used this for both. Because of the connection-oriented nature (no network setup needed), it can much faster to use ums than to copy files using adb under Android or SSH under another Linux distribution.

We’ve tested against Alex Page’s USB Image Tool under Windows, and dd under Linux, and it has proven very reliable.

Differences

There are differences between this and the with the Kernel/RAM disk approach.

In particular:
  1. ums only supports a single block device, so we’ll need to determine which to use when invoking it, and
  2. It’s slower. U-Boot is a single-tasker and doesn’t support asynchronous writes to block devices, so ums will toggle between USB transfers and disk transfers. Our testing shows that this results in transfer times that are 3x longer.
To put the speed into perspective, we’ve seen transfer times of ~30 minutes for a 3600 MiB Ubuntu Trusty image written to SD card.

Writing ~150 MiB of an Android image through the mksdcard.sh script takes around 6 minutes. That script uses normal mkfs commands to create the filesystem and cp to copy files, so many fewer writes are needed.

This is not great performance, but still very usable.

Configuration

Okay, so the ums feature is present, and easy to use. Now how and when do we invoke it?

The use case that drives this feature is internal storage. Our Nitrogen6_Max board has on-board eMMC, which can’t be connected to a PC for initialization, and invoking ums is a natural way to expose it.

We also have customers using SATA drives on our Nitrogen6x and BD-SL-i.MX6 boards, and copying images to them can be inconvenient.

Based on this, we’ve decided to invoke ums as a part of our standard bootcmd variable as a fall-back if the normal boot fails.

As you may be aware, we currently iterate through available boot devices with a couple of nested for loops, more or less as follows:
for dtype in sata mmc usb ; do 
    for disk in 0 1 ; do
        try to load and source 6x_bootscript
If no 6x_bootscript is found, or if execution of the script fails, we put error messages and hints about how to fix the issue on the display.
setenv stdout serial,vga
echo ; echo 6x_bootscript not found
echo ; echo serial console at 115200, 8N1
echo details at http://boundarydevices.com/6q_bootscript
setenv stdin serial,usbkbd
These commands are only executed if no bootable storage was found, so it’s reasonable to invoke ums to allow it to be fixed.

This is what we’ve done, but the details of how may not be obvious. The for loops above define the boot priority and are implemented via the bootdevs variable.

The boot priority really isn’t what we want when determining what block device to expose though. Instead, we’ve chosen to invert the order of iteration of the drives. This has the effect of choosing the non-removable mmc interface (eMMC) first.
for dtype in sata mmc ; do
    for disk in 1 0 ; do
        ums 0 $dtype $disk
On boards with an on-board eMMC, that interface is chosen before SATA, since it is the least accessible.

Since the ums command will fail if a drive is not populated, this will choose any form of storage if only a single block device is connected. In practice, none of our boards currently contains more than one non-removable block device, unless you consider SATA non-removable.

Please note that this is only the default behavior. The bootcmd variable can and often should be over-ridden to perform precisely once you’ve decided how you’d like your board to behave. Our aim is to provide the best introductory use of U-Boot for the general case.

Availability

The sources are currently available in the staging branch of our Github tree, and we’ll be publishing a new set of production binaries in coming days.

As always, let us know when you have a chance to try this out. We’re very happy that the feature is now present, and think that this fills a much needed gap in functionality.

U-Boot 2014.07 release for i.MX6 boards

$
0
0
The U-Boot 2014.07 update release was our shortest-lived U-Boot release ever, since v2014.07 was quite easy to integrate and provides a significant new feature.

The official release from the main-line U-Boot repository had a lot of changes as shown in the Statistics page, but the one’s that caught our attention most were the USB fixes and enhancements that allow the use of the USB Mass Storage Gadget as described in this post.

As always, we saved the previous production branch into a branch (production-before-20140922).

Download package

You can grab a package of binaries from the usual place:
If you extract the content to an SD card, you can upgrade on our standard 1GiB versions of Nitrogen6X or BD-SL-i.MX6 boards like so:
U-Boot > bootfile=u-boot.nitrogen6q ; run upgradeu
The full list of binary files for various boards and configurations is available here in our U-Boot on i.MX6 page.

Next steps

We will begin work on updates for the upcoming v2014.10 release very soon, as there are another set of features that we’re very excited about: Many thanks to all of those contributing to this project!

Ubuntu Trusty for i.MX6 boards – September 2014

$
0
0
We’ve just uploaded a new image of Ubuntu Trusty for our i.MX6 boards that contains some nice new features that deserve some explanation.

Since the the initial release contains proper packaging, you could upgrade using sudo apt-get update, sudo apt-get dist-upgrade, and sudo apt-get install of a couple of packages (chromium-webgl and nitrogen-firmware). This is a little inconvenient, though, and an updated image is easier.

For the impatient

This image contains Freescale-licensed content, so you will need to register on our web-site and log in before you can accept the license agreement and download the image from here:

This image contains support for all of our publicly available i.MX6 boards, though using it with the Nitrogen6 Lite requires a couple of tweaks (described below).

Programming the image

The image is a slightly-less-than-4GiB image file containing the partition table, so you can copy it to an SD card or SATA drive on /dev/sdc using zcat and dd like so:
~/Downloads$ sudo umount /dev/sdc*
~/Downloads$ zcat 20140925-nitrogen*.img.gz | sudo dd of=/dev/sdc bs=1M
~/Downloads$ sync
Or you can use Alex Page’s USB Image Tool under Windows.

If you’re using our latest U-Boot and a Nitrogen6 Max board, you can use the new USB Mass Storage Gadget to program the eMMC. If not, there were some notes in our first release that describe a more complicated way of programming eMMC.

Source code access

The kernel image is based on the boundary-imx_3.10.17_1.0.1_ga branch of our Github kernel repository using nitrogen6x_defconfig, tweaked slightly to include support for the Broadcom 4331 Wi-Fi/Bluetooth module on our Nitrogen6 Lite board.

Highlights of this release

Chromium Browser acceleration

Several Desktop shortcuts highlight support for various features of the Chromium Browser.


WebGL:




And HTML5:




And HTML5 video acceleration.



Note that H.264/MP4 video is not yet working.

Many thanks to Carlos Giani for all of his hard work integrating i.MX acceleration into the Chromium browser.

Bluetooth support on Nitrogen6x/6Max

On the Nitrogen6X and Nitrogen6_Max boards, the Bluetooth stack is fully integrated using the BlueMan package, as shown in the following screen-shot:



Using this image on Nitrogen6_Lite

There are a few quirks to the use of this image on Nitrogen6 Lite.

In particular:
  • The boot script requires variable dtbname in order to identify the board as a Nitrogen6_Lite,
  • The default settings of 128MiB of GPU memory are excessive, since the Nitrogen6_Lite board only has 512MiB, and
  • The Bluetooth stack is not fully integrated, and conflicts with the Nitrogen6X/6Max boards because a different chip is used.
We have a fairly easy work-around for the first two in the form of a text file named /uEnv-nit6xlite.txt. The boot script is configured as shown here to look for a file named uEnv.txt and read a set of environment variables from the file if found using the env import command of U-Boot.

If you re-name or copy the file uEnv-nit6xlite.txt to uEnv.txt on the SD card after you copy from the image downloaded, you’ll tell U-Boot to read these two variables:
gpumem=67108864
dtbname=imx6dl-nit6xlite.dtb
You can also set these at the U-Boot prompt by using the setenv command, but that’s just a tad harder, and requires access to a serial adapter:
U-Boot > setenv gpumem 67108864
U-Boot > setenv dtbname imx6dl-nit6xlite.dtb
U-Boot > saveenv
The Bluetooth conflict is overcome by manually installing a package named brcm-patchram-plus-boundary that has the tool needed to connect the Broadcom Bluetooth device to the Bluetooth subsystem:
root@nitrogen:~# apt-get install brcm-patchram-plus-boundary 
root@nitrogen:~# sync && reboot
...
The full Bluetooth stack is not (yet) functional, though, so we’ve limited testing to the use of the command-line tools:
root@nitrogen:~# hciconfig hci0
hci0:	Type: BR/EDR  Bus: UART
	BD Address: 00:00:00:00:00:00  ACL MTU: 1021:8  SCO MTU: 64:1
	DOWN 
	RX bytes:574 acl:0 sco:0 events:27 errors:0
	TX bytes:411 acl:0 sco:0 commands:27 errors:0

root@nitrogen:~# hciconfig hci0 up
root@nitrogen:~# hcitool -i hci0 scan
Scanning ...
	C4:85:08:01:FB:E3	devicename
This is effectively the same situation we were in with the TiWi Bluetooth module in our first release, so we’re making progress!

Keep in touch

We hope this helps you get started running on Ubuntu and our i.MX6 boards.

As always, please give us some feedback and let us know how things work for you.

HDMI input for i.MX6 boards via MIPI

$
0
0
This has been under radar a while, but we have a pretty cool adapter with an HDMI to MIPI bridge (Toshiba TC358743XBG) and software to use it on our i.MX6 boards.

This video shows it running on the 3.10.17 version of Linux kernel built using the Yocto tools and Freescale Community BSP:



Contact us at info@boundarydevices.com for details.

Android Kitkat Second release for i.MX6 boards

$
0
0
In our previous pre-release there were still lots of things untested, and we hadn’t yet ported to the Nitrogen6_Lite board.

We’ve done a lot more testing, and are ready to release another image that’s at least very close to being ready for production.


For the impatient

You can download images from here:

As usual, you’ll need to register on our site and agree to the EULA because it contains Freescale content. The image is a 4GB SD card image that can be restored using zcat and dd under Linux or Alex Page’s USB Image Tool under Windows.

Source code access

The sources for this release are in the boundary-kk4.4.2_1.0.0-ga branch of our new android-manifest Github project. We moved this since the previous Kitkat and Jellybean releases because the previous name made no sense.

For the newcomers

If you haven’t built our Android software from sources, there are multiple steps to the process to fulfill some of the licensing agreements. You’ll first need to:

After that, you’ll need to install the Google repo tool, and initialize a new repository more or less as follows:

~/$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo \
    > ~/bin/repo
~/$ chmod a+x ~/bin/repo
~/$ mkdir myandroid
~/$ cd myandroid
~/myandroid$ ~/bin/repo init -u git://github.com/boundarydevices/android-manifest.git \
       -b boundary-kk4.4.2_1.0.0-ga
~/myandroid$ repo sync
Note that this will download over 15GiB of source code and tools, so it will take a while.

If you’re not familiar with repo, you should check out the notes in the AOSP documentation. It’s a very nice tool for consolidating multiple source code repositories into a single project, and has lots of features for tracking changes across the various packages. The file .repo/manifests/default.xml consolidates the almost 400 packages that comprise our Android release.

You can see the structure here in our Github repository:

Once you’ve sync’d your repository, the next step is to choose the target board and build:
~/myandroid$ source build/envsetup.sh
~/myandroid$ lunch
... choose Nitrogen6x or Nit6xlite from the list of boards and then build
~/myandroid$ make 2>&1 | tee build-kk.out
A full build will take upwards of 3 hours, but incremental builds are pretty speedy if you’re changing things.

Note that the Android build process allows you to just send over changes to a USB-connected board using adb sync. To do this, you’ll need to remount /system though.

On the board:
root@nitrogen6x:# mount -o remount,rw /system
On your build PC:
~/myandroid$ adb sync
If you’re changing system components, you may need to stop and restart the Android GUI.
On the board:
root@nitrogen6x:# stop && start
If you’re changing things in the init process, you may need to reboot.

What’s missing?

The primary things that are still missing from this release are:

As always, let us know your experiences (both good and bad) when you test out this image.

Crank Software’s Storyboard

$
0
0
For U/I tools, a picture may be worth 1000 words, but a video is better.

Check out the latest demo of Crank’s Storyboard Suite running on our BD-SL-i.MX6 (SABRE Lite) board:



You simply can’t do that without powerful tools!

Contact Crank at cranksoftware.com to find out how you can enable stunning user interfaces on your products.

Dizzy release of Yocto

$
0
0




If you didn’t catch the announcement on the meta-freescale mailing list, or the one on i.MX Community, the Yocto 1.7 release (code name Dizzy) is now officially out for Freescale-based boards and it’s time to toot some horns!

This release is much more polished than previous releases, and we’d like to express our thanks to all of those involved, especially to Otavio Salvador at O.S. Systems for his stewardship of the project, Carlos Rafael Giani for his Chromium acceleration work, and Daiane Angolini for producing some great release notes and documentation. Great job folks!

Since the documentation is quite complete, this will be a short post, but we do want to encourage the use of this code base, so we put together a couple of quick images for our boards:

We missed doing this during the daisy release cycle and have had some customers reaching all the way back to our Dora image or our 3.10.17-beta image.

No mas! The current iteration supports a lot more features and is much more stable.

The images themselves are fairly mundane copies of core-image-sato, but we’ve placed the configuration on-line for reference:

You can installing these images to SD card using zcat and dd under Linux. Assuming your SD card shows up as /dev/sdc, you can use these commands to write it:

~/Downloads$ sudo umount /dev/sdc*
~/Downloads$ sudo dd if=core-image-sato-nitrogen6x-*.sdcard.gz of=/dev/sdc bs=1M
~/Downloads$ sync

You can also use Alex Page’s USB Image Creator under Windows.

As always, give us some feedback about your experience with Yocto in general, or with this release.

The post Dizzy release of Yocto appeared first on Boundary Devices.

root equals what?

$
0
0

The upcoming 3.10.31 release of the Linux kernel for our i.MX6 boards will be introducing a slight incompatibility regarding the naming of SD card devices. Because of this, the root= clause in the kernel command line will need to change, and some background information is in order.

How it was broken

In 3.10.17 and earlier kernels, SD card devices were named /dev/mmcblk0.../dev/mmcblk2 in the order in which they are enumerated, which conceals a flaw in many of our boot scripts:

Our default U-Boot command line iterates through each SD card, looking for 6x_bootscript. This allows you to have a bootable SD in either slot on our Nitrogen6x, Nitrogen6_Max, or BD-SL-i.MX6 (SABRE Lite) boards.

U-Boot’s number is used to load the kernel and Device Tree Blob, but we always assumed /dev/mmcblk0 when crafting the root= clause of the kernel command line (the bootargs variable in U-Boot).

Because of this, things would not function properly if you had both SD cards populated, but had your boot script in mmc 1 as defined by U-Boot.

How this is fixed in new kernels

The new kernel does a much more reasonable thing: it defines the mmcblkN numbering based on the SDIO bus number, which maps completely and directly to the SD card numbering in U-Boot.

Fortunately, all three of the boards above have the same mapping:

U-Boot Kernel SABRE Lite Nitrogen6X Nitrogen6_Max
mmc 0 /dev/mmcblk3 Full-sized slot Top micro SD slot removable SD
mmc 1 /dev/mmcblk4 micro SD slot Bottom micro SD slot eMMC

How we’ll handle the transition

The 3.10.31 kernel is still in Beta though, and it will take a while before everybody is up and running on the new kernel.

Because of this, we’ve introduced a new sdphys variable in our boot scripts that will choose between the two numbering schemes.

Take a look at this new if statement. If it sees that the sdphys variable is an empty string, it will assume /dev/mmcblk0 is the root device. If not, it will map the U-Boot SD card number (${disk}) to a corresponding mmcblkN.

Since none of our U-Boot images have this variable defined, the immediate effect is nothing. Once the 3.10.31 kernel is in widespread use, we’ll update the U-Boot default to have this set.

In the mean-time, if you’re testing either the 3.10.31-beta kernel or a main-line Linux kernel, you can use this bit of script to properly map your boot device by

U-Boot > setenv sdphys 1U-Boot > saveenvU-Boot > boot

For images that support RAM disks

Images that boot via RAM disks, including our Ubuntu images (Trusty and later), there’s a better way.

The /dev/disk/by-path is generally defined by udev to provide a mapping of drives by their SDIO bus, and these can be used on either the older or newer kernels without the test. The trick here is that the first-level boot is to a RAM disk that doesn’t even look at the root= clause and that clause is interpreted after udev populates the /dev/disk/by-path and /dev/disk/by-label directories.

What about Android?

Android also boots via RAM disk and uses the equivalent of /dev/disk/by-path, so Android users can ignore this post.Test

The post root equals what? appeared first on Boundary Devices.

What’s a board (and where are the knobs)?

$
0
0

What exactly do we mean by the word board? While we sometimes use the word to refer to a printed circuit board with a specific configuration, we also use the term to mean something less concrete. This post will describe the flexible bits and hopefully give you a better understanding of how our standard boards can and should be customized to meet your needs. If you’re a customer designing a SOM carrier, it will also provide some tips on how to create and maintain your designs. A follow-up post will give a concrete example of how you can use device trees to re-map our LCD interface.

As Alvin Toffler predicted in The Third Wave, the era of mass customization is upon us, and we hope this set of notes will help you deal with the specifics.

For the impatient

For any given PCB, a number of things can be customized in the boot process, and the following lists the highlights in order of frequency.

Item How frequently needed
Boot script Almost always
Kernel configuration Usually
Kernel device tree Frequently
Boot command line Sometimes
U-Boot configuration Infrequently
U-Boot sources Infrequently for standard boards, almost always on custom boards
Kernel sources Frequently for custom boards

Thankfully, the order listed above is also roughly sorted by ease of implementation, since programmers have a way of making the common stuff easy.

The rest of this post will walk through the details of each of these items.

Boot Scripts

Our current boot script consists of around 150 lines of text, up from around 60 when we first pushed to main-line U-Boot.

Most of this is meaningless for any given application. The bulk of the script is made up of conditionals that try to determine what type of display(s) you have connected and whether or not you have a RAM disk or Device Tree Blob. Once you’ve settled on a configuration, you can simplify all of this to around five lines and two statements (one of them a compound statement using the && operator):

setenv bootargs "stuff copied from /proc/cmdline";
load mmc 0 10800000 /path/to/my/uImage &&
load mmc 0 13000000 /path/to/my/dtb &&
load mmc 0 12a00000 /path/to/my/ramdisk &&
bootm 10800000 12a00000 13000000

After all, the primary purpose of U-Boot is to load and launch the kernel with proper parameters, and all of the variables live in the bootargs variable and the three files listed above (kernel, device tree and RAM disk).

Pay close attention to the first line above. If our standard boot script works for you, the pre-computed kernel command line is available to you in /proc/cmdline, all ready for cutting and pasting:

root@nitrogen6x:~# cat /proc/cmdline
enable_wait_mode=off video=mxcfb0:dev=ldb,LDB-XGA,if=RGB666 video=mxcfb1:dev=lcd,CLAA-WVGA,if=RGB666 video=mxcfb2:off video=mxcfb3:off fbmem=10M,10M console=ttymxc1,115200 vmalloc=400M consoleblank=0 vt.global_cursor_default=0 rootwait root=/dev/mmcblk0p2 mxc_hdmi.only_cea=1

When you combine this with our on-line boot script compiler, it’s really pretty simple to create your own boot script.

Kernel configuration

Our Linux kernel configuration file (nitrogen6x_defconfig) defines the set of device drivers available to the running kernel. We use this to select most of the options we support, including all of the core features of the i.MX6, as well as our touch screen displays and camera modules.

We also include support for some frequently used peripherals like USB sticks, and serial adapters, but our driver set is quite limited.

If you need additional drivers, you’ll need to use make menuconfig to customize the kernel build.

You may also want to remove drivers for parts you’re not using both to save space and time during the boot process, but also to prevent drivers like the Ilitek touch screen from trying to probe needlessly:

ili210x_i2c 2-0041: i2c transfer failed
ili210x_i2c 2-0041: Failed to get firmware version, err: -5
ili210x_i2c: probe of 2-0041 failed with error -5

The details of how to do this vary quite a bit between Yocto, Ubuntu, Android and other userspaces, but the process isn’t difficult and is generally worth some effort.

Kernel Device Trees

We’ll be following this post with another that delves deeply into device trees, but some fairly easy changes to the device tree descriptions of our boards can speed up the boot and free up pins for other uses.

In some cases, the changes can be as minor as changing this “okay” to “disabled”“.

Boot command line

We try not to impose restrictions on you, and allow booting to SATA, either SD card, or even USB stick by default. Our default bootcmd variable is what defines this through the use of the bootdevs variable and a couple of nested for loops.

If you know that you’re booting to SATA, you can speed up the boot process by over-riding this without re-compilation like so:

U-Boot > setenv bootcmd 'disk=0; dtype=sata; 
   load 10008000 sata 0 /6x_bootscript 
   && source 10008000'
U-Boot > saveenv && boot

Note that the dtype and disk variables are only here in case you try this with our standard boot script. If you have already done away with that, this isn’t needed.

Note that you can also do away with the boot script entirely by simply saving your bootargs and setting bootcmd to load and launch your kernel:

U-Boot > setenv bootargs "copied from /proc/cmdline"
U-Boot > setenv bootcmd 'load mmc 0 10800000 /path/to/my/uImage &&
load mmc 0 13000000 /path/to/my/dtb &&
load mmc 0 12a00000 /path/to/my/ramdisk &&
bootm 10800000 12a00000 13000000'
U-Boot > saveenv && boot

U-Boot configuration

Our current U-Boot binaries are around 350 KiBytes, and that size can be reduced by tweaking the board’s header file. If you look at nitrogen6x.h, you’ll find a number of macro definitions of the form CONFIG_FEATURE that enable features of U-Boot. Judicious selection of the features you need can result in a smaller image and a faster boot.

The U-Boot variable panel can also be defined at compile time to select from the list of supported displays and bypass probing for the display type. This not only speeds the boot, it also removes a potential source of failure.

Defining other things like the new sdphys variable in the board’s header file can remove the need to configure boards after shipment.

U-Boot source code

Our U-Boot doesn’t currently support using device trees for its’ own use, and pin definitions are defined in the U-Boot source files. If you want to re-purpose these, and especially if you’re designing a SOM carrier board, you may need to update the U-Boot sources directly.

Recent enhancements to U-Boot, especially Masahiro Yamada’s addition of Kconfig offers the prospect of lighter-weight modifications down the road.

Kernel sources

When all else fails, you (or we) may need to hack update the kernel sources.

If you’re using some newly released peripheral, it’s common to need a new device driver to support it.

If the device is supported in newer (or older) kernels, you may need to back-port it from another tree.

Even things as simple as connecting up a new display might involve the addition of a GPIO like our oddly-named DISP0_CONTRAST pin to enable and disable a backlight.

Summary


We hope this quick check-list gives you some ideas about how and where your product can benefit from customization.

Remember that our requirements tend to be broad because we don’t know exactly how you’ll use our boards. Once they’re in your hands, the needs tend to be much more specific, and we’re here to help you reach your targets.

The post What’s a board (and where are the knobs)? appeared first on Boundary Devices.

i.MX6 Device Tree customization

$
0
0

Starting with the release of Linux 3.5.7, a new feature known as Device Trees has fundamentally changed the way that boards are represented by the kernel. The “C” modules used in earlier kernels has been replaced with Device Tree Blobs (DTBs) as a way of representing the structure and connections for a particular board.

There’s a great deal of documentation on-line, including this set at elinux.org, so we won’t sweat the details.Instead, this post will explain how you can create device trees that change our standard boards to over-ride their normal functionality. An example will be presented that re-purposes the parallel LCD port as a set of SPI, GPIO, I2C, and PWM ports.

For the impatient

  • We’ve created three new device trees that re-purposes the parallel LCD port (J15) on our Nitrogen6x, BD-SL-i.MX6 and Nitrogen6_Max boards.
  • If you’re not using this port, you can configure U-Boot to load the alternate DTB and gain additional I/O.
  • We’ve created a break-out board to make it easier to connect to these pins.
  • You can use the same approach to build your own Device Trees and customize the kernel for your own purposes.
  • The easiest functions to re-map are the Parallel LCD port (J15), the Parallel Camera port (J5), the Android Button connector (J14) and the Boot mode/EIM connector (J12).

Background

There’s a great description about the rationale for the usage of Device Trees here on the Ubuntu Wiki.

To quote:

As the number of chip-sets increase, so too does the software needed to support them at the kernel level.

To elaborate on Ubuntu’s comment:

As the number of boards increases, so too does the software…

When you add in the specific requirements for even standard boards as discussed in our earlier post, things get out of control quickly.

The Flattened Device Tree specification helps to bring some order to this.

Immediate (and visible) impact

As a practical matter, the first thing you’ll need to know about device trees is that we’re packaging them separately from the kernel.

In earlier kernels, we’ve booted by simply loading a kernel (generally uImage), setting bootargs to point at a root filesystem and launching with a single-argument bootm command.

With device-tree enabled kernels, we also need to load a .dtb file and pass an additional argument to bootm or bootz.

We’ve updated our boot scripts to do this, and even to compute the file name based on the CPU and board type but haven’t commented much about it in the blog.

Note that if you set the dtbname environment variable, the boot script will bypass the test of board and cpu type.

U-Boot > setenv dtbname "my-custom.dtb"
U-Boot > saveenv

Division of labor

The key point in the separation of Device Tree and kernel is that:

  • The kernel and any loadable modules defines the potential set of drivers supported, and
  • The Device Tree defines the specific bindings for things that aren’t on enumerable busses like PCIe or USB

Note that the kernel and DTB can be bound together as described here, but this sacrifices much of the feature of device trees. This type of binding can be useful in speeding the boot, and securing an image, but it’s something that should happen late in the development process.

Our specifics

If you compare the file arch/arm/boot/dts/Makefile in our the boundary-imx_3.10.17_1.0.2_ga branch of our kernel repository against the Freescale release, you’ll see that we’ve added 19 different targets to represent our standard boards and custom designs using 3.10.17.

~/linux-imx6$ git diff --stat origin/imx_3.10.17_1.0.2_ga arch/arm/boot/dts/Makefile
 arch/arm/boot/dts/Makefile | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

If you look closely at the details, you’ll see that some boards have multiple variants for the Quad/Dual (q) and Dual-Lite/Solo processor variants to support the entire processor lineup:

~/linux-imx6$ git diff origin/imx_3.10.17_1.0.2_ga arch/arm/boot/dts/Makefile \
    | grep nitrogen6x
+	imx6dl-nitrogen6x.dtb \
+	imx6q-nitrogen6x.dtb \

This is done because the device tree bindings contain precise memory addresses for various peripherals and registers, and many of those addresses differ between the two processor variants.

To avoid duplication of the common parts, we’ve split the definition of our device trees into a common include file with the prefix imx6qdl- and a file extension of .dtsi and variant-specific files with the prefix of imx6q- and imx6dl- that #include the .dtsi file.

For example, take a look at the Device Tree Source (dts) files for the BD-SL-i.MX6:

~/linux-imx6$ ls arch/arm/boot/dts/imx6*sabrelite*.dts* | grep -v nolcd
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi
arch/arm/boot/dts/imx6q-sabrelite.dts
~/linux-imx6$ head -n 20 arch/arm/boot/dts/imx6q-sabrelite.dts
...
#include 
#include "imx6q.dtsi"
#include "imx6qdl-sabrelite.dtsi"

/ {
	model = "Freescale i.MX6 Quad SABRE Lite Board";

Notice that the file imx6q-sabrelite.dts uses the #include directive to pull in both the imx6q.dtsi and imx6qdl-sabrelite.dtsi headers. Also note that the imx6q.dtsi and imx6dl.dtsi files in turn #include the file imx6qdl.dtsi, which is a Freescale-maintained header defining common parts of the entire family. Most of the components in the common header are disabled by default, so the board-level files need to enable them explicitly.

This pattern is repeated for all of our boards, and if we’re offering options for other processors, you’ll see a imx6dl- and imx6q- version
as with the Nitrogen6X:

~/linux-imx6$ ls arch/arm/boot/dts/imx6*nitrogen6x*.dts* | grep -v nolcd
arch/arm/boot/dts/imx6dl-nitrogen6x.dts
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
arch/arm/boot/dts/imx6q-nitrogen6x.dts

Structure of DTS

The structure of a Device tree file (after the preprocessor runs) is

/dts-v1/;

/ {
 #address-cells = ;
 #size-cells = ;
 chosen { };
 aliases { };
 memory { device_type = "memory"; reg = ; };
};
/ {
    additional declarations
};

&alias {
    override or augmentation of declaraion
};

The declarations section will define the CPU, RAM, busses, and peripherals connected to the CPU, and the references that follow may augment or override components declared previously through the use of aliases.

Okay or disabled

Components default to enabled (status="ok" or status="okay", but may be disabled explicitly by setting the status property to "disabled". For instance, if a particular board has a SATA bus defined, it might be disabled through a fragment like this:

&sata {
 status = "disabled";
};

Drivers and Pin Control blocks

One of the coolest features of i.MX processors is the ability to re-map the functionality of individual pins through a technique called pin muxing. Through this feature, a huge number of the 624 balls on the bottom of an i.MX6 can be re-purposed to as many as five different functions.

Refer to Chapter 36 of the i.MX6DQ Reference Manual for details.

This pin-muxing is common enough in ARM SOCs that it has direct support in the device tree implementation (for most drivers) and is generally implemented by
having a driver block like the LCD driver refer to a pinctrl block.

In the Nitrogen6x DTS file, you’ll find this:

	lcd0: lcd@0 {
		compatible = "fsl,lcd";
...
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_ipu1_4>;
		status = "okay";
	};

The declaration of pinctrl-0 is in the general

	pinctrl_ipu1_4: ipu1grp-4 {
		fsl,pins = <
			MX6QDL_PAD_DI0_DISP_CLK__IPU1_DI0_DISP_CLK 0x10
			MX6QDL_PAD_DI0_PIN15__IPU1_DI0_PIN15       0x10
			MX6QDL_PAD_DI0_PIN2__IPU1_DI0_PIN02        0x10
			MX6QDL_PAD_DI0_PIN3__IPU1_DI0_PIN03        0x10
			MX6QDL_PAD_DISP0_DAT0__IPU1_DISP0_DATA00   0x10
        ...

Some of the details are omitted, but the key concept is that the LCD driver refers to the pinctrl block, which defines the configuration of the balls or pads which carry the signals.

Note that the references to the constants MX6QDL_PAD_... above have two parts, separated by double-underscores. The left-hand side is a reference to the pad name (the ball on the BGA). The right hand side is a reference to the chosen function. In the lines shown above, the mapping of the DI0 pads is made to their primary function as IPU_DI functions (short-hand for Image Processing Unit Display Interface, or parallel display).

If the lcd0 driver is instantiated, the pins will be configured, but not otherwise.

You may now be figuring out that we can prevent this mapping by setting the status of the lcd0 element to "disabled":

&lcd0 {
    status="disabled";
};

This is exactly what we've done on our way to re-mapping the functionality of J15 (the parallel display connector). You can see this in the device tree include file imx6qdl-boundary-nolcd.dtsi.

Looking further into that file, you'll also see that we've disabled the backlight driver:

&backlight_lcd {
	status = "disabled";
};

And the following bits disable or define some new functions of the pins on the display connector.

The new function(s) of J15

At this point, it's time to start describing the precise functionality for the new device tree configuration on ourNitrogen6x, BD-SL-i.MX6 and Nitrogen6_Max boards.

The following table shows the Voltage, pin numbers (for the breakout board and i.MX6 board), pad name, and function of each pin:

Voltage breakout board
pin number
J15 pin number Pad name Function
5V 1 40 +5V  
5V 2 39 +5V  
5V 3 38 +5V  
3.3V 4 37 SD1_DAT3 PWM1_OUT
3.3V 5 36 GPIO16 I2C3_SDA
3.3V 6 35 GPIO5 I2C3_SCL
3.3V 11 30 DISP0_DISP_CLK GP4:16
3.3V 7 34 DISP0_PIN15 (DE) GP4:17
3.3V 9 32 DISP0_PIN2 (HSYNC) GP4:18
3.3V 8 33 DISP0_PIN3 (VSYNC) GP4:19
3.3V 37 4 DISP0_PIN4 GP4:20
3.3V 20 21 DISP0_DAT0 ECSPI3_SCLK
3.3V 19 22 DISP0_DAT1 ECSPI3_MOSI
3.3V 18 23 DISP0_DAT2 ECSPI3_MISO
3.3V 17 24 DISP0_DAT3 ECSPI3_SS0
3.3V 16 25 DISP0_DAT4 ECSPI3_SS1
3.3V 15 26 DISP0_DAT5 ECSPI3_SS2
3.3V 14 27 DISP0_DAT6 ECSPI3_SS3
3.3V 13 28 DISP0_DAT7 GP4:28
3.3V 28 13 DISP0_DAT8 GP4:29
3.3V 27 14 DISP0_DAT9 PWM2_OUT
3.3V 26 15 DISP0_DAT10 GP4:31
3.3V 25 16 DISP0_DAT11 GP5:05
3.3V 24 17 DISP0_DAT12 GP5:06
3.3V 23 18 DISP0_DAT13 GP5:07
3.3V 22 19 DISP0_DAT14 GP5:08
3.3V 21 20 DISP0_DAT15 GP5:09
3.3V 36 5 DISP0_DAT16 ECSPI2_MOSI
3.3V 35 6 DISP0_DAT17 ECSPI2_MISO
3.3V 34 7 DISP0_DAT18 ECSPI2_SS0
3.3V 33 8 DISP0_DAT19 ECSPI2_SCLK
3.3V 32 9 DISP0_DAT20 ECSPI1_SCLK
3.3V 31 10 DISP0_DAT21 ECSPI1_MOSI
3.3V 30 11 DISP0_DAT22 ECSPI1_MISO
3.3V 29 12 DISP0_DAT23 ECSPI1_SS0
GND 38 3 GND  
GND 39 2 GND  
GND 40 1 GND  

To summarize this, we've added:

  • Two PWM outputs
  • Three SPI ports. Two of these have a single chip-select. The third (SPI3) has four chip-selects, and
  • Thirteen bi-directional GPIO ports, and
  • We also retained the I2C3 functions on pins 35 and 36. These are used for a touch-screen controller in our normal use with our Nit6X_800x480 display

This is not bad for the addition of a single .dtsi file. Note that we've #include'd that file in three distinct device trees, and that these will be included in future images based on kernel 3.10.17+:

imx6q-sabrelite.dtb
imx6q-nitrogen6x.dtb
imx6q-nitrogen6_max.dtb

To re-iterate what was said above, you can use these functions by simply setting the dtbname variable in U-Boot. For example if you're running on a Nitrogen6_Max board, you'd enter these commands:

U-Boot > setenv dtbname imx6q-nitrogen6_max.dtb
U-Boot > saveeenv
U-Boot > boot

Note that neither the I2C nor SPI drivers have any kernel drivers associated with them, so you'll need to use the /dev/i2c or spidev interfaces to access them.

You can access the GPIO pins through /sys/class/gpio. For example, to toggle pin 16 (GP5:05), you can do this:

root@nitrogen6x:~# echo 133 > /sys/class/gpio/export
root@nitrogen6x:~# echo out > /sys/class/gpio/gpio133/direction
root@nitrogen6x:~# echo 1 > /sys/class/gpio/gpio133/value
root@nitrogen6x:~# echo 0 > /sys/class/gpio/gpio133/value

The GPIO numbers are calculated as ((bank-1)*32)+pin.

Other re-mapping possibilities


Note that you can make other choices for the use of the pins on J15. If you simply want GPIOs, you can remove the other functions in imx6qdl-boundary-nolcd.dtsi and add new entries to the pinctrl_lcd_gpios_1 block.

If you have other drivers to attach to the I2C bus, you can add them in this file, or even over-ride the file with your own overlay.

The primary reason we chose to build a break-out board for the LCD connector is that it contains a lot of pins. As mentioned in the For the impatient section above, there are other high pin count connectors that aren't often used.

  • The parallel camera connector (J5). This connector contains 33 pins, and 20 un-buffered signals. It also contains 2.5V power supplies and ground.
  • The Android button connector (J14). This connector contains 6 usable, un-buffered signals, plus a ground.
  • The Boot mode/EIM connector (J12). This 40-pin connector contains 32 un-buffered signals, plus 3.3V and ground.

If you're designing a SOM carrier and need some additional I/O, you'll also find that the pins on these connectors are the easiest to re-map in software, since their primary functionality can be removed in large sets with a minimum of code change.

Summary


This has been a long post and covered a lot of ground, but it is by no means a reference. Some of the links above are likely required reading before you can be completely comfortable with the use of device trees.

We do hope that this post gives you some encouragement and a better understanding of how device trees can help you either use our standard boards, or define your own variants and deliver better product faster.

As always, let us know if this is helpful, and where (not if) there are confusing bits.

The post i.MX6 Device Tree customization appeared first on Boundary Devices.

Commonly replaced peripherals

$
0
0

In our "What’s a board?" post, we described various ways that a board could be customized, and in the follow up " i.MX6 Device Tree customization", we showed how we created variants of our boards that re-purpose the parallel LCD pins. We also suggested the use of three common connectors when looking for additional I/O in a custom application.

This post contains the details of the functions available on those three most commonly replaced peripherals (parallel LCD, parallel camera, and Android buttons), and details the functions available on each.

If you’re designing a SOM carrier, or looking to enhance one of our standard boards, we strongly suggest that you look here first to see if these pins will provide what you need. Doing so will simplify your software development and may allow you to test the functionality before spinning a full custom board or SOM carrier.

Android button connector

Pin Pad / signal Volts Default ALT0 ALT1 ALT2 ALT3 ALT4 ALT5 ALT6
1 ON_OFF N.O. switch
2 KEY_VOL_UP 3.3V GP7:13 ESAI_TX1 ENET_RX_CLK SD3_VSELECT SDMA_EV1 ASRC_CLK GP7:13 SNVS_VIO5
3 HOME 3.3V GP2:04 NAND_D04 SD2_D4 GP2:04
4 SEARCH 3.3V GP2:03 NAND_D03 SD1_D7 GP2:03
5 BACK 3.3V GP2:02 NAND_D02 SD1_D6 GP2:02
6 MENU 3.3V GP2:01 NAND_D01 SD1_D5 GP2:01
7 KEY_VOL_DN 3.3V GP4:05 KEY_COL5 1588/OUT SPDIF_OUT CLKO1 SPI1_RDY GP4:05 ENET_TX_ER
8 GND

J15 (Parallel RGB display)

Pin Pad / signal Volts Default ALT0 ALT1 ALT2 ALT3 ALT4 ALT5 ALT6 ALT7
1 GND
2 GND
3 GND
4 DISP0_CNTRST 3.3V N/A IPU1_DI0_PIN04 IPU2_DI0_PIN04 AUD6_RXD SD1_WP GP4:20
5 DISP0_DAT16 3.3V IPU1_DI0_D16 IPU1_DI0_D16 IPU2_DI0_D16 SPI2_MOSI AUD5_TXC SDMA_EV0 GP5:10
6 DISP0_DAT17 3.3V IPU1_DI0_D17 IPU1_DI0_D17 IPU2_DI0_D17 SPI2_MISO AUD5_TXD SDMA_EV1 GP5:11
7 DISP0_DAT18 3.3V IPU1_DI0_D18 IPU1_DI0_D18 IPU2_DI0_D18 SPI2_SS0 AUD5_TXFS AUD4_RXFS GP5:12 EIM_CS2_B
8 DISP0_DAT19 3.3V IPU1_DI0_D19 IPU1_DI0_D19 IPU2_DI0_D19 SPI2_SCLK AUD5_RXD AUD4_RXC GP5:13 EIM_CS3_B
9 DISP0_DAT20 3.3V IPU1_DI0_D20 IPU1_DI0_D20 IPU2_DI0_D20 SPI1_SCLK AUD4_TXC GP5:14
10 DISP0_DAT21 3.3V IPU1_DI0_D21 IPU1_DI0_D21 IPU2_DI0_D21 SPI1_MOSI AUD4_TXD GP5:15
11 DISP0_DAT22 3.3V IPU1_DI0_D22 IPU1_DI0_D22 IPU2_DI0_D22 SPI1_MISO AUD4_TXFS GP5:16
12 DISP0_DAT23 3.3V IPU1_DI0_D23 IPU1_DI0_D23 IPU2_DI0_D23 SPI1_SS0 AUD4_RXD GP5:17
13 DISP0_DAT8 3.3V IPU1_DI0_D8 IPU1_DI0_D8 IPU2_DI0_D8 PWM1_OUT WDOG1_B GP4:29
14 DISP0_DAT9 3.3V IPU1_DI0_D9 IPU1_DI0_D9 IPU2_DI0_D9 PWM2_OUT WDOG2_B GP4:30
15 DISP0_DAT10 3.3V IPU1_DI0_D10 IPU1_DI0_D10 IPU2_DI0_D10 GP4:31
16 DISP0_DAT11 3.3V IPU1_DI0_D11 IPU1_DI0_D11 IPU2_DI0_D11 GP5:05
17 DISP0_DAT12 3.3V IPU1_DI0_D12 IPU1_DI0_D12 IPU2_DI0_D12 GP5:06
18 DISP0_DAT13 3.3V IPU1_DI0_D13 IPU1_DI0_D13 IPU2_DI0_D13 AUD5_RXFS GP5:07
19 DISP0_DAT14 3.3V IPU1_DI0_D14 IPU1_DI0_D14 IPU2_DI0_D14 AUD5_RXC GP5:08
20 DISP0_DAT15 3.3V IPU1_DI0_D15 IPU1_DI0_D15 IPU2_DI0_D15 SPI1_SS1 SPI2_SS1 GP5:09
21 DISP0_DAT0 3.3V IPU1_DI0_D0 IPU1_DI0_D0 IPU2_DI0_D0 SPI3_SCLK GP4:21
22 DISP0_DAT1 3.3V IPU1_DI0_D1 IPU1_DI0_D1 IPU2_DI0_D1 SPI3_MOSI GP4:22
23 DISP0_DAT2 3.3V IPU1_DI0_D2 IPU1_DI0_D2 IPU2_DI0_D2 SPI3_MISO GP4:23
24 DISP0_DAT3 3.3V IPU1_DI0_D3 IPU1_DI0_D3 IPU2_DI0_D3 SPI3_SS0 GP4:24
25 DISP0_DAT4 3.3V IPU1_DI0_D4 IPU1_DI0_D4 IPU2_DI0_D4 SPI3_SS1 GP4:25
26 DISP0_DAT5 3.3V IPU1_DI0_D5 IPU1_DI0_D5 IPU2_DI0_D5 SPI3_SS2 AUD6_RXFS GP4:26
27 DISP0_DAT6 3.3V IPU1_DI0_D6 IPU1_DI0_D6 IPU2_DI0_D6 SPI3_SS3 AUD6_RXC GP4:27
28 DISP0_DAT7 3.3V IPU1_DI0_D7 IPU1_DI0_D7 IPU2_DI0_D7 SPI3_RDY GP4:28
29 GND
30 DISP0_CLK 3.3V IPU1_DI0_CLK IPU1_DI0_CLK IPU2_DI0_CLK GP4:16
31 GND
32 DISP0_HSYNC 3.3V IPU1_DI0_PIN02 IPU1_DI0_PIN02 IPU2_DI0_PIN02 AUD6_TXD GP4:18
33 DISP0_VSYNC 3.3V IPU1_DI0_PIN03 IPU1_DI0_PIN03 IPU2_DI0_PIN03 AUD6_TXFS GP4:19
34 DISP0_DRDY 3.3V IPU1_DI0_PIN15 IPU1_DI0_PIN15 IPU2_DI0_PIN15 AUD6_TXC GP4:17
35 I2C3_SCL 3.3V I2C3_SCL ESAI_TX2_RX3 KEY_ROW7 CLKO1 GP1:05 I2C3_SCL ARM_EVENTI
36 I2C3_SDA 3.3V I2C3_SDA ESAI_TX3_RX2 1588/IN ENET_REF_CLK SD1_LCTL SPDIF_IN GP7:11 I2C3_SDA JTAG_DE_B
37 PWM1 3.3V PWM1_OUT SD1_D3 SPI5_SS2 GPT_CMP3 PWM1_OUT WDOG2_B GP1:21 WDOG2_RST
38 +5V
39 +5V
40 +5V

J5 (CSI0 parallel camera interface)

Pin Pad / signal Volts Default ALT0 ALT1 ALT2 ALT3 ALT4 ALT5 ALT6 ALT7
1 GND
2 CSI0_DAT19 2.5V IPU1_CSI0_D19 IPU1_CSI0_D19 EIM_D15 UART5_CTS GP6:05
3 CSI0_DAT18 2.5V IPU1_CSI0_D18 IPU1_CSI0_D18 EIM_D14 UART5_RTS GP6:04 ARM_TR15
4 CSI0_DAT17 2.5V IPU1_CSI0_D17 IPU1_CSI0_D17 EIM_D13 UART4_CTS GP6:03 ARM_TR14
5 CSI0_DAT16 2.5V IPU1_CSI0_D16 IPU1_CSI0_D16 EIM_D12 UART4_RTS GP6:02 ARM_TR13
6 CSI0_DAT15 2.5V IPU1_CSI0_D15 IPU1_CSI0_D15 EIM_D11 UART5_RXD GP6:01 ARM_TR12
7 CSI0_DAT14 2.5V IPU1_CSI0_D14 IPU1_CSI0_D14 EIM_D10 UART5_TXD GP6:00 ARM_TR11
8 CSI0_DAT13 2.5V IPU1_CSI0_D13 IPU1_CSI0_D13 EIM_D09 UART4_RXD GP5:31 ARM_TR10
9 CSI0_DAT12 2.5V IPU1_CSI0_D12 IPU1_CSI0_D12 EIM_D08 UART4_TXD GP5:30 ARM_TR09
10 CSI0_DAT11 2.5V N/A IPU1_CSI0_D11 AUD3_RXFS SPI2_SS0 UART1_RXD GP5:29 ARM_TR08
11 CSI0_DAT10 2.5V N/A IPU1_CSI0_D10 AUD3_RXC SPI2_MISO UART1_TXD GP5:28 ARM_TR07
12 CSI0_DAT9 2.5V N/A IPU1_CSI0_D09 EIM_D07 SPI2_MOSI KEY_ROW7 I2C1_SCL GP5:27 ARM_TR06
13 CSI0_DAT8 2.5V N/A IPU1_CSI0_D08 EIM_D06 SPI2_SCLK KEY_COL7 I2C1_SDA GP5:26 ARM_TR05
14 I2C2_SCL 3.3V I2C2_SCL SPI1_SS3 ENET_CRS HDMI_SCL KEY_COL3 I2C2_SCL GP4:12 SPDIF_IN
15 I2C2_SDA 3.3V I2C2_SDA 32K_OUT ASRC_CLK HDMI_SDA KEY_ROW3 I2C2_SDA GP4:13 SD1_VSEL
16 GND
17 GPIO_3_CLKO2 3.3V CLKO2 ESAI_RXC I2C3_SCL CLK_24M CLKO2 GP1:03 USB_H1OC MLB_CLK
18 GND
19 +2.5V
20 +2.5V
21 +2.5V
22 +2.5V
23 GND
24 CSI0_DATA_EN 2.5V IPU1_CSI0_EN IPU1_CSI0_EN EIM_D00 GP5:20 ARM_TRCLK
25 GND
26 CSI0_RST 3.3V GP1:08 ESAI_TX5_RX0 REF_CLK_32K EPIT2_OUT CAN1_RX UART2_RXD GP1:08 SPDIF_CLK OTG_PWAKE
27 CSI0_VSYNC 2.5V IPU1_CSI0_VSYN IPU1_CSI0_VSYN EIM_D01 GP5:21 ARM_TR00
28 CSI0_HSYNC 2.5V IPU1_CSI0_HSYN IPU1_CSI0_HSYN CLKO1 GP5:19 ARM_TRCTL
29 GND
30 CSI0_PIXCLK 2.5V IPU1_CSI0_CLK IPU1_CSI0_CLK GP5:18 ARM_EVENTO
31 GP6 3.3V GP1:06 ESAI_TX_CLK I2C3_SDA GP1:06 SD2_LCTL MLB_SIG
32 GND
33 GP1_16 3.3V N/A SD1_D0 SPI5_MISO GPT_CAP1 GP1:16

The post Commonly replaced peripherals appeared first on Boundary Devices.

Ubuntu Trusty December 2014 release

$
0
0

It’s the middle of December and time for an updated image with Ubuntu 14.04 (code name Trusty) for our i.MX6 boards. It’s also time that we pushed a console-only image for those using our boards in applications that don’t require X.

You can download the images from here:

In addition to general updates to our kernel and other packages, the LXDE image contains support for semi-accelerated Qt5. Note that this is based on Ubuntu’s release of Qt 5.2.1+dsfg. If you want the best-performing Qt5 release, please check out The Qt Company’s product.

The detailed description of our changes is here:

2014-12-16: N.B.: We updated these images from the original 20141205 and 20141212 versions. We upgraded the bluetooth firmware to the newest one.

Programming the image

The images are slightly-less-than-4GiB image files containing the partition table, so you can copy it to an SD card or SATA drive on /dev/sdc using zcat and dd like so:

~/Downloads$ sudo umount /dev/sdc*
~/Downloads$ zcat 201412*.img.gz | sudo dd of=/dev/sdc bs=1M
~/Downloads$ sync

Or you can use Alex Page’s USB Image Tool under Windows.

If you’re using our latest U-Boot and a Nitrogen6 Max board, you can use the new USB Mass Storage Gadget to program the eMMC. If not, there were some notes in our first release that describe a more complicated way of programming eMMC.

The post Ubuntu Trusty December 2014 release appeared first on Boundary Devices.


Protected: Qt for Device Creation

Boot flash access from Linux

$
0
0

Every so often, we’re asked about accessing the Boot ROM (flash) from Linux. Sometimes it’s related to the question of upgrading U-Boot. Other times the question surrounds changing U-Boot environment variables or simply using the flash EEPROM to store some board-specific data.

In this post, we’ll describe the basics of how this work and give some examples of how the pieces of software fit together.

Quick reference for the impatient

  • The MTD (Memory Technology Device) driver is used to map the serial EEPROM to devices
  • The devices involved are named /dev/mtd*:
    root@trusty-dev:~# ls -l /dev/mtd*
    crw------- 1 root root 90, 0 Jan  9 11:13 /dev/mtd0
    crw------- 1 root root 90, 1 Jan  9 11:13 /dev/mtd0ro
    crw------- 1 root root 90, 2 Jan  9 11:13 /dev/mtd1
    crw------- 1 root root 90, 3 Jan  9 11:13 /dev/mtd1ro
    crw------- 1 root root 90, 4 Jan  9 11:13 /dev/mtd2
    crw------- 1 root root 90, 5 Jan  9 11:13 /dev/mtd2ro
    brw-rw---- 1 root disk 31, 0 Jan  9 11:13 /dev/mtdblock0
    brw-rw---- 1 root disk 31, 1 Jan  9 11:13 /dev/mtdblock1
    brw-rw---- 1 root disk 31, 2 Jan  9 11:13 /dev/mtdblock2
    
  • The primary utilities used to read and write to these devices are in the mtd-utils package and are maintained at http://www.linux-mtd.infradead.org/
  • The U-Boot utilities fw_printenv and fw_setenv as described by the Wiki at Denx Software Engineering
  • We store our environment variables in the second partition of the flash:
    root@trusty-dev:~# cat /etc/fw_env.config 
    /dev/mtd1	0x00000	0x2000	0x1000	2
    
  • You can override our default partitioning by adding a clause mtdparts= to your kernel command line in your boot script. The full documentation is here in the Kconfig file
  • The name of the MTD partition will vary by kernel version, and is spi32766.0 in kernels 3.10.17 and 3.10.31.
  • This example will reserve 16k for a splash screen, 4k for a data partition, and leave the rest unidentified:
    mtdparts=spi32766.0:768k(U-Boot),8k(Env),16k(splash),4k(mydata),-(rest)
    
  • The file /proc/mtd can be used to see the current partitioning:
    root@trusty-dev:~# cat /proc/mtd    
    dev:    size   erasesize  name
    mtd0: 000c0000 00001000 "U-Boot"
    mtd1: 00002000 00001000 "Env"
    mtd2: 00001000 00001000 "mydata"
    mtd3: 0013d000 00001000 "rest"
    
  • Our standard serial EEPROM is 2MiBytes.
  • We reserve 768k for the U-Boot boot loader, and 8k for the U-Boot environment block, so there’s a little over 1MiB available for other uses
  • U-Boot versions before 2014.07 didn’t properly handle this. A patch from Dustin Byford may be needed if you’re using an old version of fw_setenv.

Maybe that wasn’t such a quick reference.

There are a lot of details to consider when describing things, but the basics are fairly simple. The mtd device driver(s) provide access to the serial EEPROM through a set of character devices, each of which corresponds to a region of the 2MiB of storage.

Background


We use a lot of jargon above, which may not be
  • EEPROM == Electrically Erasable Programmable Read Only Memory
  • NOR = Not OR – refers to the way that the memory is stored and this has implications on the characteristics of the memory. In particular, NOR flash is very reliable and doesn’t require error correction. Refer to this Wikipedia entry for more details about flash memory
  • SPI NOR/serial EEPROM – refers to the fact that we use the Serial Peripheral Interface (SPI) bus to communicate with the ROM. This is a serial bus, with a clock, two data lines (MOSI and MISO) and a chip select.
  • Boot ROM – We program the fuses on our i.MX6-based boards to point at the serial EEPROM, so we refer to it as the Boot ROM

Simplest usage


You can access the devices using normal filesystem calls for reading:
root@trusty-dev:~# hexdump -C /dev/mtd1ro  | head
00000000  9d 6d 56 c6 62 61 75 64  72 61 74 65 3d 31 31 35  |.mV.baudrate=115|
00000010  32 30 30 00 62 6f 61 72  64 3d 6e 69 74 72 6f 67  |200.board=nitrog|
00000020  65 6e 36 78 00 62 6f 6f  74 63 6d 64 3d 66 6f 72  |en6x.bootcmd=for|
00000030  20 64 74 79 70 65 20 69  6e 20 24 7b 62 6f 6f 74  | dtype in ${boot|
00000040  64 65 76 73 7d 3b 20 64  6f 20 69 66 20 69 74 65  |devs}; do if ite|
00000050  73 74 2e 73 20 22 78 75  73 62 22 20 3d 3d 20 22  |st.s "xusb" == "|
00000060  78 24 7b 64 74 79 70 65  7d 22 20 3b 20 74 68 65  |x${dtype}" ; the|
00000070  6e 20 75 73 62 20 73 74  61 72 74 20 3b 66 69 3b  |n usb start ;fi;|
00000080  20 66 6f 72 20 64 69 73  6b 20 69 6e 20 30 20 31  | for disk in 0 1|
00000090  20 3b 20 64 6f 20 24 7b  64 74 79 70 65 7d 20 64  | ; do ${dtype} d|

The simplest way to program the serial EEPROM is to use the flash_erase tool to erase a partition and flashcp to program it.

root@trusty-dev:~# flash_erase /dev/mtd1 0 0
Erasing 4 Kibyte @ 1000 -- 100 % complete

root@trusty-dev:~# hexdump -C /dev/mtd1ro  | head
00000000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
*
00002000

root@trusty-dev:~# flashcp u-boot-env /dev/mtd1
root@trusty-dev:~# hexdump -C /dev/mtd1ro  | head
00000000  fe 4c 3c e6 62 61 75 64  72 61 74 65 3d 31 31 35  |.L<.baudrate=115|
00000010  32 30 30 00 62 6f 61 72  64 3d 6e 69 74 72 6f 67  |200.board=nitrog|
00000020  65 6e 36 78 00 62 6f 6f  74 32 71 74 5f 75 70 64  |en6x.boot2qt_upd|
00000030  61 74 65 5f 73 74 61 74  65 3d 76 61 6c 69 64 00  |ate_state=valid.|
00000040  62 6f 6f 74 61 72 67 73  3d 65 6e 61 62 6c 65 5f  |bootargs=enable_|
00000050  77 61 69 74 5f 6d 6f 64  65 3d 6f 66 66 20 63 6f  |wait_mode=off co|
00000060  6e 73 6f 6c 65 3d 74 74  79 6d 78 63 31 2c 31 31  |nsole=ttymxc1,11|
00000070  35 32 30 30 20 76 6d 61  6c 6c 6f 63 3d 34 30 30  |5200 vmalloc=400|
00000080  4d 20 63 6f 6e 73 6f 6c  65 62 6c 61 6e 6b 3d 30  |M consoleblank=0|
00000090  20 76 69 64 65 6f 3d 6d  78 63 66 62 30 3a 64 65  |video=mxcfb0:de|

U-Boot environment access

The tools fw_printenv and fw_setenv can be used to get and set environment variables:

root@trusty-dev:~# fw_printenv | head -n 3
baudrate=115200
board=nitrogen6x
boot2qt_update_state=valid

root@trusty-dev:~# fw_printenv board
board=nitrogen6x

root@trusty-dev:~# fw_setenv board myboard
root@trusty-dev:~# fw_printenv board
board=myboard
To clear an environment variable, use a single parameter (the variable name) to fw_setenv:
root@trusty-dev:~# fw_setenv blah BLAH
root@trusty-dev:~# fw_printenv blah
blah=BLAH
root@trusty-dev:~# fw_setenv blah 
root@trusty-dev:~# fw_printenv blah
## Error: "blah" not defined

These utilities require a configuration file in /etc/fw_env.config:

root@trusty-dev:~# fw_printenv
Cannot parse config file: No such file or directory
root@trusty-dev:~# cat > /etc/fw_env.config
/dev/mtd1	0x00000	0x2000	0x1000	2
^D
root@trusty-dev:~# fw_printenv board
board=nitrogen6x

As mentioned above, they also require a patch for versions that pre-date U-Boot 2014.07:

root@trusty-dev:~# fw_setenv board myboard
End of range reached, aborting
Error: can't write fw_env to flash

Other uses


The serial EEPROM that we use for boot are not large enough to store a typical Linux kernel or RAM disk, but they
can be used to store other things.

We mentioned splash screens, which are a natural fit, since they can provide a polished output even if no bootable SD card is present.

They can be used to store other things as well, as long as you keep a handful of things in mind:

  • Flash is quick to write, but slow to erase
  • Flash EEPROM wears out based on erase cycles
  • The parts we use are rated to 100,000 erase cycles
  • Erasing a sector sets all bits to 1's

This form of storage is especially suitable for things that are small and infrequently written such as serial numbers, machine configuration, maintenance logs and the like.

We hope this helps you understand how to get the most out of your Boundary Devices board.

As always, contact us if you have questions or concerns.

The post Boot flash access from Linux appeared first on Boundary Devices.

Cellular modems on i.MX6 boards under Ubuntu

$
0
0

We’ve had lots of customers ask about cellular modem support on our i.MX6 boards, and in the past, have mostly just shrugged.

Since most cell modems are USB or PCIe devices, configuration is a software task, and mostly done in userspace. The steps are also different for Android, embedded Linux and desktop distributions.

In other words, its complicated.

In this post, we’ll walk through all of the steps needed to configure a specific set of modems under Ubuntu as a reference. If you’re using another modem or another userspace, the details may be different, but the fundamentals will be the same.

We used the Huawei E3131 USB dongle , and Huawei MU609 Mini-PCIe during this process, and will be adding them to our default kernels going forward.

As you can see in this patch, we did have to add some USB device ids and make minor updates to the kernel as provided by the vendor. In the process, we should now also support the following Huawei models for various regions and carriers:

  • MC323   CDMA: Downlink:153.6 kbps, Uplink: 153.6 kbps
  • MU509   WDCMA: Downlink:3.6 Mbps, Uplink: 384 kbps
  • MC509   EVDO: Downlink:3.1 Mbps, Uplink: 1.8 Mbps
  • MU609   HSPA+: Downlink:14.4 Mbps, Uplink: 5.76 Mbps
  • MU709   HSPA+: Downlink:21.6 Mbps, Uplink: 5.76 Mbps
  • ME906   LTE: Downlink:100 Mbps, Uplink: 50 Mbps
  • ME909   LTE: Downlink:100 Mbps, Uplink: 50 Mbps
  • ME936   LTE: Downlink:100 Mbps, Uplink: 50 Mbps

For the impatient

These images contain Freescale-licensed content, so you will need to register on our web-site and log in before you can accept the license agreement and download the images from here:

The detailed description of our changes is here:

Programming the image

The images are slightly-less-than-4GiB image files containing the partition table, so you can copy it to an SD card or SATA drive on /dev/sdc using zcat and dd like so:

~/Downloads$ sudo umount /dev/sdc*
~/Downloads$ zcat 201501*.img.gz | sudo dd of=/dev/sdc bs=1M
~/Downloads$ sync

Or you can use Alex Page’s USB Image Tool under Windows.

If you’re using our latest U-Boot and a Nitrogen6 Max board, you can use the new USB Mass Storage Gadget to program the eMMC. If not, there were some notes in our first release that describe a more complicated way of programming eMMC.

Contents

In the rest of this post we’ll walk through the following:

Hardware Installation

Installing MU609 modem on Nitrogen6-Max board

The Nitrogen6_Max board has a PCI Express Mini Card slot and a built-in SIM card socket, so installation of the MU-609 is very straightforward.

Insert the modem in the PCI-e socket as shown below.

Nitrogen-Max board, top, MU609 modem inserted to the PCI-e socket.

Nitrogen-Max board, top, MU609 modem inserted to the PCI-e socket.

Connect the antennas to the modem card, as follows :

  • M – MAIN GSM antenna
  • G – GPS antenna
  • A – AUX GSM antenna

If you have only one GSM antenna, connect it to the M mini coax connector.

Then insert your SIM card to the socket in the bottom side of the board as shown in the figure below. 

Nitrogen-Max board, bottom, SIM card inserted to the socket.

Nitrogen-Max board, bottom, SIM card inserted to the socket.

 

Installing MU609 modem on BD-SL-i.MX6, Nitrogen6X, or Nitrogen6_Lite boards

These boards require a mini PCI-e to USB adapter to connect the modem. They’re cheap and easy to find (Search eBay for “mini PCI-e USB wireless SIM” keywords).

If you need a free USB port, install a USB HUB, and problem solved.

Mini PCI-e to USB Adapter, top with PCI-e MU609 modem

Mini PCI-e to USB Adapter, top with PCI-e MU609 modem

Mini PCI-e to USB Adapter, bottom, loaded with SIM card

Mini PCI-e to USB Adapter, bottom, loaded with SIM card

 

 

Using modem on a headless (No GUI) Ubuntu system

Software prerequisites

Make sure you have the latest kernel installed, but at least the ABI >= 34 :

ubuntu@trusty-dev:/$ uname -r
3.10.17-34-boundary-4t3
ubuntu@trusty-dev:/$

If this is not the case, please type :

ubuntu@trusty-dev:/$ sudo apt-get update && sudo apt-get dist-upgrade

We will solve the modem handling tasks with the modemmanager package. This package provides a unified high level API for communicating with (mobile broadband) modems. ModemManager is a daemon that gets started at boot time.

The modemmanager package provides a command line tool, named mmcli, to control the ModemManager daemon. That will be the tool used below.

We will solve the connection handling tasks with the network-manager package. We can use the NetworkManager’s huge database to use the cellular service provider data and settings. With the NetworkManager we can create connection configuration files, with specific parameters, that makes internet connection handling very easy.

Make sure you have installed modemmanager , networkmanager 1.4.0 and uuid packages :

ubuntu@trusty-dev:/$ dpkg -l | grep -e modemmanager -e network-manager -e uuid
ii libossp-uuid16              1.6.2-1.3ubuntu1             armhf        OSSP uuid ISO-C and C++ - shared library
ii libuuid1:armhf              2.20.1-5.1ubuntu20.3         armhf        Universally Unique ID library
ii modemmanager                1.4.0-1                      armhf        D-Bus service for managing modems
ii network-manager             0.9.8.8-0ubuntu7             armhf        network management framework (daemon and userspace tools)
ii uuid                        1.6.2-1.3ubuntu1             armhf        the Universally Unique Identifier Command-Line Tool

If these packages are not installed, please type the following and then restart the system:

ubuntu@trusty-dev:/$ sudo apt-get install modemmanager network-manager uuid

We back-ported modemmanager 1.4.0-1 and libmbim 1.10.0-2.1 and libqmi 1.10.2-2 to Ubuntu Trusty Tahr to support the latest modems and service providers.

If everything went well, your ModemManager and NetworkManager will start at boot time. You can check it like so:

ubuntu@trusty-dev:/$ ps -A | grep Manager
 662 ? 00:00:01 ModemManager
 722 ? 00:00:56 NetworkManager

When ModemManager starts it scans the serial ports for modems and it tries to recognize them. It takes quite long, 20-30 seconds (!!!) after the login prompt, so you’ll need to be patient.

Testing whether the system recognizes the modem

You can check the presence of the USB modem device using lsusb:

ubuntu@trusty-dev:/$ lsusb
Bus 001 Device 006: ID 12d1:1573 Huawei Technologies Co., Ltd. 
Bus 001 Device 005: ID 1c4f:0002 SiGma Micro Keyboard TRACER Gamma Ivory
Bus 001 Device 004: ID 1bcf:0005 Sunplus Innovation Technology Inc. 
Bus 001 Device 003: ID 05e3:0605 Genesys Logic, Inc. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2513 Standard Microsystems Corp. 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The first one with 12d1:1573 key, that is the Huawei MU609 modem.

You can check the modem’s serial ports :

ubuntu@trusty-dev:/$ ls -a1 /dev/ttyU*
/dev/ttyUSB0
/dev/ttyUSB1
/dev/ttyUSB2
/dev/ttyUSB3
/dev/ttyUSB4

The Huawei modem creates five USB serial ports. Others may create fewer.

At this point, you can see if modemmanager detects the modem with mmcli -L:

ubuntu@trusty-dev:/$ mmcli -L
Found 1 modems:
 /org/freedesktop/ModemManager1/Modem/0 [Huawei Technologies Co., Ltd.] MU609
ubuntu@trusty-dev:/$ 

And you can see more details of the modem with mmcli -m:

ubuntu@trusty-dev:/$ mmcli -m 0
/org/freedesktop/ModemManager1/Modem/0 (device id '2431657b772fc128a660f7b8c0587c213129ca8f')
 -------------------------
 Hardware | manufacturer: 'Huawei Technologies Co., Ltd.'
 | model: 'MU609'
 | revision: '12.105.29.00.00'
 | supported: 'gsm-umts'
 | current: 'gsm-umts'
 | equipment id: '357784046035976'
 -------------------------
 System | device: '/sys/devices/soc0/soc.1/2100000.aips-bus/2184200.usb/ci_hdrc.1/usb1/1-1/1-1.3'
 | drivers: 'option1, cdc_ether'
 | plugin: 'Huawei'
 | primary port: 'ttyUSB2'
 | ports: 'eth1 (net), ttyUSB1 (qcdm), ttyUSB2 (at), ttyUSB3 (gps), ttyUSB4 (at), ttyUSB0 (at)'
 -------------------------
 Numbers | own : 'unknown'
 -------------------------
 Status | lock: 'none'
 | unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
 | state: 'disabled'
 | power state: 'on'
 | access tech: 'unknown'
 | signal quality: '0' (cached)
 -------------------------
 Modes | supported: 'allowed: 3g; preferred: none
 | allowed: 2g; preferred: none
 | allowed: 2g, 3g; preferred: none'
 | current: 'allowed: 2g, 3g; preferred: none'
 -------------------------
 Bands | supported: 'unknown'
 | current: 'unknown'
 -------------------------
 IP | supported: 'ipv4'
 -------------------------
 3GPP | imei: '357784046035976'
 | enabled locks: 'none'
 | operator id: 'unknown'
 | operator name: 'unknown'
 | subscription: 'unknown'
 | registration: 'unknown'
 -------------------------
 SIM | path: '/org/freedesktop/ModemManager1/SIM/0'
-------------------------
 Bearers | paths: 'none'

Finding the optimal antenna position

Now we stop NetworkManager and ModemManager temporarily, because we want to run some more tests:

ubuntu@trusty-dev:/$ sudo stop network-manager
network-manager stop/waiting
ubuntu@trusty-dev:/$ ps -A | grep Manager
 3215 ? 00:00:00 ModemManager
ubuntu@trusty-dev:/$ sudo killall ModemManager 
ubuntu@trusty-dev:/$ ps -A | grep Manager
ubuntu@trusty-dev:/$ 

 And we start screen serial console to communicate with modem on ttyUSB2 (primary port of the modem, as shown above).

ubuntu@trusty-dev:/$ screen /dev/ttyUSB2 115200

Now you get an empty console screen. If local echo is not set, then type ATZ for the modem blindly, and that will reset it.

Now type :

ATI
Manufacturer: Huawei Technologies Co., Ltd.
Model: MU609
Revision: 12.105.29.00.00
IMEI: 357784046035976
+GCAP: +CGSM,+DS,+ES
OK

This tells us that the modem is present and working. Now type the following command, to check if your GSM antenna is set properly:

AT+CSQ
+CSQ: 29,99
OK

This is the GSM signal quality in +CSQ: RSSI, BER format, where

RSSI = Received Signal Strength Indication, and

BER = Bit Error Rate, currently unsupported, always 99

The RSSI = 99 (+CSQ: 99,99) means an unknown or undetectable signal level.

Here is a table to calculate the signal levels from RSSI :

Calculating signal levels from RSSI to dBm
RSSI 0 1 2 3 4 5 6 7
level dBm -113 dBm -111 dBm -109 dBm -107 dBm -105 dBm -103 dBm -101 dBm - 99 dBm
RSSI 8 9 10 11 12 13 14 15
level dBm -97 dBm -95 dBm -93 dBm -91 dBm -89 dBm -87 dBm -85 dBm -83 dBm
RSSI 16 17 18 19 20 21 22 23
level dBm -81 dBm -79 dBm -77 dBm -75 dBm -73 dBm -71 dBm -69 dBm -67 dBm
RSSI 24 25 26 27 28 29 30 31
level dBm -65 dBm -63 dBm -61 dBm -59 dBm -57 dBm -55 dBm -53 dBm >-52 dBm

Move/rotate your antenna and repeat the command above until you find the antenna’s optimal position. In general, values below 10 will not work, values between 10 and 15 will have many disconnections, values between 15 and 20 are weak, but could work, values between 20 and 25 are good, and values above 25 are excellent. For LTE 100Mbps connections (Huawei ME906, ME909 modem) you’ll need excellent signal quality, RSSI > 25 for reliable service.

Checking the subscriber information 

You should check your SIM card, since it provides a lot of information:

AT+CIMI
3100262475092493
OK

This command will query your SIM card’s IMSI number ( International Mobile Subscriber Identity )

The first 3 digits of IMSI number is MCC ( Mobile Country Code )

The following 2 (Europe) or 3 (North America) digits of the IMSI is the MNC ( Mobile Network Code )

The remaining digits is the MIN ( Mobile Identification Number )

You can check your MCC/MNC code in the following page :

Mobile Country Codes

For example if your MCC is 310 and your MNC is 026 then you are a T-Mobile subscriber in USA .

Why is this important ? Because on this page :

Mobile Broadband Service Providers

You can find your APN number based on you MCC and MNC number, and that is necessary, when you want to create a connection setup,  to dial up your service provider. Of course you may ask your service provider about these datas.

If you get an error :

AT+CIMI
+CME ERROR: Sim failure

Then your SIM card is not inserted properly, or it is locked by the CardLock feature, or its broken.

If the tests above pass, you can exit the screen console application ( <ctrl+A> Q, then Y ) .

Connecting to the internet

For doing that, you have to create a connection setup file as user “root” in the /etc/NetworkManager/system-connections directory, with the following content :

ubuntu@trusty-dev:/$ sudo cat /etc/NetworkManager/system-connections/MyModem
[connection]
id=MyMU609
uuid=15d742f1-2b5a-421e-9f27-fcb1fc26d72d
type=gsm
autoconnect=false

[ipv4]
method=auto

[gsm]
number=*99#
#username=blahblah
#password=blehbleh
apn=epc.tmobile.com
[serial]
baud=115200

The username and the password  are usually not necessary, or can be anything. The uuid is a unique identifier you can create with the uuid command (which installed earlier) :

ubuntu@trusty-dev:~$ uuid
15d742f1-2b5a-421e-9f27-fcb1fc26d72d
ubuntu@trusty-dev:~$

The id can be anything that you can memorize easily (“MyMU609″ is not mandatory). The same goes to for the file name “MyModem”. It can be anything. You have to get the apn from your service provider, or from HERE , as described above, earlier.

This is a minimal connection setup file. For detailed instructions, type :

ubuntu@trusty-dev:/$ man nm-settings

When finished, set the connection setup file’s attribute to 0600 :

ubuntu@trusty-dev:/$ sudo chmod 600 /etc/NetworkManager/system-connections/MyModem

And make sure that the file’s owner:group is root. If the owner is not root, then the Network Manager will ignore the connection setup.

ubuntu@trusty-dev:/$ sudo chown root:root /etc/NetworkManager/system-connections/MyModem

Now reboot, and wait for modemmanager to recognize the modem.

Then enable modem :

ubuntu@trusty-dev:/$ sudo mmcli -m 0 -e
successfully enabled the modem
ubuntu@trusty-dev:/$

And check the connections :

ubuntu@trusty-dev:~$ sudo nmcli con list
NAME                   UUID                                  TYPE             TIMESTAMP-REAL 
Wired connection 1     a66c3504-504a-4da8-8c1d-de9a80097367  802-3-ethernet   Wed Jan 21 12:49:14 2015 
MyMU609                15d742f1-2b5a-421e-9f27-fcb1fc26d72d  gsm              Wed Jan 21 12:58:39 2015 

Then you can dial (connect) to any of them :

ubuntu@trusty-dev:/$ sudo nmcli con up id MyMU609
ubuntu@trusty-dev:/$

You can see the status of the active connections like this :

ubuntu@trusty-dev:/$ sudo nmcli con status
NAME                   UUID                                   DEVICES  DEFAULT VPN  MASTER-PATH 
Wired connection 1     a66c3504-504a-4da8-8c1d-de9a80097367   eth1     no      no   -- 
MyMU609                15d742f1-2b5a-421e-9f27-fcb1fc26d72d   ttyUSB2  yes     no   -- 

You can use the internet now, download, upload, browse, launch wget, as you like it. When finished, you can disconnect with the following command. You don’t need to be in a hurry, service providers usually bill for data traffic and not connection time.

ubuntu@trusty-dev:/$ sudo nmcli con down id MyMU609
ubuntu@trusty-dev:/$

Pay close attention to the commands above, since we show both mmcli (modem manager) and nmcli (network manager).

Using modem on Ubuntu LXDE desktop

LXDE makes things much simpler.

As above, make sure modemmanager 1.4.0 is installed. It should recognize the modem as described earlier:

ubuntu@nitrogen:/$ mmcli -L
Found 1 modems:
 /org/freedesktop/ModemManager1/Modem/0 [Huawei Technologies Co., Ltd.] MU609
ubuntu@nitrogen:/$ 

Fine.

Now start the Network Manager via the menu:

Main-Menu -> Preferences -> Network Connections

A window pops up. Push [+Add] button. Choose Mobile Broadband as connection type, then push [Create…] . Select Huawei Technologies HUAWEI Mobile as your cellular device, and push [Continue]

Adding Huawei Mobile broadband device

Adding Huawei Mobile broadband device

Now select your country, your service provider, your billing plan, and confirm with the [Apply] button and [Save…].

It’s that simple. You can close the Network Connections window.

Now you can click on your network icon in the task bar with right mouse button. Select Enable Mobile Broadband . A window will pop up with a message that you were registered on your network. That is not yet a connection. Now click on the network icon with left mouse button and select your Mobile Broadband connection. The name depends on your provider. It will connect to your GSM network and you can unplug your ethernet cable if you want.

Of course you can use the same terminal commands on LXDE as you used in headless linux. As you like it.

 

As always please tell us how this works for you. Contact us if you have any trouble or ask a question by posting a reply below.

 

The post Cellular modems on i.MX6 boards under Ubuntu appeared first on Boundary Devices.

Timesys Expands i.MX6 board support to include Nitrogen6_MAX

$
0
0

timesys-logo

Timesys has expanded its LinuxLink offering for the popular Freescale i.MX6 Series processor to include support for the Boundary Devices Nitrogen6_MAX. This offering expands the already supported Boundary Devices boards which include the Nitrogen6X, Nitrogen6_Lite, and BD-SL-i.MX6.

Featuring a Quad-Core i.MX6 ARM Cortex A9 processor, the Nitrogen6_MAX single board computer features high-end performance, making it ideal for consumer, automotive and industrial multimedia applications.

With support for Linux kernel version 3.10 , the following are enabled:

o Audio
o Bluetooth
o CSI Camera
o Ethernet
o GPU Vivante
o I2C
o IPU
o LCD Connector
o MIPI Camera
o PWM Backlight
o RS485
o RTC
o SATA
o SD/MMC
o USB Host
o USB OTG
o Uart Driver
o VPU
o Watchdog Timer
o Weston/Wayland
o Wireless Networking
o eMMC
o HDMI
o mPCIe

 LinuxLink for Nitrogen6_MAX enables developers to leverage the high-performance multimedia processing power of the i.MX 6 series processor. LinuxLink users can customize their feature-rich application by choosing from the hundreds of packages/middleware offered through the award-winning LinuxLink Factory cloud-based and desktop-hosted build tools which facilitate the process of building and integrating a custom Linux platform. Using the LinuxLink web UI, developers can quickly and easily build a custom BSP and matching SDK for their Nitrogen6_MAX platform.

For developers/teams requiring access to expert engineering support, Timesys offers project-based support. Engaging with Timesys for support gives you access to help at any phase of your product development, whether you’re using the Timesys Factory (http://www.timesys.com/embedded-l=inux/platform-builder) or Yocto Project build system. In addition, developers engaging with Timesys for project-based support get access to LinuxLink desktop tools which enable maximum flexibility and customization of the platform and application.

- Learn more about LinuxLink for Nitrogen6_MAX and other Boundary Devices i.MX 6 processor based platforms at http://www.timesys.com/embedded-linux/resources/dev-center/imx6#nitrogen6ma=x.

- Build a custom BSP / SDK for your Freescale i.MX 6 processor-based Boundary Devices platform at https://linuxlink.timesys.com/build * NOTE: Existing users, please visit https://linuxlink.timesys.com/register=/factory to add the Boundary Devices Nitrogen6_MAX platform to your account.

The post Timesys Expands i.MX6 board support to include Nitrogen6_MAX appeared first on Boundary Devices.

Wifi Hotspot on i.MX6 boards (through cellular or ethernet)

$
0
0

Our i.MX6 Nitrogen6x and especially Nitrogen6_Max boards have great connectivity options and can be useful in server applications as well as the more typical client uses. In this post, we’ll describe how to use the built-in WiFi adapter to create a WiFi hotspot and router under Ubuntu.

The process involves configuration of three primary components:

  1. hostapd to provide access point software,
  2. dnsmasq to supply IP addresses to clients through DHCP, and
  3. iptables to provide routing and NAT support

For the impatient

If you just want to boot up with this functionality, we’ve uploaded an image that will run on either our Nitrogen6x or Nitrogen6_Max board and provide AP support as described below.

The image contains Freescale-licensed content, so you will need to register on our web-site and log in before you can accept the license agreement and download the image from here:

The detailed description of our changes is here:

Programming the image

The images are slightly-less-than-4GiB image files containing the partition table, so you can copy it to an SD card or SATA drive on /dev/sdc using zcat and dd like so:

~/Downloads$ sudo umount /dev/sdc*
~/Downloads$ zcat 201501*.img.gz | sudo dd of=/dev/sdc bs=1M
~/Downloads$ sync

Or you can use Alex Page’s USB Image Tool under Windows.

If you’re using our latest U-Boot and a Nitrogen6 Max board, you can use the new USB Mass Storage Gadget to program the eMMC. If not, there were some notes in our first release that describe a more complicated way of programming eMMC. 

Configuring this in your own image

The image above contains things pre-configured for immediate use. The steps below describe how you can add this functionality into your own image.

Make sure you have installed the latest kernel, but at least ABI >=36 :

ubuntu@trusty-dev:/$ uname -r
3.10.17-36-boundary-4t3
ubuntu@trusty-dev:/$

If this is not the case, please type :

ubuntu@trusty-dev:/$ sudo apt-get update && sudo apt-get dist-upgrade
ubuntu@trusty-dev:~$ sync
ubuntu@trusty-dev:~$ sudo reboot

 Now you need to install the packages listed above:

ubuntu@trusty-dev:/$ sudo apt-get install hostapd dnsmasq iptables

The package hostapd is a user space daemon for access point and authentication servers. It implements IEEE 802.11 access point management, and IEEE 802.1X/WPA/WPA2/EAP Authenticators . The package dnsmasq is a small DHCP server and DNS forwarder, exactly what we need.  The package iptables is a user-space application program that allows a system administrator to configure the tables provided by the Linux kernel firewall (implemented as different netfilter modules) and the chains and rules it stores. The necessary netfilter modules were added to our kernel in this patch.

Configuring hostapd

 Let us start with the hostapd configuration file. Create a hostapd.conf file with the following contents :

ubuntu@trusty-dev:/$ sudo cat /etc/hostapd/hostapd.conf
interface=wlan0
driver=nl80211
ssid=BoundaryDevices
hw_mode=g
channel=6
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=3
wpa_passphrase=Boundary
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
ubuntu@trusty-dev:/$

Of course ssid (the name of the wifi network appears for the wifi devices scanning for available networks) and the password (wpa_passphrase) can be anything what you prefer, its your choice. The password must be at least 8 characters long.

Make sure you have set the defaults of hostapd :

ubuntu@trusty-dev:~$ cat /etc/default/hostapd | grep DAEMON_CONF
# Uncomment and set DAEMON_CONF to the absolute path of a hostapd configuration
DAEMON_CONF="/etc/hostapd/hostapd.conf"
ubuntu@trusty-dev:~$ 

Now you need to edit the interfaces file and you need to add wlan0 (thats the onboard WiFi) interface :

ubuntu@trusty-dev:~$ sudo cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
#auto eth0
allow-hotplug eth0
iface eth0 inet dhcp

auto lo
iface lo inet loopback

auto wlan0
iface wlan0 inet static
hostapd /etc/hostapd/hostapd.conf
address 192.168.10.1
netmask 255.255.255.0

This sets the WiFi hotspot IP address to 192.168.10.1. You may want to use something else to match your local network.

Configuring dnsmasq

Now you need to add the following lines to /etc/dnsmasq.conf file to provide DHCP services to WiFi clients:

ubuntu@trusty-dev:~$ sudo cat /etc/dnsmasq.conf | tail -n3
interface=lo,wlan0
no-dhcp-interface=lo
dhcp-range=192.168.10.10,192.168.10.254,255.255.255.0,12h
ubuntu@trusty-dev:~$

This provides a 192.168.10.10 … 192.168.10.254 DHCP IP pool for the WiFi clients.

IP forwarding

Now you need to edit the file /etc/sysctl.conf . Make sure this line is added to the end :

ubuntu@trusty-dev:~$ sudo cat /etc/sysctl.conf | tail -n1
net.ipv4.ip_forward=1
ubuntu@trusty-dev:~$

Configuring IP tables

Now you need to activate NAT in the built-in firewall of linux, you have to edit the file /etc/rc.local:

ubuntu@trusty-dev:~$ sudo cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

iptables -t nat -A POSTROUTING -s 192.168.10.0/24 ! -d 192.168.10.0/24 -j MASQUERADE

exit 0
ubuntu@trusty-dev:~$

Thats it! Now you have to to reboot the system.

Configure cellular networking

If you want to use a cell modem as your up-stream Internet connection as described in our earlier post, you may need to disable ethernet.

root@trusty-dev:~# nmcli con status
NAME UUID DEVICES DEFAULT VPN MASTER-PATH
Wired connection 1 93b31726-2a2b-4559-a637-bef1ca0d2371 eth1 no no --

root@trusty-dev:~# ifdown eth0
Internet Systems Consortium DHCP Client 4.2.4
Copyright 2004-2012 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth0/00:19:b8:01:5d:f9
Sending on LPF/eth0/00:19:b8:01:5d:f9
Sending on Socket/fallback
DHCPRELEASE on eth0 to 192.168.0.1 port 67 (xid=0x51d23a2c)
root@trusty-dev:~# nmcli con status
NAME UUID DEVICES DEFAULT VPN MASTER-PATH
root@trusty-dev:~#

Now we connect with the MU609 modem as usual, as described in the cell post:

root@trusty-dev:~# nmcli con up id MyMU609
root@trusty-dev:~#

Now login from your smartphone/tablet android device to this Wifi nitrogen-hotspot, (by selecting BoundaryDevices network to connect to, and give Boundary as password) and do your internet business.

Disconnecting GSM internet is the usual, as described in the cell post :

root@trusty-dev:~# nmcli con down id MyMU609
root@trusty-dev:~#

This is how the Nitrogen6x or Nitrogen6_Max board can be turned into a WiFi-hotspot and internet gateway to share internet with the WiFi devices around it:

Wifi Hotspot on i.MX6 boards

Figure 1: Creating Wifi Hotspot using i.MX6 boards

 

As always please tell us how this works for you. Contact us if you have any trouble or ask a question by posting a reply below.

The post Wifi Hotspot on i.MX6 boards (through cellular or ethernet) appeared first on Boundary Devices.

Viewing all 391 articles
Browse latest View live