Содержание CONPROSYS Linux SDK

Страница 1: ...User s Manual Self Build Edition CONTENTS CONPROSYS Linux SDK Ver 2 0 0 Introduction 4 Safety Precautions 11 SDK preparation 15 Starting CONPROSYS 19 Run environment setting 24 Appendix 44 ...

Страница 2: ...ooting SD card for CONPROSYS 17 1 Preparation for the SD card image file 17 2 Tool chain installation necessary for SDK 17 Starting CONPROSYS 19 1 Preparation 20 2 Start up 22 3 About File System 23 Run environment setting 24 1 Web Setup function 25 1 Setting 26 2 Status 26 3 Maintenance 27 4 Termination 27 2 Network setting 28 3 Web Setup function エラー ブックマークが定義されていません 4 Install the software packa...

Страница 3: ... Appendix 44 1 File system structure 45 2 Block diagram 46 3 Device I F 48 4 FPGA I O map 50 1 Integrated type CPS MC341 ADSCx Series 50 5 Integrated type products LED DIP Switch Switch control 57 6 Option Board control 58 ...

Страница 4: ... 4 Introduction ...

Страница 5: ...n 5 1 Outline CONPROSYS Linux SDK Software Development Kit is for creating software development environment to generate modules that operate on the CONPROSYS Ubuntu will be run on CONPROSYS in the self build edition and the software can be developed in its CONPROSYS ...

Страница 6: ...ut Model CPS MG341G ADSC1 series Multi Input and Output 3G WAN Japan only Model CPS MG341G5 ADSC1 Multi Input and Output LTE Model The functions such as HMI VTC OPC UA and Modbus that are installed in the M2M controller series are not provided in the CONPROSYS Linux SDK The additional software is necessary for these functions The functions such as HM VTC OPC UA Modbus PLC and CNC that are installe...

Страница 7: ... Introduction CONPROSYS Linux SDK User s Manual Self Build Edition 7 3 SDK specification Kernel version 4 19 79 Distribution arm edition Ubuntu 20 04 GCC version gcc 9 3 ...

Страница 8: ...stall and use free of charge the Software solely for the purpose of using hardware products onto which the Software has been installed 2 Customers may copy the Software for a minimum number of times as necessary solely for emergency backup purposes in using the Software However description regarding any of the rights pertaining to the Software supplied by CONTEC shall be attached to any such copie...

Страница 9: ...e information and or updated program will be delivered through the website of CONTEC 2 The information and or updated program will be licensed to the Customers in accordance with the Agreement Customers may use the information and or updated program at their discretions and responsibilities however in case the Customers use such information and or updated program they shall comply with the terms a...

Страница 10: ... excluded Article 11 Dispute Resolution Upon the occurrence of any dispute in relation to the Agreement or the Software if any legal procedures are required such as the filing of a petition for a lawsuit the Osaka District Court shall have the exclusive jurisdiction over such dispute Article 12 Severability If for any reason any portion of the provisions set forth herein is found to be invalid or ...

Страница 11: ... 11 Safety Precautions ...

Страница 12: ...Understand the meanings of these labels to operate the equipment safely DANGER Signal word used to indicate an imminently hazardous situation which if not avoided will result in death or serious injury WARNING Signal word used to indicate a potentially hazardous situation which if not avoided could result in death or serious injury CAUTION Signal word used to indicate a potentially hazardous situa...

Страница 13: ...when using the product continuously be sure to read the manual in the CONTEC s website and understand the contents Do not modify the software CONTEC will bear no responsibility for any problems etc resulting from modifying the software Regardless of the foregoing statement CONTEC assumes no responsibility for any errors that may appear in this document or for results obtained by the user as a resu...

Страница 14: ...performs unintended operations 2 Security measures e g Do not keep using the default password Refer to the product manual for the password setting Set a strong password Combined with upper and lowercase letters and numbers so that it cannot be easily analogized by others Change the password periodically Disable unnecessary network services and functions Restrict access to the network with network ...

Страница 15: ... 15 SDK preparation ...

Страница 16: ...PROSYS Linux SDK User s Manual Self Build Edition 16 1 Required items for development CONPROSYS SDHC card 2Gbyte or larger non SDXC compliant Cable for serial monitor Recommended cable TTL 232R 3V3 AJ by FTDI LAN Cable PC ...

Страница 17: ... to the Cross building User s Manual 2 Tool chain installation necessary for SDK Write the image file that was either by downloaded or created with CONPROSYS Linux SDK Cross building edition into the SD card The downloaded image file is a zip file Decompress it into img file before start writing it in the SD card Please use the SD card larger than the img file size For Windows The following exampl...

Страница 18: ...eld Click Write button 4 Pop up message appears to notify of the writing completion Click Write button and remove the SD card With Linux 1 Unmount the SD card if it is mounted sudo umount dev sdb 2 Write the image file into the SD card by dd command sudo dd if sd img of dev sdb bs 1M 3 Synchronize the file by sync command sync 4 Remove the SD card when the synchronizing is completed ...

Страница 19: ... 19 Starting CONPROSYS ...

Страница 20: ...necting a serial cable from the host PC to CONPROSYS through the serial port 3 5Φ MINI JACK you can login from the console to the product See the setting details below Baud rate 115200 bps Data bit 8 bit Parity none Stop bit 1 bit Hardware flow none We recommend the following serial cable for connecting the host PC to CONPROSYS Download appropriate driver software to match OS of PC for serial moni...

Страница 21: ...pgraded A connecting example of CONPROSYS and PC Serial monitor In the default setting 10 1 1 101 is set in LAN A port I F on Linux is eth0 and DHCP network is set in LAN B port I F on Linux is eth1 Also you can connect LAN cable to CONPROSYS directly from the host PC to access 10 1 1 101 IP address via network A connecting example of CONPROSYS and PC Ether connection ...

Страница 22: ...s in a serial console Log in with the following account Login conprosys Password contec You can also log in by ssh when connected through network The license agreement appears upon the initial log in and ask you to assent to all terms Enter Yes or No With entering Yes the contents of agreement no longer appears when you log in from the next time and allow you to write into the SD card With enterin...

Страница 23: ...stem returns to Read Only mode Directory on ramdisk such as tmp is writable without logging in See the followings to write a file into SD card when you are not logged in Change two files where Read Only is set Edit etc fstab file of rootfs partition Before change rootfs rootfs ro noatime 0 0 After change rootfs rootfs rw noatime 0 0 Other than rootfs ext4 partition create a new partition by fdisk ...

Страница 24: ... 24 Run environment setting ...

Страница 25: ...Build edition SDK settings of network date time as well as displays of system information network are supplied To display the setup page access directly the IP address of CONPROSYS from Web browser on PC An example Connect the PC to the LAN A port at the time of initial setting and see whether the page can be brought in http 10 1 1 101 Login admin Password password Web setup page ...

Страница 26: ...system booting disabled SAMBA server Upon system booting disabled Rooter function Rooter function Upon system booting disabled WAN interface DHCP server Upon system booting disabled Static routing Upon system booting disabled The maximum number of settings 32 Port forwarding Upon system booting disabled The maximum number of settings 32 IP filter IP filter setting Upon system booting disabled The ...

Страница 27: ...ve and Reboot This saves the settings and reboots the device Save and Shutdown This saves the settings and shuts down the system Save This saves the settings Reboot This reboots the device If the settings are not saved before rebooting settings return to the previous ones prior to the setting Shutdown This shuts down the system If the settings are not saved before shutting down settings return to ...

Страница 28: ...e enabled by rebooting this file etc conprosys config ini LAN Configuration Item name Description eth0_dhcp Set DHCP enabled or disabled of LAN A eth0 enabled disabled eth0_ipaddr Set IP address of LAN A eth0 eth0_netmask Set a netmask of LAN A eth0 eth0_gateway Set a gateway address of LAN A eth0 eth0_dns1 Set DNS server address of LAN A eth0 eth1_dhcp Set DHCP enabled or disabled of LAN B eth1 e...

Страница 29: ... LAN configuration Item name Description wlan_dhcp Set DHCP enabled or disabled of wireless LAN wlan0 enabled disabled wlan_ipaddr Set IP address of wireless LAN wlan0 wlan_netmask Set a netmask of wireless LAN wlan0 wlan_gateway Set a gateway address of wireless LAN wlan0 wlan_dns1 Set DNS server address of wireless LAN wlan0 wlan_essid Set SSID of wireless LAN wlan0 wlan_encrypt Set a cipher for...

Страница 30: ...oter function setting Item name Description router Set rooter function enabled disabled wan_if Set WAN interface 3G eth2 LTE ppp0 Wireless LAN wlan0 LAN A eth0 LAN B eth1 DHCP server function setting Item name Description dhcp_server Set DHCP server startup enabled disabled dhcp_server_lan_if Set LAN interface of DHCP server Wireless LAN wlan0 LAN A eth0 LAN B eth1 dhcp_server_top_addr Set DHCP in...

Страница 31: ...set in the Web Setup The web setup of PPPoE can be done when only pppoe setting is enabled Static routing function setting Item name Description static_route Set static routing function enabled disabled st_route_addr_1 Set the destination IP address of static routing st_route_gw_1 Set the gateway address of static routing st_route_mask_1 Set the net mask of static routing st_route_if_1 Set the int...

Страница 32: ... port forwarding destination port The number in the item names indicates setting number up to 32 IP filter function setting Item name Description ipfilter Set IP filter function enabled disabled ipfilter_kind_1 Set filter type ACCEPT DROP ipfilter_proto_1 Set protocol tcp udp icmp all ipfilter_saddr_1 Set the source IP address ipfilter_sport_1 Set the source port ipfilter_daddr_1 Set the destinati...

Страница 33: ...Example 1 set eth0 to DHCP eth0_dhcp enabled eth0_ipaddr eth0_netmask eth0_gateway eth0_dns1 Example 2 set eth0 to other fixed IP 192 168 30 11 eth0_dhcp disabled eth0_ipaddr 192 168 30 11 eth0_netmask 255 255 255 0 eth0_gateway 192 168 30 1 arbitrary eth0_dns1 192 168 30 255 arbitrary Execute the command below to check the network setting Ifconfig ...

Страница 34: ... Write available var log var log Reading solely Writing is not available Accessing CONPROSYS by Explorer of Windows PC enables you to directly open the files such as program source code with Windows application Samba startup procedure The network can be set by connecting to CONPROSYS through LAN from Web browser on PC For details refer to Web Setup function page 25 If you would like to start up by...

Страница 35: ... Run environment setting CONPROSYS Linux SDK User s Manual Self Build Edition 35 Samba reboot procedure by command prompt sudo systemctl restart smbd sudo systemctl restart nmbd ...

Страница 36: ...e version of software that is already installed execute the command listed below The software can be upgraded if its version is the latest sudo apt upgrade Install the software package Execute the command listed below to install the software package you wish sudo apt install The name of the software An example Installation of MySQL Client sudo apt install mysql client If you are uncertain of the n...

Страница 37: ... the memory size of the SD card is larger than the image file the whole memory size cannot be used To use the memory size fully use one of the methods described below Create a new partition in the blank area of the memory Create a new partition in the blank area of the memory Expand the rootfs partition ext4 of Linux to the maximum memory size in the SD card Expand rootfs partition ...

Страница 38: ...efault value ii Write the partition information by w command Command m for help w 3 Reboot CONPROSYS with the command below sudo reboot 4 Confirm the device of dev mmcblkk0p3 is available Format the new created partition sudo mkfs t ext4 dev mmcblk0p3 5 Create the destination for the new partition and mount it An example mounting directory mnt ext_mmc sudo mkdir mnt ext_mmc sudo mount dev mmcblk0p...

Страница 39: ... 941 cylinders total 15130624 sectors Units sectors of 1 512 512 bytes Sector size logical physical 512 bytes 512 bytes I O size minimum optimal 512 bytes 512 bytes Disk identifier 0x00000000 Device Boot Start End Blocks Id System dev mmcblk0p1 63 144584 72261 c W95 FAT32 LBA dev mmcblk0p2 144585 7855784 3847567 83 Linux ii Delete Linux partition Partition number 2 by d command Command m for help ...

Страница 40: ...sical 512 bytes 512 bytes I O size minimum optimal 512 bytes 512 bytes Disk identifier 0x00000000 Device Boot Start End Blocks Id System dev mmcblk0p1 63 144584 72261 c W95 FAT32 LBA dev mmcblk0p2 144585 15130623 7484987 83 Linux v Write the partition information by w command Command m for help w 3 Reboot CONPROSYS with the command below sudo reboot 4 Resize the partition that was changed by resiz...

Страница 41: ...lding large source code You can expand the memory by creating a swap file on the disk An example Creating 512Mbyte of SWAP memory 1 Create a SWAP file dd if dev zero of home swapfile bs 1024 count 512000 mkswap home swapfile 2 Set the SWAP file sudo swapon home swapfile Once you create the SWAP file you only need to set the file after next time ...

Страница 42: ...gs Description Turn on SW1 2 only Starts up IP address with the factory settings when the power is on As for User Password and Group settings the system starts up with the previous settings The present settings of IP address and User Password can be viewed on Web setup page Turn on SW1 2 and SW1 3 Restores the factory settings of individual settings when the power is on When the restoring has fini...

Страница 43: ...am Directory application sample CPS MC341 ADSC series CPS MG341 ADSC series TCP IP server client socket Timer timer RS 485 communication Integrated type RS485 DI DO AI control Multi function model mc341_io DI DO control Integrated type spitest RTC tools rtc Available Δ Available with specific models Blank not available To self build a sample program execute a make command in the directory of the s...

Страница 44: ...Appendix ...

Страница 45: ...k tmpfs tmpfs sys fs cgroup tmpfs tmpfs run samba tmpfs tmpfs tmp tmpfs tmpfs var cache apt tmpfs tmpfs var cache samba tmpfs tmpfs var lib dhcp tmpfs tmpfs var lib dhcp3 tmpfs tmpfs var lib logrotate tmpfs tmpfs var lib ntpdate tmpfs tmpfs var lib Plymouth tmpfs tmpfs var lib samba tmpfs tmpfs var lib upstart tmpfs tmpfs var lib urandom tmpfs tmpfs var local tmpfs tmpfs var log tmpfs tmpfs var ma...

Страница 46: ...ppendix CONPROSYS Linux SDK User s Manual Self Build Edition 46 2 Block diagram CPS Mx341 ADSCx series block diagram Italic font means optional choices CPS Mx341G ADSC1 Japan Domestic model block diagram ...

Страница 47: ... Appendix CONPROSYS Linux SDK User s Manual Self Build Edition 47 CPS Mx341G ADSC1 Global model block diagram CPS MC341Q ADSC1 block diagram CPS MG341G5 ADSC1 block diagram ...

Страница 48: ...ices SPI control device モデル dev spidev2 0 dev spidev2 1 dev spidev2 2 CPS MC341 ADSCx CPS MC341G ADSC1 CPS MG341G5 ADSC1 CPS MC341Q ADSC1 AI ADC CLK 6MHz DIO FPGA CLK 24MHz Devices and the maximum clock values of SPI controlling are listed in the parentheses GPIO control device LED control Model GPIO 26 GPIO 27 GPIO 67 GPIO 128 GPIO 129 CPS MC341 ADSCx CPS MC341G ADSC1 CPS MC341Q ADSC1 ST1 Green O...

Страница 49: ...USB1 dev ttyUSB2 dev ttyUSB3 dev ttyUSB4 CPS MC341 ADSCx Optional Device CPS MC341G ADSC1 Japan domestic model Sierra USB modem Sierra USB modem Sierra USB modem Sierra USB modem Optional Serial device CPS MC341G ADSC1 Global model Optional Serial device CPS MG341G5 ADSC1 Quectel USB modem Quectel USB modem Quectel USB modem Quectel USB modem Optional Serial device Network device Network Category ...

Страница 50: ...signal with a fall of SCLK SPI signal format Register Page Address R W Access Type Dummy Data 4bit 8bit 1bit 1bit 2bit 16bit R W 0 Read 1 Write Access Type 0 Byte Access 1 Word Access Dummy Always 0 Upon Byte accessing data are LSB justified and converted into 16 bit for transmission and reception Example Write 00AAh to Page 0h Address 12h 0x0 12 C 00AA Products Category Products Category Function...

Страница 51: ...gital output port 14h 17h R Not used 18h 19h R W Digital filter setting time 1Ah 1Fh R Not used 1Ch 1Dh R W Internal power ON OFF 1Eh 1Fh R Not used 20h 21h R W System reservation area 22h 23h R Not used 24h 25h R W System reservation area 26h FFh R Not used For CPS MC341 ADSC1 931 exclusively Analog input unit port map Page 1h Address Read Write Meaning 00h 01h R System reservation area 02h 03h R...

Страница 52: ... R D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 0 0 0 0 0 0 0 0 DI7 DI6 DI5 DI4 DI3 DI2 DI1 DI0 This port gets a value of digital input terminal When digital filter is set a value after passing through the filter is taken This function is only available with DI0 DI3 in CPS MC341 ADSCx series Digital output port Page 0h Address 12h 13h R W D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D05 D4 D3 D2 D...

Страница 53: ...ec 16 8 192msec 17 16 384msec 18 32 768msec 19 65 536msec 20 131 072msec 21 31 Reserve Internal power ON OFF setting port Page 0h Address 1Ch 1Dh R W D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 PWEn This ports sets enabled ON or disabled OFF of internal power for digital input port Read this port to check the setting status See Internal power ON OFF setting ...

Страница 54: ... port Page 2h Address 10h W D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Sel0 This port selects a channel to read from Counter data read port See the instruction Counter data read port Page 2h Address 10h 13h R to read counter data Counter read setting Set Name Meaning Set item Initial value Sel0 Counter read channel Set the cannel to read from counter data r...

Страница 55: ... Page 2h Address 1Ch 1Fh When executing the command to read the data are read from data address port Page 2h Address 1Ch 1Fh Control data address port after controlling the command port Refer to Counter I O unit port map Page 2h page 52 to Internal power ON OFF setting port Page 0h Address 1Ch 1Dh R W page 53 regarding the format of the data address port for each command code Ch0 Ch1 counter mode ...

Страница 56: ...1 _Ch0 0 0 0 0 0 0 Cmp0 _Ch1 Cmp0 _Ch0 1Eh 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Upon reading the bit becomes 1 if the condition is satisfied Upon writing set 1 into the corresponding bit to reset Carry status check clear counter command code 3Ah R W Addr D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 1Ch 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Carry Ch1 Carry Ch0 Upon reading the bit becomes 1 if the condit...

Страница 57: ...O 26 Out On usr local bin gpio_out sh 26 0 Off usr local bin gpio_out sh 26 1 ST2 GPIO 27 Out On usr local bin gpio_out sh 27 0 Off usr local bin gpio_out sh 27 1 Switches of integrated types listed below can be read by GPIO port Switch control for integrated type LED Control device Port No Port attribute Control method Linux shell DIP SW1 2 GPIO 32 In usr local bin gpio_in sh 32 On 0 Off 1 DIP SW...

Страница 58: ...way Series CPS MG341G ADSC1 Series Multi I O 3G WAN Japan only Model CPS MG341G5 ADSC1 Multi I O LTE Model These models can control the power of the option board Option board control Function How to control Linux shell Option board power On usr local cps board PowerOnOptionBoard sh Option board power Off usr local cps board PowerOffOptionBoard sh Option board detection usr local cps board DetectOp...

Страница 59: ... When SIM is not detected this displays the Not Detect RSSI acquisition usr local cps board mobile checkSIM_mobile sh End status 0 Succeed displays RSSI value dbm 1 Fail RSRP acquisition only for the models with LTE usr local cps board mobile getRSRP sh End status 0 Succeed displays RSRP value dbm 1 Fail Option board LED control 2 usr local cps board mobile ctrl_LED sh param param 0 All off 1 Gree...

Страница 60: ... Revision History CONPROSYS Linux SDK User s Manual Self Build Edition 60 Revision History MONTH YEAR Summary of Changes February 2022 1st edition ...

Страница 61: ...apan https www contec com No part of this document may be copied or reproduced in any form by any means without prior written consent of CONTEC CO LTD CONPROSYS Linux SDK User s Manual Self Build Edition NA08766 LXAU801 02142022_rev1 02142022 February 2022 Edition ...

Отзывы: